You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2026/09/02 10:46:03 UTC
[I] feat: accept caller-provided subject tokens in web-identity providers [opendal-reqsign]
Xuanwo opened a new issue, #861:
URL: https://github.com/apache/opendal-reqsign/issues/861
## Goal
Allow host applications to supply an OIDC or other external subject token directly to reqsign web-identity credential providers, without creating a temporary file, synthetic file path, or generated external-account credential document.
This should cover the existing AWS, Google, and Azure web-identity flows while keeping all cloud-specific exchange configuration and protocol logic in their service crates.
## Motivation
The current public APIs are optimized for process-level credential discovery:
- AWS `AssumeRoleWithWebIdentityCredentialProvider` reads a token file.
- Azure `WorkloadIdentityCredentialProvider` reads a federated token file.
- Google external-account exchange is reached through credential-file parsing and file/URL/executable credential sources.
Server applications can instead receive an identity token as part of an authenticated request and need to exchange that exact token for a request-scoped cloud credential. Today such callers must emulate a file source through `Context::FileRead`, create temporary files, or synthesize provider-specific credential JSON. Those adapters obscure token ownership and make per-request isolation and cache review harder.
## Proposed contract
Introduce a small runtime-agnostic subject-token source abstraction, tentatively:
```rust
trait ProvideSubjectToken { ... }
struct SubjectToken {
token: String,
expires_at: Option<Timestamp>,
}
```
The exact public shape can follow the existing async trait/dyn-trait conventions. At minimum, provide:
- A caller-bound/static subject-token provider for request-scoped tokens.
- A file-backed subject-token provider preserving current Kubernetes and environment flows.
Update or add service-level credential providers so that the token source can be bound explicitly:
- AWS AssumeRoleWithWebIdentity.
- Azure Workload Identity Federation.
- Google external-account / Workload Identity Federation.
Service crates must continue to own role ARN, audience, subject-token type, tenant/client identity, token endpoint, exchange request, and response credential semantics. A subject-token provider only supplies the opaque assertion and optional source expiration.
## Security and lifecycle requirements
- Raw subject tokens must never appear in `Debug`, logs, errors, cache keys, or provider identity strings.
- A caller-bound provider must not share a token across independently constructed request identities.
- Known source expiration must participate in pre-I/O validity checks; unknown expiration remains subject to authoritative service validation.
- Exchanged cloud credentials may use the existing `Signer` or `Granter` source caches, but subject-token state must not be inserted into a global/default provider chain automatically.
- Existing file/env constructors and discovery behavior remain compatible.
- All I/O remains routed through `Context`, with native/WASM `MaybeSend` compatibility.
## Acceptance criteria
- A caller-provided token can drive AWS, Google, and Azure web-identity exchanges without host-side cloud protocol code or a fake filesystem path.
- Existing token-file and environment-based flows continue to work.
- Deterministic tests prove per-provider request construction, request-level token isolation, expiration handling, and redaction.
- Documentation includes a server-side, per-request example and explains that the host remains responsible for authenticating and authorizing the incoming identity before invoking reqsign.
Web identity remains a `ProvideCredential` capability, consistent with #807; this issue does not add a new `GrantCredential` flow. It is complementary to the broader Google WIF tracking in #367 by addressing the caller-supplied subject-token API across services.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] feat: accept caller-provided subject tokens in web-identity providers [opendal-reqsign]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #861: feat: accept caller-provided subject tokens in web-identity providers
URL: https://github.com/apache/opendal-reqsign/issues/861
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org