017, 018: AWS KMS credentials config restructure & EKS workload authentication#97
Conversation
017 - restructure AWS KMS config to group credential providers under a
`credentials` node, with backward compat for existing flat fields
018 - add IRSA (AssumeRoleWithWebIdentity) and EKS Pod Identity
credential providers, with shared async refresh base class
References: kroxylicious/kroxylicious#1295, kroxylicious/kroxylicious#3684
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
017 and 018 were claimed by PR kroxylicious#97. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sbarker@redhat.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Restructure AWS KMS configuration to group all credential providers under a `credentials` node (CredentialsConfig record). Existing top-level `longTermCredentials` and `ec2MetadataCredentials` keys remain as deprecated backward-compatible aliases — the compact constructor silently migrates them into the `credentials` node. Add EKS Pod Identity credential provider that retrieves temporary credentials from the local Pod Identity Agent endpoint. Falls back to AWS_CONTAINER_CREDENTIALS_FULL_URI and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variables. Design proposal: kroxylicious/design#97 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
robobario
left a comment
There was a problem hiding this comment.
Thanks @oleksiyp great to have your proposal, support for EKS auth would be brilliant to have.
Have put up some points, mostly asking for elaboration on the new config options. Also a paragraph of justification for using environment variables would be great as we have so far preferred explicit YAML configuration.
@k-wall is also expert in the AWS KMS so keen for him to take a look.
…ustification - Add comprehensive config options tables for IRSA and Pod Identity with field descriptions, defaults, and env var fallbacks - Add fail-fast documentation (KmsException at construction time) - Add paragraph justifying env var defaults (platform-injected values, separation of concerns, AWS SDK convention) - Document durationSeconds range (900-43200), roleSessionName default and regex, stsEndpointUrl derivation, credentialLifetimeFactor behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
|
@robobario addressed comments you provided in d711ee5 |
017 and 018 were claimed by PR kroxylicious#97. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sbarker@redhat.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Since Config.region is already required in YAML, there is no need for a separate stsRegion field or AWS_REGION env var fallback. The STS endpoint is derived as https://sts.<Config.region>.amazonaws.com by default. stsEndpointUrl remains as an optional override for non-standard partitions (China: amazonaws.com.cn, ISO: c2s.ic.gov). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
|
@ddaviesbrackett-dwp I know you run Kroxylicious on EC2 so are closer to the issues than me. If you have bandwidth would you mind reviewing? |
Per k-wall's review, the project has a deprecation policy even pre-1.0, so "nominally acceptable breaking changes" was incorrect framing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
|
@robobario do you have any other requests to fix in this proposals? |
|
nope, looks good to me thank you! I'll put a call out on the dev list to see if anyone else wants to review it, else will merge it in 24 hours. |
tombentley
left a comment
There was a problem hiding this comment.
Thanks for this! It basically LGTM.
Claude found a few minor points which we can improve. They're mostly just clarifying the proposal itself, not changing what's being proposed.
Thanks again.
- Acknowledge Accept: application/json is undocumented in STS API - Add IAM permissions note for assumed role - Add durationSeconds effective maximum (role MaxSessionDuration) - Add credentialLifetimeFactor valid range (0, 1) - Extend fail-fast to validate roleSessionName regex and durationSeconds - Add Pod Identity trust boundary note (link-local HTTP, same as IMDS) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
|
@tombentley checked comments and fixed what makes sense to me in 83ee98d |
|
@robobario can you please merge? |
|
Done, thanks for that! |
Restructure AWS KMS configuration to group all credential providers under a `credentials` node (CredentialsConfig record). Existing top-level `longTermCredentials` and `ec2MetadataCredentials` keys remain as deprecated backward-compatible aliases — the compact constructor silently migrates them into the `credentials` node. Add EKS Pod Identity credential provider that retrieves temporary credentials from the local Pod Identity Agent endpoint. Falls back to AWS_CONTAINER_CREDENTIALS_FULL_URI and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variables. Design proposal: kroxylicious/design#97 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
Restructure AWS KMS configuration to group all credential providers under a `credentials` node (CredentialsConfig record). Existing top-level `longTermCredentials` and `ec2MetadataCredentials` keys remain as deprecated backward-compatible aliases — the compact constructor silently migrates them into the `credentials` node. Add EKS Pod Identity credential provider that retrieves temporary credentials from the local Pod Identity Agent endpoint. Falls back to AWS_CONTAINER_CREDENTIALS_FULL_URI and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variables. Design proposal: kroxylicious/design#97 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksiy Pylypenko <oleksiy.pylypenko@gmail.com>
Summary
Two design proposals for the AWS KMS Record Encryption filter:
017 — Credentials config restructure: Groups all credential providers under a single
credentialsYAML node (credentials.longTerm,credentials.ec2Metadata, etc.) instead of flat top-level fields. Backward compatible — existinglongTermCredentials/ec2MetadataCredentialsYAML keeps working via migration in the record's compact constructor.018 — EKS workload authentication (IRSA & Pod Identity): Adds two new credential providers for Amazon EKS pods. IRSA exchanges a projected OIDC token via STS
AssumeRoleWithWebIdentity; Pod Identity calls the local Pod Identity Agent. Both return temporary credentials compatible with the existing SigV4 signing. Includes extraction of a shared async-refresh base class fromEc2MetadataCredentialsProvider. Depends on 017 for config structure.Prompted by review feedback on the implementation PR kroxylicious/kroxylicious#3684.
References: kroxylicious/kroxylicious#1295, kroxylicious/kroxylicious#3684
🤖 Generated with Claude Code