Skip to content

common/saml: Fix metadata to serve only the leaf of a PEM chain - #26273

Merged
BeryJu merged 2 commits into
mainfrom
fix-saml-metadata
Sep 21, 2026
Merged

BeryJu merged 2 commits into
mainfrom
fix-saml-metadata

Conversation

@PeshekDotDev

Copy link
Copy Markdown
Contributor

Details

Since we only strip the header and footer to add our cert to saml metadata, we accidentally add the whole PEM chain to the metadata.

What does this PR change?

We parse the certificate and only return the leaf certificate.

Why is this change needed?

Some providers cannot properly import our certificate without this change

How was this tested?

Manual and added tests

Linked issues

Closes #26268


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.

@PeshekDotDev PeshekDotDev self-assigned this Sep 18, 2026
@PeshekDotDev
PeshekDotDev requested a review from a team as a code owner September 18, 2026 22:56
@PeshekDotDev PeshekDotDev added the backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8 label Sep 18, 2026
@netlify

netlify Bot commented Sep 18, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit ba46edf
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6aadc1abca653b000810aca2
😎 Deploy Preview https://deploy-preview-26273--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 Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.97%. Comparing base (bafc5e1) to head (b5894e4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26273      +/-   ##
==========================================
- Coverage   92.00%   91.97%   -0.04%     
==========================================
  Files        1175     1175              
  Lines       76288    76318      +30     
  Branches     4056     4056              
==========================================
+ Hits        70192    70196       +4     
- Misses       6054     6080      +26     
  Partials       42       42              
Flag Coverage Δ
conformance 33.48% <15.78%> (-0.02%) ⬇️
e2e 38.24% <23.68%> (-0.02%) ⬇️
integration 29.77% <15.78%> (-0.46%) ⬇️
rust 42.89% <ø> (ø)
unit 93.56% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.57% <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 Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

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

gh run download 35403803953 -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-b5894e4fe3777836f2d4c9cc1756f6b5be8839fd
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-b5894e4fe3777836f2d4c9cc1756f6b5be8839fd

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

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Sep 21, 2026
@BeryJu
BeryJu merged commit c4731a8 into main Sep 21, 2026
146 checks passed
@BeryJu
BeryJu deleted the fix-saml-metadata branch September 21, 2026 15:31
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Sep 21, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.8 created: #26319

PeshekDotDev added a commit that referenced this pull request Sep 21, 2026
…ry-pick #26273 to version-2026.8) (#26319)

common/saml: Fix metadata to serve only the leaf of a PEM chain (#26273)

* common/saml: Fix metadata to serve only the leaf of a PEM chain

* clean up

Co-authored-by: Connor Peshek <[email protected]>
kensternberg-authentik added a commit that referenced this pull request Sep 21, 2026
* main: (38 commits)
  providers/oauth2: track RP logins per session for logout (#26310)
  common/saml: Fix metadata to serve only the leaf of a PEM chain (#26273)
  website: bump the build group in /website with 3 updates (#26292)
  website/docs: rac: explain authorization reuse and disconnect behavior (#26288)
  core: bump astral-sh/uv from 0.12.16 to 0.12.17 in /lifecycle/container (#26294)
  sources/kerberos, sources/ldap: Save source connections when linking an existing user/group (#26059)
  core: bump goauthentik/fips-python from `863aded` to `05c6c36` in /lifecycle/container (#26295)
  core: bump library/node from `14bf3ea` to `d82e1d0` in /lifecycle/container (#26240)
  ci: bump the codeql group across 1 directory with 3 updates (#26304)
  ci: bump codecov/codecov-action from 7.1.0 to 7.1.1 in /.github/actions/test-results (#26307)
  ci: bump codecov/codecov-action from 7.1.0 to 7.1.1 (#26305)
  ci: bump taiki-e/install-action from 2.87.13 to 2.87.15 in /.github/actions/setup (#26306)
  core: bump debugpy from 1.8.21 to 1.8.22 (#26303)
  core: bump openid/conformance-suite from release-v5.3.0 to release-v5.3.1 in /tests/openid_conformance (#26301)
  core: bump jwcrypto from 1.6.0 to 1.6.1 (#26302)
  core: bump openid/conformance-suite/nginx from release-v5.3.0 to release-v5.3.1 in /tests/openid_conformance (#26300)
  core: bump ruff from 0.16.7 to 0.16.8 (#26299)
  core: bump sentry-sdk from 2.69.1 to 2.69.2 (#26298)
  core: bump goauthentik/selenium from 151.0-ak-0.61.0 to 152.0-ak-0.62.0 in /tests/e2e (#26293)
  website/docs: fix two word-swap typos (#26283)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

SAML Metadata file invalid Certificate

2 participants