Skip to content

fix(entraid): update rolesFromAWSRolesClaim to handle Entra ID JWT with a single AWS IAM role - #917

Merged
Gearheads merged 2 commits into
fidelity:mainfrom
fidelity-contributions:fix/entra-id-with-one-iam-role
Sep 30, 2026
Merged

Gearheads merged 2 commits into
fidelity:mainfrom
fidelity-contributions:fix/entra-id-with-one-iam-role

Conversation

@Gearheads

@Gearheads Gearheads commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:
This change will fix the logic within the rolesFromAWSRolesClaim function to handle an Entra ID JWT token that contains a single AWS IAM role. Also, we have created a unit test for this use case.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes # This PR will fix the issue of a user being part of a single AWS IAM role. Example error message:

Error: authenticating using provider entraid-oauth: resolving role-arn:
 no aws roles found: unexpected type for https://aws.amazon.com/roles claim: string

Turns out Entra ID will return a JWT that contains a string value, instead of an array, if the user is part of a single AWS IAM role.

This branch can be deleted once it is merged.

…th a single AWS IAM role

This change will fix the logic within the rolesFromAWSRolesClaim function to handle an Entra ID JWT token that contains a single AWS IAM role. Also, we have created a unit test for this use case.

Signed-off-by: Casale, Robert <robert.casale@fmr.com>
kishoregv
kishoregv previously approved these changes Sep 29, 2026
This change will update the labeler GitHub Action such that it has access to add a label to the newly created PR. This GitHub Action recently started failing, so this change should fix the issue.

Signed-off-by: Casale, Robert <robert.casale@fmr.com>
@osfidelity
osfidelity force-pushed the fix/entra-id-with-one-iam-role branch from fc481dc to 38194c6 Compare September 30, 2026 15:01
@Gearheads
Gearheads merged commit 8269f5c into fidelity:main Sep 30, 2026
14 of 15 checks passed
@Gearheads
Gearheads deleted the fix/entra-id-with-one-iam-role branch September 30, 2026 15:50
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