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

Support filtering roles that contain a path #344

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

dblackhall-tyro
Copy link
Contributor

In my organisation some roles have been created with paths:
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names

This PR extends the matching logic to match on roles with a path

@tilfin
Copy link
Member

tilfin commented Jun 11, 2024

I believe we need to modify the filterByTargetRole generation process. It doesn't seem to work correctly when the path consists of multiple parts. For instance, if a role path is structured like /company/dept/roleName, the current implementation might not handle it properly.

Additionally, when logging in with federated credentials, does the Management Console display usernames with paths that consist of multiple parts?

Example:

  • Role path: /company/dept/
  • Username displayed in the Management Console: company/dept/roleName

@dblackhall-tyro
Copy link
Contributor Author

I believe we need to modify the filterByTargetRole generation process. It doesn't seem to work correctly when the path consists of multiple parts. For instance, if a role path is structured like /company/dept/roleName, the current implementation might not handle it properly.

Going back and looking at the code again I think I understand what you mean. Should I move the logic into the convertComplexTarget function?

Additionally, when logging in with federated credentials, does the Management Console display usernames with paths that consist of multiple parts?

This I can be helpful with. The management console displays only the roleName e.g roleName/[email protected]

@tilfin tilfin changed the base branch from main to fix/filter-with-role-path October 26, 2024 14:33
@tilfin
Copy link
Member

tilfin commented Oct 26, 2024

I apologize for the delay. After carefully reviewing the PR, I can confirm that this implementation is correct and there are no issues with the processing. Thank you for your patience and contribution.

@tilfin tilfin merged commit 716ad12 into tilfinltd:fix/filter-with-role-path Oct 26, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants