Support cross AWS account IAM role authentication#979
Merged
pditommaso merged 34 commits intomasterfrom Mar 9, 2026
Merged
Conversation
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ramonamela
reviewed
Feb 13, 2026
src/main/groovy/io/seqera/wave/service/CredentialServiceImpl.groovy
Outdated
Show resolved
Hide resolved
This reverts commit 36c06f6.
Signed-off-by: munishchouhan <hrma017@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
cristianrcv
approved these changes
Mar 6, 2026
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
@pditommaso, changes have been made as per review |
pditommaso
requested changes
Mar 6, 2026
src/main/groovy/io/seqera/wave/service/aws/AwsEcrService.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/io/seqera/wave/service/aws/AwsEcrService.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/io/seqera/wave/service/aws/AwsEcrService.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/io/seqera/wave/service/aws/AwsEcrService.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/io/seqera/wave/service/aws/AwsEcrService.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: munishchouhan <hrma017@gmail.com>
pditommaso
reviewed
Mar 9, 2026
…#991) * Refactor AwsCreds to use separate fields for role-based and static credential flows Replace overloaded accessKey/secretKey fields with dedicated roleArn/externalId fields for role-based auth, add factory methods (ofRole, ofKeys), and preserve backward-compatible cache hash for static credentials. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update spec and plan docs to reflect AwsCreds refactor with separate fields Align plan.md, service-interface.md, and data-model.md with the refactored AwsCreds that uses dedicated roleArn/externalId fields and ofRole()/ofKeys() factory methods instead of overloading accessKey/secretKey. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * updated specs Signed-off-by: munishchouhan <hrma017@gmail.com> * Renamed AwsJumpRoleCache → AwsRoleCache Signed-off-by: munishchouhan <hrma017@gmail.com> * fixed AwsEcrServiceTest Signed-off-by: munishchouhan <hrma017@gmail.com> --------- Signed-off-by: munishchouhan <hrma017@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: munishchouhan <hrma017@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pditommaso
approved these changes
Mar 9, 2026
Signed-off-by: munishchouhan <hrma017@gmail.com>
Member
Author
|
@pditommaso This PR contains unverified commits, So i cannot merge it, please ,erge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
assumeRoleArninstead of static AWS keys, Wave now assumes that role via STS to obtain temporary ECR credentialswave.aws.jump-role-arn) for cross-account access where Wave first assumes an intermediary role, then uses those credentials to assume the target roleStsClientConfigExpiredTokenExceptionon the jump role path by bypassing cache and retrying with fresh credentialsKey Changes
Production code:
build.gradle— Promotesoftware.amazon.awssdk:stsfromruntimeOnlytoimplementationContainerRegistryKeys.groovy— ParseassumeRoleArn/externalIdfrom Tower AWS credentials (previously logged a warning and returned null)AwsEcrService.groovy— Add role ARN detection, STS AssumeRole with jump role chaining, credential caching, retry, and error mappingStsClientConfig.groovy— New configurable retry settings for STS calls (wave.aws.sts.retry.*)AwsRoleCache.groovy— New tiered cache for jump role temporary credentialsAwsStsCredentials.groovy— Serializable wrapper for STS credentials (cache value)Documentation:
docs/configuration.md— Added configuration docs for cross-account role chaining, STS retry, and jump role cacheCLAUDE.md— AddedWAVE_AWS_JUMP_ROLE_ARN/WAVE_AWS_JUMP_EXTERNAL_IDenvironment variablesDesign docs:
specs/001-cross-account-iam-role-auth/— Spec, plan, tasks, research, data model, service interface, and STS integration contractsTests:
AwsEcrServiceTest.groovy— ~895 lines covering role detection, assume role flows, caching, retry, error mappingContainerRegistryKeysTest.groovy— 304 lines covering assume role credential parsingConfiguration
New properties:
wave.aws.jump-role-arn— Optional intermediary role ARN for cross-account chainingwave.aws.jump-external-id— Optional external ID for the jump rolewave.aws.jump-role-cache.duration— Jump role cache TTL (default: 45m)wave.aws.jump-role-cache.max-size— Maximum cache entries for jump role credentials (default: 100)wave.aws.sts.retry.delay/maxDelay/attempts/multiplier/jitter— STS retry tuningTest Plan
aws-us-gov), and China (aws-cn) partitionsExpiredTokenExceptionretry bypasses jump role cache