-
Notifications
You must be signed in to change notification settings - Fork 332
Relax ARN validation logic #3071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Following up on apache#3005, which allowed a wide range of ARN values in the validation RegEx, remove an additional explicit check for `aws-cn` being present in the ARN as a sub-string. Update existing unit tests to process `aws-cn` ARNs as common `aws` ARNs. Note: the old validation code does not look correct because it used to check for `aws-cn` anywhere in the ARN string, not just in its "partition" component.
|
Related |
| break; | ||
| case "aws-cn": | ||
| roleARN = "arn:aws-cn:iam::012345678901:role/jdoe"; | ||
| region = "Beijing"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Beijing" is not a valid AWS region name. I know this is not explicitly part of the PR - but relates heavily to the scope and should be changed before we open this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should it be changed precisely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a unit test, it does not talk to AWS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test never asserted on the region name.
I think it's out of scope to let Polaris validate AWS specific region names.
Following up on #3005, which allowed a wide range of ARN values in the validation RegEx, remove an additional explicit check for
aws-cnbeing present in the ARN as a sub-string.Update existing unit tests to process
aws-cnARNs as commonawsARNs.Note: the old validation code does not look correct because it used to check for
aws-cnanywhere in the ARN string, not just in its "partition" component.Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)