Expand description
OIDC/STS authentication for the S3 proxy gateway.
This crate implements the AssumeRoleWithWebIdentity STS API, allowing
workloads like GitHub Actions to exchange OIDC tokens for temporary S3
credentials scoped to specific buckets and prefixes.
§Integration
Register STS routes via route_handler::StsRouterExt:
ⓘ
use multistore_sts::route_handler::StsRouterExt;
let router = Router::new()
.with_sts(config, jwks_cache, token_key);§Flow
- Client obtains a JWT from their OIDC provider (e.g., GitHub Actions ID token)
- Client calls
AssumeRoleWithWebIdentitywith the JWT and desired role - This crate validates the JWT against the OIDC provider’s JWKS
- Checks trust policy (issuer, audience, subject conditions)
- Mints temporary credentials (AccessKeyId/SecretAccessKey/SessionToken)
- Returns credentials to the client
The client then uses these credentials to sign S3 requests normally.
Re-exports§
pub use jwks::JwksCache;pub use request::try_parse_sts_request;pub use responses::build_sts_error_response;pub use responses::build_sts_response;pub use sealed_token::TokenKey;
Modules§
- jwks
- JWKS fetching and JWT verification.
- request
- STS request parsing.
- responses
- STS XML response serialization.
- route_
handler - Route handler for STS
AssumeRoleWithWebIdentityrequests. - sealed_
token - Self-contained encrypted session tokens using AES-256-GCM.
- sts
- STS credential minting.
Functions§
- assume_
role_ with_ web_ identity - Validate an OIDC token and mint temporary credentials.
- try_
handle_ sts - Try to handle an STS request. Returns
Some((status, xml))if the query contained an STS action, orNoneif it wasn’t an STS request.