Skip to content

source/saml: Add forceauthn to saml authnrequest - #20883

Merged
PeshekDotDev merged 5 commits into
mainfrom
saml-source-forceauthn
Apr 1, 2026
Merged

PeshekDotDev merged 5 commits into
mainfrom
saml-source-forceauthn

Conversation

@PeshekDotDev

@PeshekDotDev PeshekDotDev commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Details

Closes #20711


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@netlify

netlify Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit bf9030e
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69c62a7e45f15000089753c9
😎 Deploy Preview https://deploy-preview-20883--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 21b97b1
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69c5aa084b7c820008d5fd49
😎 Deploy Preview https://deploy-preview-20883--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PeshekDotDev
PeshekDotDev force-pushed the saml-source-forceauthn branch from 919b7f3 to 25a9dde Compare March 13, 2026 07:50
@codecov

codecov Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.81%. Comparing base (0a73322) to head (45e205f).
⚠️ Report is 63 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20883   +/-   ##
=======================================
  Coverage   92.81%   92.81%           
=======================================
  Files        1000     1001    +1     
  Lines       56627    56647   +20     
  Branches      425      425           
=======================================
+ Hits        52558    52579   +21     
+ Misses       4069     4068    -1     
Flag Coverage Δ
conformance 37.35% <5.00%> (-0.01%) ⬇️
e2e 42.86% <10.00%> (-0.01%) ⬇️
integration 22.20% <5.00%> (-0.01%) ⬇️
rust 0.23% <ø> (ø)
unit 91.72% <100.00%> (+0.74%) ⬆️
unit-migrate 91.81% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-45e205f813aff91161502d656020675bc527df51
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-45e205f813aff91161502d656020675bc527df51

Afterwards, run the upgrade commands from the latest release notes.

@headlesssetup

Copy link
Copy Markdown

FWIW, I looked at the code and it is identical to my current custom implementation. Thank you for jumping on this so quickly @PeshekDotDev !

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Small code quality suggestion, but it's trivial.

<ak-switch-input
name="forceAuthn"
label=${msg("Force authentication")}
?checked=${this.instance?.forceAuthn ?? false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?checked=${!!this.instance?.forceAuthn} is fine here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Alright, I updated that

@PeshekDotDev
PeshekDotDev force-pushed the saml-source-forceauthn branch from 25a9dde to d45b37a Compare March 26, 2026 21:48
@netlify

netlify Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 21b97b1
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69c5aa087f353e0008e6ce6c
😎 Deploy Preview https://deploy-preview-20883--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PeshekDotDev

Copy link
Copy Markdown
Contributor Author

FWIW, I looked at the code and it is identical to my current custom implementation. Thank you for jumping on this so quickly @PeshekDotDev !

Of course! I'm always happy to do some SAML work haha. If you find anything else, please let me know

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Mar 30, 2026
@PeshekDotDev
PeshekDotDev merged commit 8dddc05 into main Apr 1, 2026
105 checks passed
@PeshekDotDev
PeshekDotDev deleted the saml-source-forceauthn branch April 1, 2026 03:54
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Apr 1, 2026
kensternberg-authentik added a commit that referenced this pull request Apr 8, 2026
* main:
  packages/django-postgres-cache: fix expiry and delete (#21307)
  website/docs: entra scim: add note about validator (#21273)
  core: bump djangorestframework-stubs[compatible-mypy] from 3.16.8 to 3.16.9 (#21294)
  web: bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /web (#21301)
  blueprints: rework one-time import (#18074)
  lifecycle/aws: bump aws-cdk from 2.1115.0 to 2.1115.1 in /lifecycle/aws (#21293)
  core, web: update translations (#21288)
  core: bump sentry-sdk from 2.56.0 to 2.57.0 (#21295)
  core: bump aws-cdk-lib from 2.245.0 to 2.246.0 (#21296)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#21290)
  ci: bump getsentry/action-release from 3.5.0 to 3.6.0 (#21298)
  ci: bump taiki-e/install-action from 2.70.3 to 2.70.4 in /.github/actions/setup (#21299)
  website/docs: add example recovery flow with MFA (#19497)
  website/docs: format cache settings (#21289)
  source/saml: Add forceauthn to saml authnrequest (#20883)
davepgreene pushed a commit to davepgreene/authentik that referenced this pull request Apr 13, 2026
* source/saml: Add ForceAuthn support to SAML AuthnRequest
davepgreene pushed a commit to davepgreene/authentik that referenced this pull request Apr 13, 2026
* source/saml: Add ForceAuthn support to SAML AuthnRequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

SAML Source does not support ForceAuthn

4 participants