Skip to content

fix(access): allow apps to be defined multiple times#533

Merged
bheesham merged 1 commit into
mozilla-iam:masterfrom
bheesham:allow-different-apps-to-define-multiple-groups
May 13, 2026
Merged

fix(access): allow apps to be defined multiple times#533
bheesham merged 1 commit into
mozilla-iam:masterfrom
bheesham:allow-different-apps-to-define-multiple-groups

Conversation

@bheesham
Copy link
Copy Markdown
Contributor

Because we need to support multiple tiles for the same application, we need to assert authorization after we've read all of the applications.

Jira: IAM-1970

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Auth0 post-login access rule evaluation so that a single client/application can appear multiple times in apps.yml (e.g., multiple dashboard tiles pointing at the same client_id) while still authorizing a user if any matching entry grants access.

Changes:

  • Adjust access decision logic to defer the final “not in group/user” denial until after all matching app entries have been evaluated.
  • Extend the test apps.yml fixture to include a duplicated client_id with different authorized groups.
  • Add Jest coverage to validate allow/deny behavior when a client is defined multiple times.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tf/actions/accessRules.js Defers the final authorization denial until after iterating all matching app entries, enabling union-style authorization across duplicates.
tf/tests/modules/apps.yml.js Adds fixture entries where the same client_id is defined twice with different authorized_groups.
tf/tests/accessRules.test.js Adds tests proving users in either authorized group are allowed, while others are denied, for a duplicated client_id.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tf/actions/accessRules.js
Because we need to support multiple tiles _for the same_ application, we need
to assert authorization _after_ we've read all of the applications.

Jira: IAM-1970
@bheesham bheesham force-pushed the allow-different-apps-to-define-multiple-groups branch from 993a992 to 07c045e Compare May 13, 2026 15:28
@bheesham bheesham requested a review from Copilot May 13, 2026 15:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread tf/actions/accessRules.js
Comment thread tf/actions/accessRules.js
@bheesham bheesham merged commit 44caede into mozilla-iam:master May 13, 2026
7 checks passed
@bheesham bheesham deleted the allow-different-apps-to-define-multiple-groups branch May 13, 2026 15:52
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