Skip to content

fix(aad): Continue past optional MFA setup (AADSTS50203) - #3

Open
malhotra26 wants to merge 1 commit into
masterfrom
fix/aad-skip-optional-registration
Open

malhotra26 wants to merge 1 commit into
masterfrom
fix/aad-skip-optional-registration

Conversation

@malhotra26

Copy link
Copy Markdown

Summary

Cherry-picks upstream Versent/saml2aws#1541 (commit 16ef703, author Cameron Rollheiser), which is not yet merged upstream.

When Microsoft Entra shows the optional "set up an additional sign-in method" prompt (AADSTS50203) with a Not now option, saml2aws currently stops. This change follows Microsoft's own skip continuation so the AWS login completes. If registration is mandatory (502031), saml2aws still stops with an error.

Review notes

  • Two files only: pkg/provider/aad/aad.go (~50 lines) and its tests. No dependency, CI, or build changes.
  • The skip request posts back only the flow token, canary, and correlation ID from the Microsoft response, to the urlPostRedirect that Microsoft returns (relative URLs resolve to the same login host). No passwords or new credentials are sent. This is the same trust model as the existing urlSkipMfaRegistration GET.
  • Also fixes an existing bug: errors.Wrap(nil, ...) returned a nil error when the skip wasn't possible.
  • go mod verify, go vet, and go test ./... all pass on this branch.

After merge

Push a tag (e.g. v2.36.19-avahi.1) to run the release workflow and publish macOS and Windows binaries.

🤖 Generated with Claude Code

Entra can offer a deferrable authentication-method registration prompt.
Following its explicit skip continuation lets users finish login without
weakening mandatory registration policies.

(cherry picked from commit 16ef703)
@avahi-zachary-goold

Copy link
Copy Markdown
Collaborator

@malhotra26 the Build (ubuntu-latest) job is failing here, and macOS got cancelled as a result. #4 has the mirror image (macOS failing, ubuntu cancelled). The release-build jobs pass on all three runners and #4 only touches go.mod/go.sum, so this looks like a shared problem in the Build workflow rather than either change. Can you check the logs or re-run and get both PRs green? I'll review once they pass.

@malhotra26

Copy link
Copy Markdown
Author

Thanks, you were right that the Build workflow is the problem. Two issues hit both PRs: the browser tests download the Playwright driver from a retired Microsoft download location (404), and Go 1.22 test binaries won't load on current macOS (missing LC_UUID). #5 fixes the workflow and skips the Playwright driver tests for now with a TODO to re-enable them after a playwright-go upgrade. Once #5 is merged I'll re-run this PR.

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.

3 participants