Skip to content
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

[Namespace restriction] Regex cannot be as strict as expected #341

Open
smart-duck opened this issue Jun 23, 2022 · 0 comments
Open

[Namespace restriction] Regex cannot be as strict as expected #341

smart-duck opened this issue Jun 23, 2022 · 0 comments

Comments

@smart-duck
Copy link

Hello,
We activated the namespace restriction feature with regex support.
We are not able to use strict regular expressions because you "normalize" the regex by adding the ARN prefix.
It prevents us to totally master our regular expressions.
By example, for the role "arn:aws:iam::12345678912:role/path_of_my_role/MyRole" we are not able to use the regex "^arn:aws:iam::12345678912:role/path_of_my_role/MyRole$". It is also not possible to use the regex "MyRole".
As you normalize the regex, in fact, it protects against some security issues but this should be at least documented through a note.

normalized := r.iam.RoleARN(rolePattern)

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant