feat(providers): support multiple JWT-SVID audiences for SPIFFE credential providers
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with crates/openshell-supervisor-network/src/token_grant.rs at the cited scalar-audience flow, then review the provider profile and runtime architecture documentation. Done means explicitly configured JWT-SVID audiences survive profile and API/SDK round trips, remain separate from the backend resource audience, preserve single-audience compatibility, and have the listed isolation, expiry, renewal, and integration coverage.
索引モデルが issue の本文から書いたものです。
説明
User Story
As an operator integrating a SPIFFE-aware credential broker and protected backend services, I want an OpenShell SPIFFE credential provider to request a JWT-SVID with an explicit list of audiences, so the same workload identity token can authenticate to both the broker and the intended backend without exposing credentials to agent code or forcing those services to share one audience identifier.
Problem Statement
The current token-grant configuration exposes a single jwt_svid_audience. Some workflows have more than one intended recipient of the workload's SVID:
- A credential broker validates the SVID as a client assertion before issuing a delegated backend access token.
- A backend service, or an identity-aware proxy in front of it, independently validates the workload SVID on the outgoing request.
The SVID's sub identifies the workload. Its aud identifies the services allowed to consume that particular token. The broker's audience and the backend's audience can therefore both be legitimate recipients of one deliberately scoped SVID.
This is distinct from the OAuth resource audience used to request the backend access token. Supporting several SVID audiences must not implicitly request multiple backend resources or broaden delegated access.
Impact / Why This Matters
A single-audience configuration cannot express this intent. Operators must arrange separate SVID acquisition, add credential-handling adapters, or configure otherwise distinct recipients to accept a shared audience. These alternatives add integration and rotation work or obscure the intended recipients.
Related open issue: #3320 — support multiple dynamic credential injections on one request. That issue covers setting multiple credential headers; this proposal covers requesting a single SVID valid for multiple explicitly configured recipients. Both capabilities are needed for the combined workflow below. Multi-audience issuance alone does not implement SVID forwarding.
Proposed Design
Allow an operator to declare multiple JWT-SVID audiences in a YAML provider profile. Illustrative syntax only; the final schema is up to maintainers:
token_grant:
token_endpoint: https://credentials.example.org/token
jwt_svid_audiences:
- https://credentials.example.org/token
- https://reports.example.org
audience: https://reports.example.org/api
Desired workflow:
- Supervisor obtains a signed JWT-SVID through the SPIFFE Workload API with both configured SVID audiences and the sandbox's workload identity.
- Supervisor presents it to the credential broker as the client assertion, together with any separately required delegation or subject token.
- The broker validates its own expected audience and independently enforces workload binding, delegation, scope and resource authorization before returning a backend access token.
- With the injection support requested in #3320, Supervisor can reuse that SVID in a provider-configured identity header while injecting the separate backend token into
Authorizationon an admitted request. - Each recipient validates its own audience membership, signature, issuer/trust and expiration. An unrelated recipient is not authorized by this configuration.
Additional backend recipients should be explicitly configured only when the operator intends that same SVID to be accepted by them. Endpoint policy still independently determines where a credential may be sent.
Keep existing single-audience profiles and omission/default behavior compatible. Define an unambiguous rule when singular and plural forms coexist; rejecting conflicting configuration is preferable to silently widening the audience set. Do not interpret comma-separated text as a list or silently discard requested audiences.
Multi-audience use should be opt-in. A recipient holding the bearer SVID can replay it to another listed recipient, subject to that recipient's other authorization checks. Operators needing recipient isolation should retain separate single-audience SVIDs.
Acceptance Criteria
- A YAML-configured provider can request one JWT-SVID containing all explicitly configured audiences through a compatible Workload API implementation.
- Existing single-audience profiles continue to work, with documented handling of omitted, empty, duplicate and conflicting audience settings.
- Profile import/export and API/SDK round trips preserve the audience list without converting it into one comma-separated audience.
- SVID audiences remain independent of the resource audience and scopes requested for the backend access token.
- Credentials and grants cannot be mixed across workloads/providers or different requested audience sets; a configuration change cannot reuse an incompatible cached result.
- Expired SVIDs are never forwarded. SVID renewal preserves the configured audience set, and SVID/backend-token lifetimes are handled independently.
- In combination with #3320, an admitted request can carry the original multi-audience SVID and the independently obtained backend token without either becoming available to agent code, logs or errors. Acquisition failure fails closed.
- Integration coverage verifies acceptance by both configured recipients, rejection by an unrelated recipient, rotation/expiry, concurrent isolation and single-audience compatibility.
Alternatives Considered
- Separate single-audience SVIDs: offers stronger recipient isolation and remains a valid option, but does not cover operators deliberately choosing one SVID for several recipients.
- One shared audience configured on all recipients: avoids an audience-list requirement but no longer expresses each recipient's distinct identifier.
- External file/API adapters or a credential-injecting proxy: adds components and credential lifecycle handling outside the provider workflow.
Standards and Agent Investigation
RFC 7519 §4.1.3 permits an audience array. SPIFFE JWT-SVID §3.2 permits multiple audience values, requires recipient membership validation, and recommends a single audience for normal cases. This proposal enables the explicit multi-recipient case without changing the default.
Public source inspected at commit 99ed6a9df09a70981accfd39fe234fa1a648a93c: token_grant.rs takes a scalar audience and calls fetch_jwt_token([audience], None). The public provider profile and runtime architecture documentation were reviewed. No implementation is included in this request.
Checklist
- I've reviewed existing issues and the architecture docs.
- This is a design proposal, not a "please build this" request.
- 主要言語
- Rust
- スター
- 8.7k
- フォーク
- 1.3k
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 271
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
area:docs
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:cli state:validated
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
state:triage-needed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
area:build spike state:review-ready state:stale
難易度 2/5 半日 初心者へのやさしさ 68/100
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
web-infra-dev/rspack#15847 ·