Skip to content

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 18, 2025

If an Alias is imported referenced using fromAliasName, it doesn't have an IKey object it's associated with.

If an Alias is then used in place of a Key and the consuming site uses the IKey.keyRef interface to obtain the key ARN, we should return the Alias ARN and not try to delegate to the underlying key... because there is none!

Closes #35520


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…fromAliasName

If an Alias is ~~imported~~ referenced using `fromAliasName`, it doesn't have an
`IKey` object it's associated with.

If an Alias is then used in place of a Key and the consuming site uses
the `IKey.keyRef` interface to obtain the key ARN, we should return the
Alias ARN and not try to delegate to the underlying key... because there
is none!
@rix0rrr rix0rrr requested a review from a team September 18, 2025 11:49
@aws-cdk-automation aws-cdk-automation requested a review from a team September 18, 2025 11:50
@github-actions github-actions bot added bug This issue is a bug. p2 labels Sep 18, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 18, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@mrgrain mrgrain added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Sep 18, 2025
@mrgrain mrgrain changed the title fix(kms): Cannot access aliasTargetKey on an Alias imported by Alias.fromAliasName fix(kms): cannot access aliasTargetKey on an Alias imported by Alias.fromAliasName Sep 18, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 18, 2025 12:20

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Copy link
Contributor

mergify bot commented Sep 18, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit c0c9933 into main Sep 18, 2025
47 of 48 checks passed
@mergify mergify bot deleted the huijbers/alias-fromname-regression branch September 18, 2025 12:21
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logs: encryption using Alias stopped working
4 participants