Skip to content

tests: add security regression tests for OAuth JWT-bearer and flow session handling - #23190

Merged
melizeche merged 6 commits into
mainfrom
expand_tests
Jun 23, 2026
Merged

melizeche merged 6 commits into
mainfrom
expand_tests

Conversation

@melizeche

@melizeche melizeche commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

These cover existing protections that aren't currently tested, so we'd catch a regression (or a dependency behaviour change) if one slipped in. No production code changes.

  • JWT algorithm confusion: asserts the client_credentials JWT-bearer grant rejects alg:none, HS/RS key confusion (RSA public key used as an HMAC secret, with and without alg in the source JWK), and kid-swapped tokens.
  • Session fixation: the session key must rotate on login so a pre-login identifier can't be reused.
  • Logout: logout deletes the server-side AuthenticatedSession/Session rows, not just the cookie, so a captured cookie can't be replayed.

Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@melizeche
melizeche requested a review from a team as a code owner June 18, 2026 17:12
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit b80c251
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a3426e521be190008058dda
😎 Deploy Preview https://deploy-preview-23190--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.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (5431827) to head (b80c251).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23190      +/-   ##
==========================================
- Coverage   93.27%   93.24%   -0.03%     
==========================================
  Files        1035     1036       +1     
  Lines       60338    60448     +110     
  Branches      400      400              
==========================================
+ Hits        56278    56366      +88     
- Misses       4060     4082      +22     
Flag Coverage Δ
conformance 36.40% <0.00%> (-0.07%) ⬇️
e2e 41.64% <0.00%> (-0.07%) ⬇️
integration 32.36% <0.00%> (-0.55%) ⬇️
rust 0.00% <ø> (ø)
unit 92.26% <100.00%> (+0.05%) ⬆️
unit-migrate 92.29% <100.00%> (+0.05%) ⬆️

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

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-b80c25101810ddcc345030dde51f7c1b0c36f0c1
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-b80c25101810ddcc345030dde51f7c1b0c36f0c1

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 Jun 19, 2026
@melizeche
melizeche merged commit 6c04503 into main Jun 23, 2026
164 of 166 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jun 23, 2026
@melizeche
melizeche deleted the expand_tests branch June 23, 2026 16:07
kensternberg-authentik added a commit that referenced this pull request Jun 24, 2026
* main: (21 commits)
  tests: add security regression tests for OAuth JWT-bearer and flow session handling (#23190)
  website/integrations: Jellyfin: cleanup (#23293)
  website/integrations: Zipline: cleanup (#23274)
  website/integrations: update rabbitmq scopes (#23314)
  core: bump rustls from 0.23.40 to 0.23.41 (#23305)
  website/integrations: Emby: cleanup (#23296)
  core: bump tower-http from 0.6.11 to 0.7.0 (#23307)
  core: bump pytest from 9.1.0 to 9.1.1 (#23303)
  core: bump github.com/go-openapi/runtime from 0.32.3 to 0.32.4 (#23298)
  core: bump goauthentik/fips-python from `cbec346` to `a0f882f` in /lifecycle/container (#23302)
  core: bump pytest-github-actions-annotate-failures from 0.4.1 to 0.4.2 (#23304)
  ci: bump int128/docker-manifest-create-action from 2.23.0 to 2.24.0 (#23306)
  ci: bump taiki-e/install-action from 2.82.0 to 2.82.1 in /.github/actions/setup (#23308)
  website/integrations: Immich: cleanup (#23295)
  website/integrations: FreshRSS: cleanup (#23294)
  website/docs: remove colons from release notes (#23311)
  website/integrations: Chronograf: cleanup (#23275)
  website/integrations: Miniflux: cleanup (#23290)
  website/integrations: Wallos: cleanup (#23276)
  website/integrations: Beszel: cleanup (#23277)
  ...
kensternberg-authentik added a commit that referenced this pull request Jun 24, 2026
* main: (185 commits)
  providers/scim: allow failures during discovery (#23357)
  website/integrations: Slack: cleanup (#23336)
  website/integrations: Calibre-Web: cleanup (#23297)
  website/integrations: mailcow: cleanup (#23322)
  website/docs: Add agent instructions. (#22824)
  web/tests: fix `strict mode` issues in two tests (#23339)
  website/docs: clarify user and group filtering on scim provider (#22502)
  root: assign packages/theme to @goauthentik/frontend (#23344)
  core: bump coverage[toml] from 7.14.1 to 7.14.2 (#23349)
  core: bump github.com/getsentry/sentry-go from 0.46.2 to 0.47.0 (#23345)
  core: bump astral-sh/uv from 0.11.23 to 0.11.24 in /lifecycle/container (#23346)
  core: bump goauthentik/fips-python from `a0f882f` to `2e5f9fe` in /lifecycle/container (#23347)
  ci: bump taiki-e/install-action from 2.82.1 to 2.82.2 in /.github/actions/setup (#23353)
  core: bump aws-cdk-lib from 2.259.0 to 2.260.0 (#23352)
  core: bump django-countries from 8.2.0 to 9.0.0 (#23348)
  core: bump selenium from 4.44.0 to 4.45.0 (#23350)
  core: bump sentry-sdk from 2.62.0 to 2.63.0 (#23351)
  tests: add security regression tests for OAuth JWT-bearer and flow session handling (#23190)
  website/integrations: Jellyfin: cleanup (#23293)
  website/integrations: Zipline: cleanup (#23274)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants