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

Role ARN with Path does not match Gorilla Mux URL #85

Open
joshuamorris3 opened this issue Jul 17, 2021 · 0 comments
Open

Role ARN with Path does not match Gorilla Mux URL #85

joshuamorris3 opened this issue Jul 17, 2021 · 0 comments

Comments

@joshuamorris3
Copy link

joshuamorris3 commented Jul 17, 2021

Hi,

I'm trying to use the /role-arn/{role arn} option for the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI. If I try using a role with a path in it e.g. arn:aws:iam::111122223333:role/division_abc/subdivision_xyz/custom_role it does not appear to work. I believe it is due to the Gorilla Mux path pattern used at https://github.com/awslabs/amazon-ecs-local-container-endpoints/blob/mainline/local-container-endpoints/config/config.go#L73, it doesn't allow expansion to multiple /.

I checked out the code and added a simple expansion RoleArnCredentialsPath = "/role-arn/{roleArn}/{roleName:.+}" and this fixed the problem. I did need to update the STS role session name to exclude any / as this is not allowed in the role session name.

Am I understanding this correctly or am I missing something? I can create a PR with a fix if needed.

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