dimas-b commented on code in PR #2815:
URL: https://github.com/apache/polaris/pull/2815#discussion_r2448782340
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/aws/AwsStorageConfigurationInfo.java:
##########
@@ -46,7 +46,11 @@ public static ImmutableAwsStorageConfigurationInfo.Builder
builder() {
// Technically, it should be
^arn:(aws|aws-cn|aws-us-gov):iam::(\d{12}):role/.+$,
@JsonIgnore
- public static final String ROLE_ARN_PATTERN =
"^arn:(aws|aws-us-gov):iam::(\\d{12}):role/.+$";
+ // Account id may be a 12-digit AWS account number or a vendor-specific
namespace that must
+ // not be purely numeric (must start with a letter, underscore or hyphen
followed by allowed
+ // chars).
+ public static final String ROLE_ARN_PATTERN =
+
"^(arn|urn):(aws|aws-us-gov|ecs):iam::((\\d{12})|([a-zA-Z_-][a-zA-Z0-9_-]*)):role/.+$";
Review Comment:
What I was trying to say is that expanding this RegEx to cover all vendors
does not seem maintainable. As I commented in another thread, I wonder if we
could refactor the code to have ECS-specific login in separate classes
:thinking:
--
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]