yuqi1129 opened a new pull request, #11735: URL: https://github.com/apache/gravitino/pull/11735
### What changes were proposed in this pull request? Introduce a pluggable `WebIdentityTokenSource` SPI for obtaining the OIDC token used by AWS STS `AssumeRoleWithWebIdentity`, plus a built-in `file` source that reads the token from a configured file path (falling back to `AWS_WEB_IDENTITY_TOKEN_FILE`). `AwsIrsaCredentialGenerator` is refactored to retrieve the token through the SPI instead of reading the env-driven file directly. Existing IRSA behavior is unchanged. ### Why are the changes needed? Different deployments source the WebIdentity token differently (a file on disk for K8s/IRSA, OAuth2 client_credentials for VMs, JWT bearer for service accounts, ...). A pluggable SPI keeps the STS / scoped-policy logic generic and lets each deployment plug in the right token source. Fix: #11734 ### Does this PR introduce _any_ user-facing change? Yes, two new optional property keys: - `s3-web-identity-token-source` — selects the source (default `file`) - `s3-web-identity-token-file` — file path used by the `file` source (falls back to `AWS_WEB_IDENTITY_TOKEN_FILE` if absent) No existing keys or default behavior change; IRSA setups relying on `AWS_WEB_IDENTITY_TOKEN_FILE` keep working. ### How was this patch tested? - New unit tests under `bundles/aws/src/test/java/org/apache/gravitino/s3/credential/webidentity/` cover file source path resolution, env-var fallback, re-read on each call, error paths, and source selection through the factory. - Refactored `TestAwsIrsaCredentialGenerator`. - `./gradlew :bundles:aws:test -PskipITs` passes. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
