Skip to content

providers/saml: Add ability to select encryption algorithm - #27009

Merged
PeshekDotDev merged 9 commits into
mainfrom
providers/saml-encryption-algorithm
Oct 20, 2026
Merged

PeshekDotDev merged 9 commits into
mainfrom
providers/saml-encryption-algorithm

Conversation

@PeshekDotDev

Copy link
Copy Markdown
Contributor

Details

When making a SAML or WS-FED provider, users can now select which encryption algorithm they want to use.

What does this PR change?

  • Makes the encryption algorithm for SAML and WS-FED selectable
  • Changes the default algorithm from AES128-CBC to AES256-GCM

Why is this change needed?

AES-256-GCM is the cipher NSA's CNSA 2.0 protocol profiles require and the mode XML Encryption 1.1 recommends over CBC.

How was this tested?

AES256-GCM manually tested against 5 different SAML providers.

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

@netlify

netlify Bot commented Oct 19, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit aaa2463
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ad5b2aa88e13a25c896adfc
😎 Deploy Preview https://deploy-preview-27009--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.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.34%. Comparing base (0b8a6d2) to head (22826aa).
⚠️ Report is 67 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27009      +/-   ##
==========================================
+ Coverage   92.25%   92.34%   +0.08%     
==========================================
  Files        1182     1188       +6     
  Lines       79149    80096     +947     
  Branches     4351     4351              
==========================================
+ Hits        73020    73962     +942     
- Misses       6063     6068       +5     
  Partials       66       66              
Flag Coverage Δ
conformance 32.30% <17.64%> (-0.26%) ⬇️
e2e 37.00% <17.64%> (-0.31%) ⬇️
integration 28.82% <17.64%> (-0.58%) ⬇️
rust 44.42% <ø> (ø)
unit 94.02% <100.00%> (+0.10%) ⬆️
unit-migrate 94.02% <100.00%> (+0.10%) ⬆️

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

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

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download this run's HTML report and traces, then open the report:

gh run download 39448776862 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-22826aacbffa52f17593702685c8e68f4dfcac17
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-22826aacbffa52f17593702685c8e68f4dfcac17

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

@PeshekDotDev
PeshekDotDev added this pull request to stack #27011 October 19, 2026 06:35

@dewi-tik dewi-tik 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.

Hope that you're happy with the docs changes I made.

@dominic-r dominic-r changed the title Providers/saml: Add ability to select encryption algorithm providers/saml: Add ability to select encryption algorithm Oct 19, 2026
Comment on lines +152 to +167
metadata = (
'<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" '
'xmlns:ds="http://www.w3.org/2000/09/xmldsig#" '
'entityID="http://localhost:8080/saml/metadata">'
"<md:SPSSODescriptor protocolSupportEnumeration="
'"urn:oasis:names:tc:SAML:2.0:protocol">'
'<md:KeyDescriptor use="encryption">'
f'<md:EncryptionMethod Algorithm="{AES256_GCM}"/>'
f"<ds:KeyInfo><ds:X509Data><ds:X509Certificate>{cert_body}"
"</ds:X509Certificate></ds:X509Data></ds:KeyInfo>"
"</md:KeyDescriptor>"
"<md:AssertionConsumerService "
'Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" '
'Location="http://localhost:8080/saml/acs" index="1"/>'
"</md:SPSSODescriptor></md:EntityDescriptor>"
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i'd prefer this as a fixture since its not parameterised

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Oct 19, 2026
@PeshekDotDev

Copy link
Copy Markdown
Contributor Author

@dewi-tik I always do, thank you!

@PeshekDotDev
PeshekDotDev merged commit f6e2acf into main Oct 20, 2026
147 checks passed
@PeshekDotDev
PeshekDotDev deleted the providers/saml-encryption-algorithm branch October 20, 2026 16:02
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Oct 20, 2026
kensternberg-authentik added a commit that referenced this pull request Oct 21, 2026
* main: (27 commits)
  lib/tracing: fix sentry tracing when otel is enabled (#27066)
  website/integrations: audiobookshelf: Fix Post Logout URI (#27074)
  web/user: fix agents tab flashing without license (#27069)
  root: bump cert-related deps due to emudhra (#27068)
  web: fix table fetch races and search select e2e lookups (#27059)
  core: bump astral-sh/uv from 0.13.1 to 0.13.3 in /lifecycle/container (#27037)
  policies: fix warning from setting non-string tracing data (#27062)
  root: annotate hot paths (#27052)
  website/docs: contributing: add guidelines for vendor contributions (#27032)
  providers/saml: Add ability to select encryption algorithm (#27009)
  lib: set postgres timezone on connection (#27053)
  core: add postgres connection info (#27024)
  ci: fix cargo deny for basic-toml (#27054)
  web/elements: keep ak-array-input edits through form submission (#27045)
  enterprise: optimize middleware (#27015)
  core: bump goauthentik/platform-ssh from 26.04-ak-0.72.0 to 26.04-ak-0.72.1 in /tests/e2e (#27038)
  core: bump ruff from 0.16.10 to 0.17.0 (#27044)
  core: bump sentry-sdk from 2.71.0 to 2.72.0 (#27043)
  core: bump django-postgres-extra from 3.0.0 to 3.0.1 (#27042)
  core: bump python-kadmin-rs from 0.7.4 to 0.7.5 (#27040)
  ...
kensternberg-authentik added a commit that referenced this pull request Nov 5, 2026
* main: (21 commits)
  policies: fix warning from setting non-string tracing data (#27062)
  root: annotate hot paths (#27052)
  website/docs: contributing: add guidelines for vendor contributions (#27032)
  providers/saml: Add ability to select encryption algorithm (#27009)
  lib: set postgres timezone on connection (#27053)
  core: add postgres connection info (#27024)
  ci: fix cargo deny for basic-toml (#27054)
  web/elements: keep ak-array-input edits through form submission (#27045)
  enterprise: optimize middleware (#27015)
  core: bump goauthentik/platform-ssh from 26.04-ak-0.72.0 to 26.04-ak-0.72.1 in /tests/e2e (#27038)
  core: bump ruff from 0.16.10 to 0.17.0 (#27044)
  core: bump sentry-sdk from 2.71.0 to 2.72.0 (#27043)
  core: bump django-postgres-extra from 3.0.0 to 3.0.1 (#27042)
  core: bump python-kadmin-rs from 0.7.4 to 0.7.5 (#27040)
  core: bump goauthentik/selenium from 152.0-ak-0.72.0 to 152.0-ak-0.72.1 in /tests/e2e (#27039)
  core: bump aiohttp from 3.14.3 to 3.14.4 (#27034)
  web/flow: fix remember-me being cleared by CSRF token rotation (#25205)
  web/theme: Remove the categories build from the theme (#26982)
  core: bump library/golang from `2f84bc9` to `4766793` in /lifecycle/container (#26996)
  providers/saml: verify logoutrequest/response signatures (#26534)
  ...
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.

3 participants