oidc-provider: optional `oidc_session_name` backend-option to override RoleSessionName derivation
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- aws, rust
調査の方向性
この機能強化を有効にする場合は、AwsBackendAuth::resolve_aws と AwsExchange の構築から始め、その後 backend_options が oidc_role_arn と oidc_subject をどのように処理するかを確認します。完了条件は、既存のデフォルト値を変更せずにオプションの oidc_session_name を受け付け、引き続きサニタイズされ、リポジトリの関連するテストでカバーされることです。
索引モデルが issue の本文から書いたものです。
説明
Context
#83 makes AwsBackendAuth::resolve_aws derive the assumed-role RoleSessionName from the per-connection oidc_subject (scv1:conn:{id}), sanitized to AWS's [\w+=,.@-]{2,64} charset, instead of the constant s3-proxy. This gives consumers per-connection attribution in their CloudTrail.
The session name is currently non-overridable through the middleware: AwsBackendAuth builds the AwsExchange internally from backend_options, and while AwsExchange.session_name is a pub field, using it requires bypassing the middleware entirely (reimplementing the credential-resolution path). So a consumer that wants a different session-name format has no practical hook.
Proposed enhancement (deferred)
Read an optional oidc_session_name backend-option, falling back to the derived-from-subject default:
let session = config.option("oidc_session_name")
.map(sts_session_name) // still sanitize — STS rejects bad input either way
.unwrap_or_else(|| sts_session_name(subject));
exchange.session_name = session;
This reuses the existing string-option mechanism (oidc_role_arn, oidc_subject are passed exactly this way), so it's ~2 lines, adds no new public type/trait/closure, and is fully backward-compatible.
Why it is NOT being added now
- One consumer, one policy. The only known consumer is
source-cooperative/data.source.coop(PR #147), and it wants exactly the derived-from-subject behavior. A configuration knob for a value that never varies is speculative generality. - The default is essentially forced, not opinionated. AWS requires a valid
RoleSessionName; "a sanitized rendering of the subject the caller already supplied" is the sane universal default, not one option among several competing strategies anyone has requested. - Waiting costs nothing. Because
backend_optionsis already an open string map,oidc_session_namecan be added the day a second consumer (or a specific CloudTrail naming convention) actually needs a different format — as a non-breaking one-liner, with no redesign. Adding it now would ship an unused knob (YAGNI).
Trigger to revisit
Add the option when any of these becomes real:
- A second consumer of
multistore-oidc-providerneeds a session-name format other than the sanitized subject. - A consumer needs the session name to encode something else (e.g. role name, a fixed prefix, a hash) to satisfy a CloudTrail /
aws:useridconvention or a resource-policyaws:RoleSessionNamecondition. - The sanitization default proves lossy in practice (e.g. truncation collisions that matter for attribution).
Refs: #83
- 主要言語
- Rust
- スター
- 20
- フォーク
- 1
- 平均マージ
- 8時間 29分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
developmentseed/multistore のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
developmentseed/multistore#160 ·
-
List of a prefix 503s when a single object key contains an empty path segment (//)対応中かも @alukach が 104 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
developmentseed/multistore#116 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
Credential cache key (role ARN) doesn't capture the full minted identity (subject + extra_claims)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
developmentseed/multistore の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
limitlessprojects/Go-Hybrid#3342 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
librespeed/speedtest-rust#52 · コメント 1 件 ·
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bherbruck/solvecraft#11246 · コメント 1 件 · リアクション 1 件 ·
-
example
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rust-lang-nursery/rust-cookbook#954 ·
メンテナーはふだん 1 日以内に返信