Skip to content

fix(access): Use AAL from the matched authz rule#534

Merged
bheesham merged 4 commits into
mozilla-iam:masterfrom
bheesham:use-aal-from-matched-authz-rule
May 13, 2026
Merged

fix(access): Use AAL from the matched authz rule#534
bheesham merged 4 commits into
mozilla-iam:masterfrom
bheesham:use-aal-from-matched-authz-rule

Conversation

@bheesham
Copy link
Copy Markdown
Contributor

Going back to fix something Copilot complained about but I agreed with.

Instead of using the first AAL, or overwriting it at all, we use the one defined in the authz rule which grants access. We do not evaluate all rules, and stop simply at the first one that passes. If none pass, then access is not granted.

Jira: Untracked

Going back to fix something Copilot complained about but I agreed with.

Instead of using the _first_ AAL, or overwriting it at all, we use the
one defined in the authz rule which grants access. We do not evaluate
all rules, and stop simply at the first one that passes. If none pass,
then access is not granted.

Jira: Untracked
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 Auth0 access rule evaluation so MFA/AAL requirements come from the authorization rule that grants access, supporting different MFA requirements for different groups on the same application.

Changes:

  • Defaults AAL separately and assigns required AAL only when a user/group authorization rule matches.
  • Stops evaluating access rules after the first successful authorization match.
  • Updates logging and comments around access decision behavior.
Comments suppressed due to low confidence (1)

tf/actions/accessRules.js:286

  • This break has the same deny-all ordering issue as the authorized-user branch: a later duplicate app entry with no users or groups will no longer deny access, despite the comment above saying any such app should bail out early. Please preserve the deny-all override before granting based on the first matching group rule, or adjust the stated access policy.
          console.log(`${event.user.user_id} was in authorized_groups`);
          required_aal = app.AAL || default_aal;
          authorized = true;
          break;

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

Comment thread tf/actions/accessRules.js Outdated
Comment thread tf/actions/accessRules.js Outdated
Comment thread tf/actions/accessRules.js Outdated
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 1 comment.

Comment thread tf/actions/accessRules.js Outdated
@bheesham bheesham force-pushed the use-aal-from-matched-authz-rule branch from eb378a9 to 7ce3c1d Compare May 13, 2026 20:14
@bheesham bheesham requested a review from Copilot May 13, 2026 20:15
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 1 comment.

Comment thread tf/tests/accessRules.test.js Outdated
@bheesham bheesham force-pushed the use-aal-from-matched-authz-rule branch from 7ce3c1d to 8cb73d5 Compare May 13, 2026 20:26
@bheesham bheesham requested a review from Copilot May 13, 2026 20:26
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 no new comments.

@bheesham bheesham merged commit c3e7a2e into mozilla-iam:master May 13, 2026
7 checks passed
@bheesham bheesham deleted the use-aal-from-matched-authz-rule branch May 13, 2026 20:30
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