feat: Microsoft Entra provider kind; CSP form-action allows discovered IdP endpoints (1.4.0) #30

Open
oliver.maklott wants to merge 0 commits from oliver.maklott/feat-entra into main AGit

Fixes the failed Microsoft login: the CSP form-action only allowed issuer origins, so the redirect from /api/auth/login to login.microsoftonline.com was blocked when the instance used the Entra v1 issuer (sts.windows.net).

  • form-action now also lists the discovered authorization and end-session endpoint origins (D026). The login page waits for discovery for up to 5 s; other responses start it in the background.
  • M9: provider kind entra. Only the single-tenant v2 issuer is accepted. oid/tid are stored on user_identities (migration 0009) and back-filled on login. tid is checked against the issuer. preferred_username is the email fallback (D027).
  • The mock IdP supports issuer paths, extra claims and client_secret_post. The e2e provider switch now runs Authentik mock → Entra-style mock.
  • Operations guide: Entra app registration.

Release 1.4.0. lvbcmd 1.1.0 (separate PR) writes OIDC_KIND=entra and requires this version.

Local: deno task check ok, deno task test 97/97, e2e 42/42.

🤖 Generated with Claude Code

Fixes the failed Microsoft login: the CSP form-action only allowed issuer origins, so the redirect from /api/auth/login to login.microsoftonline.com was blocked when the instance used the Entra v1 issuer (sts.windows.net). - form-action now also lists the discovered authorization and end-session endpoint origins (D026). The login page waits for discovery for up to 5 s; other responses start it in the background. - M9: provider kind `entra`. Only the single-tenant v2 issuer is accepted. oid/tid are stored on user_identities (migration 0009) and back-filled on login. tid is checked against the issuer. preferred_username is the email fallback (D027). - The mock IdP supports issuer paths, extra claims and client_secret_post. The e2e provider switch now runs Authentik mock → Entra-style mock. - Operations guide: Entra app registration. Release 1.4.0. lvbcmd 1.1.0 (separate PR) writes OIDC_KIND=entra and requires this version. Local: deno task check ok, deno task test 97/97, e2e 42/42. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Login and logout redirects to Entra were blocked by the CSP: form-action
listed only issuer origins, but with the v1 issuer (sts.windows.net) the
authorize and end-session endpoints live on login.microsoftonline.com.
form-action now also lists the origins of the discovered endpoints.

M9: provider kind `entra` with the single-tenant v2 issuer (other forms
are refused at startup), oid/tid stored on user_identities (migration
0009, back-filled on login), tid checked against the issuer, UPN as
email fallback. The e2e provider switch now goes from the Authentik
mock to an Entra-style mock. Operations guide for the app registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore: release 1.4.0
Some checks failed
Test / test (pull_request) Successful in 39s
Check / check (pull_request) Successful in 59s
E2E / e2e (pull_request) Successful in 4m28s
Test / test (push) Successful in 43s
Check / check (push) Successful in 1m12s
Publish / publish (push) Failing after 15m10s
E2E / e2e (push) Failing after 15m10s
58058f7dc7
Microsoft Entra as login provider (M9, D027) and a CSP form-action that
allows the IdP's discovered endpoints (D026).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks failed
Test / test (pull_request) Successful in 39s
Check / check (pull_request) Successful in 59s
E2E / e2e (pull_request) Successful in 4m28s
Test / test (push) Successful in 43s
Check / check (push) Successful in 1m12s
Publish / publish (push) Failing after 15m10s
E2E / e2e (push) Failing after 15m10s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/30/head:oliver.maklott/feat-entra
git switch oliver.maklott/feat-entra

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff oliver.maklott/feat-entra
git switch oliver.maklott/feat-entra
git rebase main
git switch main
git merge --ff-only oliver.maklott/feat-entra
git switch oliver.maklott/feat-entra
git rebase main
git switch main
git merge --no-ff oliver.maklott/feat-entra
git switch main
git merge --squash oliver.maklott/feat-entra
git switch main
git merge --ff-only oliver.maklott/feat-entra
git switch main
git merge oliver.maklott/feat-entra
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mehrerau/lvb!30
No description provided.