Compare commits

..
Author SHA1 Message Date
Teffen Ellis 86e347a6eb web/elements: add CSS suggestions to the code editor
- Run Monaco's CSS language service on the page for suggestions, hovers and validation
- Load each language's service with the first editor that uses it
- Add the suggestion widget, hovers and snippets

Monaco's own CSS entry point starts a worker whose setup loads every editor
feature, including the ones the editor leaves out.
2026-11-04 17:50:25 +00:00
Teffen EllisandDominic R e1669e3685 web/elements: replace CodeMirror with Monaco in the code editor
- Replace CodeMirror with Monaco, imported once the editor is shown
- Pick Monaco's editing features instead of loading all of them
- Add the One Dark theme, vendored from azemoh/vscode-onedark (MIT)
- Hold the field's height until the editor loads
- Follow changes to `mode`, `readonly` and `disabled`
- Honor `readonly`, which the CodeMirror element ignored

Co-authored-by: Dominic R <[email protected]>
2026-11-04 17:50:24 +00:00
Teffen EllisandDominic R 7961cc5a5d web/elements: rename ak-codemirror to ak-code-editor (#27406)
Name the element after what it is, not the library behind it, ahead of
replacing CodeMirror.

- Rename `<ak-codemirror>` to `<ak-code-editor>`
- Move `#elements/CodeMirror` to `#elements/CodeEditor`
- Rename `CodeMirrorMode` and the source helpers to match

Co-authored-by: Dominic R <[email protected]>
2026-11-04 17:50:19 +00:00
be54152697 website/integrations: add Google Cloud Workforce Identity Federation guide (#27571)
* adding google cloud integration documentation

* integrations: touch up

---------

Co-authored-by: Dominic R <[email protected]>
Co-authored-by: Dewi Roberts <[email protected]>
2026-11-04 17:46:42 +00:00
Emil Burzo 4569c221c1 root: test that FIPS mode refuses non-approved algorithms (#27536)
* root: test that FIPS mode refuses non-approved algorithms

* fix comment
2026-11-04 17:08:40 +00:00
dependabot[bot] f8cd97ebfb web: bump nanoid from 3.3.16 to 3.3.20 in /website (#27599)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.16 to 3.3.20.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.16...3.3.20)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-version: 3.3.20
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:38 +00:00
dependabot[bot] a445660fa6 web: bump baseline-browser-mapping from 2.10.43 to 2.11.35 in /website (#27600)
Bumps [baseline-browser-mapping](https://github.com/web-platform-dx/baseline-browser-mapping) from 2.10.43 to 2.11.35.
- [Release notes](https://github.com/web-platform-dx/baseline-browser-mapping/releases)
- [Commits](https://github.com/web-platform-dx/baseline-browser-mapping/compare/v2.10.43...v2.11.35)

---
updated-dependencies:
- dependency-name: baseline-browser-mapping
  dependency-version: 2.11.35
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:32 +00:00
dependabot[bot] a6f130bcc3 web: bump mermaid from 11.16.1 to 11.17.2 in /web (#27603)
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 11.16.1 to 11.17.2.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](https://github.com/mermaid-js/mermaid/compare/[email protected]@11.17.2)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-version: 11.17.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:26 +00:00
dependabot[bot] dc057d465b web: bump nanoid from 3.3.15 to 3.3.20 in /web (#27605)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.15 to 3.3.20.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.15...3.3.20)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-version: 3.3.20
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:20 +00:00
dependabot[bot] 941b6bc9c0 web: bump postcss from 8.5.26 to 8.5.32 (#27607)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.26 to 8.5.32.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.26...8.5.32)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.32
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:14 +00:00
dependabot[bot] ca5ce170d7 web: bump svgo from 3.3.4 to 3.3.5 (#27609)
Bumps [svgo](https://github.com/svg/svgo) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v3.3.4...v3.3.5)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 3.3.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:07 +00:00
dependabot[bot] cd61e91eb8 web: bump baseline-browser-mapping from 2.10.43 to 2.11.35 (#27610)
Bumps [baseline-browser-mapping](https://github.com/web-platform-dx/baseline-browser-mapping) from 2.10.43 to 2.11.35.
- [Release notes](https://github.com/web-platform-dx/baseline-browser-mapping/releases)
- [Commits](https://github.com/web-platform-dx/baseline-browser-mapping/compare/v2.10.43...v2.11.35)

---
updated-dependencies:
- dependency-name: baseline-browser-mapping
  dependency-version: 2.11.35
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 16:52:01 +00:00
Ken Sternberg b9e1016592 web/admin: Fix “toggle group not centered on PolicyBindingForms” (#27543)
## Description

This commit adds a little CSS to ensure the toggle group is centered on the PolicyBindingForms.

The rule that “child components should not enforce their position or dimension; leave that to the client code to make those decisions” can sometimes make for awkward fits; in this case, a flex-wrapper to ensure centering.

The toggle group is also used in:

- ProxyProviderForm
- Ak-Application-Wizard-Edit-Binding-Steps
- BlueprintForm
- BlueprintImportForm

I have checked all five locations (the above, and PolicyBindingForms), and the toggle group is now centered in the Form in all cases.

Closes \#27357
2026-11-04 15:46:58 +00:00
Jens L. 5734217bc4 ci: fix codeql for python (#27611) 2026-11-04 15:39:17 +00:00
Emil Burzo bbd324fb19 core: bump fips-python from 3.14.10 to 3.14.10-p1 (#27597) 2026-11-04 15:33:49 +00:00
Jens L. f1341f57c0 flows: format titles correct on first render if possible (#27589)
Signed-off-by: Jens Langhammer <[email protected]>
2026-11-04 14:36:08 +00:00
Connor PeshekandJens Langhammer 2db2805965 common/saml: Add ability to select nameid unspecified (#27027)
* common/saml: Add ability to select nameid unspecified

* update help text for saml source nameid

* update ws-fed for unspecified and update provider docs

* no new migration

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
2026-11-04 12:47:26 +00:00
dependabot[bot] d11d12a63f core: bump cachetools from 7.2.7 to 7.2.8 (#27575)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.7 to 7.2.8.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.7...v7.2.8)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 09:25:48 +00:00
dependabot[bot] 2c34d5995e core: bump pytest from 9.1.1 to 9.2.0 (#27573)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.1.1 to 9.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/9.1.1...9.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 09:22:25 +00:00
dependabot[bot] b8e3227386 core: bump django from 5.2.18 to 5.2.19 (#27574)
Bumps [django](https://github.com/django/django) from 5.2.18 to 5.2.19.
- [Commits](https://github.com/django/django/compare/5.2.18...5.2.19)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 09:19:26 +00:00
dependabot[bot] 88bd5bcf5a core: bump pydantic from 2.14.1 to 2.14.2 (#27576)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.14.1 to 2.14.2.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/v2.14.2/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.14.1...v2.14.2)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 09:07:37 +00:00
dependabot[bot] c684d7d665 ci: bump taiki-e/install-action from 2.88.1 to 2.89.0 in /.github/actions/setup (#27577)
ci: bump taiki-e/install-action in /.github/actions/setup

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.88.1 to 2.89.0.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/68a389c788b2cd04016ce8c80ee23b80d2ab3d68...1919c4a95903d2c33e4a221102edca87309fc14b)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.89.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 09:07:26 +00:00
Connor Peshek f8dde2e253 common/saml: skip Ed25519 tests when FIPS is enabled (#27583) 2026-11-04 02:33:53 -06:00
Connor Peshek b70cff61be outposts/proxy: verify ML-DSA signed tokens (#27171) 2026-11-04 01:01:11 -06:00
dependabot[bot] 4b4c69a17e web: bump js-yaml from 4.3.0 to 4.3.2 (#27522)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.0 to 4.3.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.3.0...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 19:25:20 +00:00
dependabot[bot] a9265211af web: bump shell-quote from 1.9.0 to 1.12.0 (#27531)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.9.0 to 1.12.0.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.12.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:58:55 +00:00
Jens L.andDewi Roberts f729a9318f web/admin: allow adding source to identification stage after creation (#27485)
* web/admin: allow adding source to identification stage after creation

Signed-off-by: Jens Langhammer <[email protected]>

* Update web/src/admin/sources/SourceLoginStagesWizardPage.ts

Co-authored-by: Dewi Roberts <[email protected]>
Signed-off-by: Jens L. <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens L. <[email protected]>
Co-authored-by: Dewi Roberts <[email protected]>
2026-11-03 17:18:38 +00:00
dependabot[bot] 6d5e0905b1 web: bump @xmldom/xmldom from 0.8.13 to 0.8.15 in /web (#27520)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.13 to 0.8.15.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.13...0.8.15)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:07:20 +00:00
dependabot[bot] 1a5f8c0ed1 web: bump source-map-js from 1.2.1 to 1.2.2 (#27523)
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:07:12 +00:00
dependabot[bot] e9bd9f29dd web: bump follow-redirects from 1.16.0 to 1.16.2 (#27524)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.2)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:07:05 +00:00
dependabot[bot] 2957bf0c9a web: bump joi from 17.13.4 to 17.13.9 (#27525)
Bumps [joi](https://github.com/hapijs/joi) from 17.13.4 to 17.13.9.
- [Commits](https://github.com/hapijs/joi/compare/v17.13.4...v17.13.9)

---
updated-dependencies:
- dependency-name: joi
  dependency-version: 17.13.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:59 +00:00
dependabot[bot] 2e44ef9450 web: bump smol-toml from 1.8.0 to 1.9.1 (#27526)
Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.8.0 to 1.9.1.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.8.0...v1.9.1)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-version: 1.9.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:53 +00:00
dependabot[bot] 22a1a95dc2 web: bump markdown-it from 14.3.0 to 14.3.3 (#27528)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.3.0 to 14.3.3.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/14.3.3/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.3.0...14.3.3)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:47 +00:00
dependabot[bot] 29732d18af web: bump fast-uri from 3.1.8 to 3.1.9 (#27529)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.8...v3.1.9)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:41 +00:00
dependabot[bot] 2c34e7480c web: bump image-size from 2.0.2 to 2.0.4 (#27530)
Bumps [image-size](https://github.com/image-size/image-size) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/image-size/image-size/releases)
- [Commits](https://github.com/image-size/image-size/commits)

---
updated-dependencies:
- dependency-name: image-size
  dependency-version: 2.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:35 +00:00
dependabot[bot] 7c8e63fefa web: bump proxy-addr from 2.0.7 to 2.0.8 (#27532)
Bumps [proxy-addr](https://github.com/jshttp/proxy-addr) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/jshttp/proxy-addr/releases)
- [Changelog](https://github.com/jshttp/proxy-addr/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/proxy-addr/compare/v2.0.7...v2.0.8)

---
updated-dependencies:
- dependency-name: proxy-addr
  dependency-version: 2.0.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:29 +00:00
dependabot[bot] 3bac23f005 web: bump compression from 1.8.1 to 1.8.2 (#27533)
Bumps [compression](https://github.com/expressjs/compression) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: compression
  dependency-version: 1.8.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:22 +00:00
dependabot[bot] 80a1953816 web: bump fast-copy from 4.0.3 to 4.3.1 (#27534)
Bumps [fast-copy](https://github.com/planttheidea/fast-copy) from 4.0.3 to 4.3.1.
- [Release notes](https://github.com/planttheidea/fast-copy/releases)
- [Changelog](https://github.com/planttheidea/fast-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/planttheidea/fast-copy/compare/v4.0.3...v4.3.1)

---
updated-dependencies:
- dependency-name: fast-copy
  dependency-version: 4.3.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 17:06:16 +00:00
Alexander TereshkinandJens Langhammer 363cea56f6 web/admin: add user app entitelments screen (#24734)
* web/admin: add user app entitelments screen

* core: use ListPolicyEngine for querying user's app entitlements

* no policy engine

Signed-off-by: Jens Langhammer <[email protected]>

* gen

Signed-off-by: Jens Langhammer <[email protected]>

* fix typing and url

Signed-off-by: Jens Langhammer <[email protected]>

* fix styles

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
2026-11-03 17:00:21 +00:00
Connor Peshek 07715bccd2 providers/saml: reject malformed requests with a 400 instead of a server error (#27153) 2026-11-03 10:37:49 -06:00
Connor Peshek 3ad16821a7 common/saml: Improve certificate filtering (#27445)
common/saml + wsfed: Improve ml-dsa filtering
2026-11-03 10:36:55 -06:00
Jens L.andTeffen Ellis 65808fd1db web/admin: add next steps in app wizard (#27470)
* web/admin: add next steps in app wizard

Signed-off-by: Jens Langhammer <[email protected]>

* Tidy types, labels.

---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]>
2026-11-03 16:32:47 +00:00
Jens L. 5c4d37cfd9 enterprise/providers/ssf: fix credential change event sent when using authenticator during sign in (#27519)
Signed-off-by: Jens Langhammer <[email protected]>
2026-11-03 16:32:24 +00:00
788317d117 rbac: custom permissions (#27051)
* move Initial Permissions to Customization

* fix get_perms() for superusers with an object

Due to shortcuts this doesn't actually ever run, but fixing it anyway

* validate blueprint permissions against the database

* add custom permissions

* log permission assignments

* route API authorization through one decision point per phase

* add permission checks

* add field rules to permission checks

* let permission checks alter responses

* web: manage custom permissions

* web: manage permission checks

* website: document custom permissions and permission checks

* `make gen`

* Docs changes

* website/docs: cleanup

* fix typo in the custom permissions flag help

* format custom permission help text

* reword docs

* select list items by `[pk=...]` in field rule paths

* prefix permission check function names with `RBAC_FUNC_`

* trace `visible_objects`

* inline test helpers

* check the custom permissions flag first

* fixup! Merge branch 'main' into rbac/custom-permissions

* fixup! fixup! Merge branch 'main' into rbac/custom-permissions

---------

Co-authored-by: Dewi Roberts <[email protected]>
Co-authored-by: Dominic R <[email protected]>
2026-11-03 17:29:33 +01:00
Emil Burzo 82c9a381a4 ci: run the distroless image tests with FIPS enabled (#27303) 2026-11-03 18:09:16 +02:00
Simonyi Gergő aad50f08a0 root: fix translations that never took effect (#27432)
* root: fix translations that never took effect

* remove `format_map`s in favor of just `format`

* fixup! Merge branch 'main' into core/fix-translations
2026-11-03 17:07:26 +01:00
dependabot[bot] 76595cca29 web: bump follow-redirects from 1.16.0 to 1.16.2 in /website (#27499)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.2)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:05:57 +00:00
dependabot[bot] 218864b314 web: bump source-map-js from 1.2.1 to 1.2.2 in /website (#27498)
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:05:46 +00:00
dependabot[bot] c7fed87712 web: bump colord from 2.9.3 to 2.10.0 in /website (#27500)
Bumps [colord](https://github.com/omgovich/colord) from 2.9.3 to 2.10.0.
- [Release notes](https://github.com/omgovich/colord/releases)
- [Changelog](https://github.com/omgovich/colord/blob/master/CHANGELOG.md)
- [Commits](https://github.com/omgovich/colord/commits/v2.10)

---
updated-dependencies:
- dependency-name: colord
  dependency-version: 2.10.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:05:34 +00:00
dependabot[bot] 9793c7e82f web: bump shell-quote from 1.9.0 to 1.12.0 in /web (#27502)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.9.0 to 1.12.0.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.12.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:05:26 +00:00
dependabot[bot] 0874e4d2a7 web: bump smol-toml from 1.7.0 to 1.9.1 in /web (#27514)
Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.7.0 to 1.9.1.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.7.0...v1.9.1)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-version: 1.9.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:05:06 +00:00
dependabot[bot] 6c2791e8f1 web: bump body-parser from 1.20.6 to 1.20.9 in /website (#27488)
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.6 to 1.20.9.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/1.20.9/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.6...1.20.9)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 1.20.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:59 +00:00
dependabot[bot] dcac96df5a web: bump brace-expansion from 1.1.15 to 1.1.21 in /website (#27489)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.15 to 1.1.21.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.15...v1.1.21)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.21
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:53 +00:00
dependabot[bot] f938acfebb web: bump dompurify from 3.4.12 to 3.4.17 in /website (#27490)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.12 to 3.4.17.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.12...3.4.17)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.17
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:46 +00:00
dependabot[bot] 5efe4ea803 web: bump undici from 6.28.0 to 6.29.1 in /website (#27491)
Bumps [undici](https://github.com/nodejs/undici) from 6.28.0 to 6.29.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.28.0...v6.29.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.29.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:40 +00:00
dependabot[bot] c4782db593 web: bump image-size from 2.0.2 to 2.0.4 in /website (#27492)
Bumps [image-size](https://github.com/image-size/image-size) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/image-size/image-size/releases)
- [Commits](https://github.com/image-size/image-size/commits)

---
updated-dependencies:
- dependency-name: image-size
  dependency-version: 2.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:34 +00:00
dependabot[bot] 6aed2bfab2 web: bump compression from 1.8.1 to 1.8.2 in /website (#27493)
Bumps [compression](https://github.com/expressjs/compression) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: compression
  dependency-version: 1.8.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:28 +00:00
dependabot[bot] 07cea7bfe5 web: bump svgo from 3.3.4 to 3.3.5 in /website (#27494)
Bumps [svgo](https://github.com/svg/svgo) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v3.3.4...v3.3.5)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 3.3.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:22 +00:00
dependabot[bot] 2590eea362 web: bump proxy-addr from 2.0.7 to 2.0.8 in /website (#27495)
Bumps [proxy-addr](https://github.com/jshttp/proxy-addr) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/jshttp/proxy-addr/releases)
- [Changelog](https://github.com/jshttp/proxy-addr/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/proxy-addr/compare/v2.0.7...v2.0.8)

---
updated-dependencies:
- dependency-name: proxy-addr
  dependency-version: 2.0.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:15 +00:00
dependabot[bot] a5a8d899a6 web: bump joi from 17.13.4 to 17.13.9 in /website (#27496)
Bumps [joi](https://github.com/hapijs/joi) from 17.13.4 to 17.13.9.
- [Commits](https://github.com/hapijs/joi/compare/v17.13.4...v17.13.9)

---
updated-dependencies:
- dependency-name: joi
  dependency-version: 17.13.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:09 +00:00
dependabot[bot] 4b4ad99907 web: bump shell-quote from 1.9.0 to 1.12.0 in /website (#27497)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.9.0 to 1.12.0.
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-version: 1.12.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 16:04:03 +00:00
dependabot[bot] a7c773e978 web: bump @xhmikosr/decompress from 11.1.3 to 11.1.4 in /web (#27501)
Bumps [@xhmikosr/decompress](https://github.com/XhmikosR/decompress) from 11.1.3 to 11.1.4.
- [Release notes](https://github.com/XhmikosR/decompress/releases)
- [Commits](https://github.com/XhmikosR/decompress/compare/v11.1.3...v11.1.4)

---
updated-dependencies:
- dependency-name: "@xhmikosr/decompress"
  dependency-version: 11.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:46:18 +00:00
dependabot[bot] bf5c169327 web: bump fast-uri from 3.1.3 to 3.1.9 in /web (#27503)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.3 to 3.1.9.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.3...v3.1.9)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:46:11 +00:00
dependabot[bot] 8c51a83152 web: bump source-map-js from 1.2.1 to 1.2.2 in /web (#27504)
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:46:05 +00:00
dependabot[bot] 23b72a44e9 web: bump follow-redirects from 1.16.0 to 1.16.2 in /web (#27505)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.0...v1.16.2)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:58 +00:00
dependabot[bot] 8b73dae3b0 web: bump fast-copy from 4.0.3 to 4.3.1 in /web (#27506)
Bumps [fast-copy](https://github.com/planttheidea/fast-copy) from 4.0.3 to 4.3.1.
- [Release notes](https://github.com/planttheidea/fast-copy/releases)
- [Changelog](https://github.com/planttheidea/fast-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/planttheidea/fast-copy/compare/v4.0.3...v4.3.1)

---
updated-dependencies:
- dependency-name: fast-copy
  dependency-version: 4.3.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:51 +00:00
dependabot[bot] e798627382 web: bump axios from 1.18.1 to 1.21.0 in /web (#27507)
Bumps [axios](https://github.com/axios/axios) from 1.18.1 to 1.21.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.18.1...v1.21.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.21.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:44 +00:00
dependabot[bot] 59787fa82a web: bump piscina from 4.9.3 to 4.9.4 in /web (#27508)
Bumps [piscina](https://github.com/piscinajs/piscina) from 4.9.3 to 4.9.4.
- [Release notes](https://github.com/piscinajs/piscina/releases)
- [Changelog](https://github.com/piscinajs/piscina/blob/v4.9.4/CHANGELOG.md)
- [Commits](https://github.com/piscinajs/piscina/compare/v4.9.3...v4.9.4)

---
updated-dependencies:
- dependency-name: piscina
  dependency-version: 4.9.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:37 +00:00
dependabot[bot] 53b2552c51 web: bump dompurify from 3.4.13 to 3.4.17 in /web (#27509)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.13 to 3.4.17.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.13...3.4.17)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.17
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:31 +00:00
dependabot[bot] 697d23111b web: bump postcss-selector-parser from 7.1.4 to 7.1.7 in /web (#27511)
Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 7.1.4 to 7.1.7.
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/7.1.4...7.1.7)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 7.1.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:21 +00:00
dependabot[bot] bc2131c555 web: bump zod from 4.4.3 to 4.6.7 in /web (#27512)
Bumps [zod](https://github.com/colinhacks/zod) from 4.4.3 to 4.6.7.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Commits](https://github.com/colinhacks/zod/compare/v4.4.3...v4.6.7)

---
updated-dependencies:
- dependency-name: zod
  dependency-version: 4.6.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:14 +00:00
dependabot[bot] d63d625759 web: bump js-yaml from 4.3.0 to 4.3.2 in /web (#27513)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.0 to 4.3.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.3.0...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:07 +00:00
dependabot[bot] 217c327f1f web: bump storybook from 10.6.1 to 10.6.2 in /web (#27515)
Bumps [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) from 10.6.1 to 10.6.2.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.6.2/code/core)

---
updated-dependencies:
- dependency-name: storybook
  dependency-version: 10.6.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 15:45:00 +00:00
Dominic Roy b5fd12c31f web: add refreshed source and provider icons in light and dark variants (#27374) 2026-11-03 09:30:15 -05:00
dependabot[bot]andJens Langhammer 3f8e5a1cb2 lifecycle/aws: bump aws-cdk from 2.1143.0 to 2.1146.0 in /lifecycle/aws (#27262)
* lifecycle/aws: bump aws-cdk from 2.1143.0 to 2.1146.0 in /lifecycle/aws

Bumps [aws-cdk](https://github.com/aws/aws-cdk-cli/tree/HEAD/packages/aws-cdk) from 2.1143.0 to 2.1146.0.
- [Release notes](https://github.com/aws/aws-cdk-cli/releases)
- [Commits](https://github.com/aws/aws-cdk-cli/commits/[email protected]/packages/aws-cdk)

---
updated-dependencies:
- dependency-name: aws-cdk
  dependency-version: 2.1146.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix

Signed-off-by: Jens Langhammer <[email protected]>

* fix

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <[email protected]>
2026-11-03 14:14:13 +00:00
Dewi Roberts 86c0d432be website/docs: minor fixes (#27482)
* Update index.mdx

* Minor fixes
2026-11-03 14:12:16 +00:00
dependabot[bot] 82ba75dbc2 core: bump sentry from 0.49.3 to 0.49.5 (#27421)
Bumps [sentry](https://github.com/getsentry/sentry-rust) from 0.49.3 to 0.49.5.
- [Release notes](https://github.com/getsentry/sentry-rust/releases)
- [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-rust/compare/0.49.3...0.49.5)

---
updated-dependencies:
- dependency-name: sentry
  dependency-version: 0.49.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 12:57:18 +00:00
Dewi Roberts a80ec5ea18 web/admin: fix OAuth2 signing key selection (#26780)
* Change

* Tests

* Jason's changes
2026-11-03 12:35:21 +00:00
dependabot[bot] c7a0044336 core: bump library/nginx from 6e67f8e to 5ab5b0b in /website (#27473)
Bumps library/nginx from `6e67f8e` to `5ab5b0b`.

---
updated-dependencies:
- dependency-name: library/nginx
  dependency-version: 1.31.8-trixie
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 11:38:33 +00:00
dependabot[bot] 4bc86b87b5 core: bump jsonpatch from 1.36 to 1.38 (#27475)
Bumps [jsonpatch](https://github.com/stefankoegl/python-json-patch) from 1.36 to 1.38.
- [Release notes](https://github.com/stefankoegl/python-json-patch/releases)
- [Commits](https://github.com/stefankoegl/python-json-patch/compare/v1.36...1.38)

---
updated-dependencies:
- dependency-name: jsonpatch
  dependency-version: '1.38'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 08:25:56 +00:00
dependabot[bot] c35d7e469a core: bump aws-cdk-lib from 2.273.0 to 2.275.0 (#27474)
Bumps [aws-cdk-lib](https://github.com/aws/aws-cdk) from 2.273.0 to 2.275.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md)
- [Commits](https://github.com/aws/aws-cdk/compare/v2.273.0...v2.275.0)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-version: 2.275.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 08:23:42 +00:00
dependabot[bot] fc6c276b25 core: bump axllent/mailpit from v1.32.0 to v1.33.0 in /tests/e2e (#27471)
Bumps axllent/mailpit from v1.32.0 to v1.33.0.

---
updated-dependencies:
- dependency-name: axllent/mailpit
  dependency-version: v1.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 10:18:55 +02:00
dependabot[bot] 69969edc85 core: bump importlib-metadata from 9.0.1 to 9.1.0 (#27477)
Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 9.0.1 to 9.1.0.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v9.0.1...v9.1.0)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-version: 9.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 10:17:59 +02:00
dependabot[bot] 863a7f1b3f core: bump cachetools from 7.2.6 to 7.2.7 (#27476)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.6 to 7.2.7.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.6...v7.2.7)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 10:17:27 +02:00
dependabot[bot] dacf9cd98a core: bump astral-sh/uv from 0.13.6 to 0.13.7 in /lifecycle/container (#27472)
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.13.6 to 0.13.7.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.13.6...0.13.7)

---
updated-dependencies:
- dependency-name: astral-sh/uv
  dependency-version: 0.13.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-03 10:14:19 +02:00
Marcelo Elizeche Landó c10e86fa7c core: bump jsonpointer from 3.3 to v3.6 (#27223) 2026-11-03 10:12:32 +02:00
Teffen Ellis 7bc9d25f70 web/admin: keep earlier picks when assigning users to a group (#27468)
Confirming the "Select users" dialog replaced the pending list in the
"Assign Additional Users" form, so a second visit to the dialog dropped
the users picked in the first. Each confirm now merges its selection into
the pending list by primary key. The role assignment path shares the form.

The "Simple group" browser test now picks two users in separate visits to
the selection dialog and asserts both are members after assignment.

Fixes #27277
2026-11-02 23:17:26 +00:00
Teffen Ellis 39a7d8d4ed web: Keep brand form state after uploading a file (#27405)
* Open brand settings by default.

* Fix issue where refresh events bubble through dependent modals.
2026-11-02 21:46:32 +00:00
Dominic Roy 5dc7709431 website/docs: add password lockout 2026.11 release notes (#24801) 2026-11-02 20:36:44 +00:00
Dominic Roy 2e50b030d6 website/docs: document password lockout (#24799) 2026-11-02 20:05:31 +00:00
Dominic Roy b092dd76a2 web/admin: manage password lockout (#24798) 2026-11-02 19:41:46 +00:00
Dominic Roy 733d1315e0 stages/password: lock password login after failed attempts (#24794) 2026-11-02 19:01:30 +00:00
Dominic Roy 4f14fc58b5 web: share one brand CSS style sheet across elements (#27362)
Every AKElement built its own CSSStyleSheet from the brand's custom CSS,
so a page with N elements parsed the brand CSS N times and held N
copies. Lit's sheet cache never hit because createCSSResult wraps the
string in a new strings array each call. This hurts most when the brand
CSS inlines a font or image.

Build the sheet once and have every element and nested shadow root
adopt it. The cache is keyed on the CSS text so a re-read server
context, as injectBrand does in tests, still gets a matching sheet.
2026-11-02 18:22:22 +00:00
Dominic Roy ef6c7aade5 website: resolve links in the Markdown copies of docs pages (#27354) 2026-11-02 12:59:26 -05:00
Dominic Roy 23d587799f core: store passwords as authenticator devices (#24325)
* core: store passwords as authenticator devices

* core: address review feedback on password devices

* core: merge password device migration branches

* core: linearize password migrations and repair downgrade order

* core: simplify staged password accessors and saves

* core: update only the hash during password rehashing

* core: cover staged password writes and rollback

* stages/password: clarify device exclusions and verify single SSF events

* stages/user_write: persist password-only changes

* stages/user_write: format the password change snapshot

* core: load password dates with the user list

* core: return explicitly after saving a password device

* core: isolate password storage and preserve Django save semantics

* core: load password devices with nested user lists

* stages/password: regenerate the complete device schema in the base layer

* core: write passwords through the password device

Drop the PasswordUser adapter that staged password writes on the user
until save(). Callers now use PasswordDevice.set_password(),
set_password_from_hash() and set_unusable_password(), which write the
device immediately and then save the user, so outgoing sync and the
policy cache still see password changes.

User keeps read-only password and password_change_date properties
because property mappings (including the Google Workspace and Entra
system blueprints) and Django's session hash read them. Django's
password writes on User now raise instead of assigning the property, so
create_user(), `ak changepassword` and guardian's anonymous user go
through the device or skip the password.

The data migration copies passwords in Python with chunked_queryset and
skips unusable passwords, since a user without a device has no usable
password. It no longer copies passwords back on downgrade; the legacy
columns stay in place until a later release.

* sources/ldap: set password through PasswordDevice in AD error test
2026-11-02 11:57:18 -05:00
Teffen Ellis b606382aba web/flow: return to the base path after a Plex source error (#27315) 2026-11-02 16:47:50 +00:00
Teffen Ellis 23378da66e web/elements: keep dialog messages after the dialog closes (#27413)
* web/elements: keep dialog messages after the dialog closes

A dialog's messages render in its own container, above the modal backdrop.
Closing the dialog removed them, along with confirmations shown on submit.

- Move a closing dialog's messages to the next container: the dialog below, or the page
- Add `findMessageContainer()`, shared with `showMessage()`

* web/elements: remove the unused ak-message event listener

Every message container listened on `window` for `ak-message`, and never
stopped. Nothing dispatches the event. The listener kept each closed dialog's
container in memory.

- Remove the listener from `MessageContainer`
- Remove `AKMessageEvent`
2026-11-02 16:47:12 +00:00
Connor PeshekandDewi Roberts 5d82f6dbb6 stages/authenticator_webauthn: don't offer signature algorithms OpenSSL can't verify when FIPS is enabled (#27116)
* stages/authenticator_webauthn: don't offer signature algorithms OpenSSL can't verify, fixes WebAuthn under FIPS

* note fips mode enabled in error logs

* just make fips compatibility a static list

---------

Co-authored-by: Dewi Roberts <[email protected]>
2026-11-02 10:30:54 -06:00
Ken Sternberg 17462c41e7 root: Configure cspell to not print its progress messages (#27436)
Configure cspell to not print its progress messages (thousands and thousands of lines of files checked), as that obscured any actual error messages, but also ensure that it does display a summary message at the end of its run for auditing purposes.
2026-11-02 16:02:39 +00:00
Dominic RoyandJens L. 9b1f40a00d root: clear in-memory caches after test fixture setup (#27433)
* root: clear in-memory caches after test fixture setup

The first test's setup creates the test database, and its migrations
fill the system settings cache. When that takes longer than the cache
timeout, the test starts on a stale entry whose refresh runs on a
background thread. That thread's connection cannot see the test's
uncommitted writes, so the refresh undoes flags the test patched.

* Apply suggestion from @BeryJu

Signed-off-by: Jens L. <[email protected]>

* sigh

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens L. <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
2026-11-02 15:20:48 +00:00
Hugh MessengerandJens L. 6919bf73ab outposts/ldap: apply provider changes to the cached binder on refresh (#27402)
In cached bind mode the refresh rebuilt the provider instance but kept
the previous session binder's direct binder, and that binder reads the
bind flow, the unbind flow, MFA support and the base DN from the
instance it was built with. A change to any of them on the provider
never reached a running outpost: it carried on executing the old bind
flow until the process was restarted, while the refresh log said the
new flow had been loaded. The cached results survived the refresh too,
so a bind refused under the old settings stayed refused, and one
accepted stayed accepted, for the life of its entry.

The direct binder is now always built from the new instance. The
session cache is carried over only when the settings that decide a
bind's outcome are unchanged; when one of them changes, the old cache
is stopped and a fresh one started, so every pair of credentials runs
the new flow once more and is cached again under it. The five-minute
refresh keeps the cache in the ordinary case; the cost lands only when
an administrator changed something, which is what the change was for.

Also fixes the comment on the caching line, which said the opposite of
what the code does: a result is cached whenever the bind itself
completed, refusals included; only a transport error is left uncached.

Tests: a refresh with unchanged settings keeps the cached sessions; a
changed bind flow, unbind flow, MFA setting or base DN discards them,
refusals included; and the direct binder answers for the new instance's
base DN after a refresh. The last two fail on the previous code.

Co-authored-by: Jens L. <[email protected]>
2026-11-02 15:15:37 +00:00
Emil Burzo 1cc011aab4 core: bump fips-python from 3.14.8 to 3.14.10, xmlsec from 1.3.17 to 1.3.18 (#27428) 2026-11-02 15:05:31 +00:00
Marcelo Elizeche Landó f59d67f498 core: bump microsoft-kiota-serialization-json from 1.12.0 to v1.16.0 (#27231) 2026-11-02 16:44:07 +02:00
Marcelo Elizeche Landó 24ca2d3fbe core: bump msgraph-core from 1.5.1 to v1.5.2 (#27236) 2026-11-02 16:43:12 +02:00
Marcelo Elizeche Landó 56539522b1 core: bump microsoft-kiota-serialization-text from 1.12.0 to v1.16.0 (#27233) 2026-11-02 16:43:09 +02:00
Marcelo Elizeche Landó a7ac77f9fe core: bump microsoft-kiota-serialization-multipart from 1.12.0 to v1.16.0 (#27232) 2026-11-02 16:42:28 +02:00
Marcelo Elizeche Landó 12f90e84ff core: bump microsoft-kiota-serialization-form from 1.12.0 to v1.16.0 (#27230) 2026-11-02 16:42:23 +02:00
Jens L. bee5e44322 enterprise/endpoints/connectors/agent: add PSSO state & de-register (#26212)
Signed-off-by: Jens Langhammer <[email protected]>

# Conflicts:
#	packages/client-ts/src/models/index.ts
2026-11-02 14:28:22 +00:00
Su-hyeon Forten Lee 534b06e8b9 providers/oauth2: use the Bearer scheme in WWW-Authenticate (#27390)
Signed-off-by: shlee1223 <[email protected]>
2026-11-02 12:38:07 +00:00
transifex-integration[bot]andauthentik-automation[bot] 536916132b translate: Updates for project authentik and language lv_LV (#27393)
* translate: Translate web/xliff/en.xlf in lv_LV

100% translated source file: 'web/xliff/en.xlf'
on 'lv_LV'.

* translate: Translate django.po in lv_LV

100% translated source file: 'django.po'
on 'lv_LV'.

* translate: normalize locale paths

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>

* translate: Translate web/xliff/en.xlf in lv_LV

100% translated source file: 'web/xliff/en.xlf'
on 'lv_LV'.

* translate: Translate django.po in lv_LV

100% translated source file: 'django.po'
on 'lv_LV'.

* translate: Translate web/xliff/en.xlf in lv_LV

100% translated source file: 'web/xliff/en.xlf'
on 'lv_LV'.

* translate: normalize locale paths

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>

---------

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-11-02 12:15:03 +00:00
dependabot[bot] 522ba65087 core: bump library/golang from fbb7ae4 to c65ecfe in /lifecycle/container (#27416)
core: bump library/golang in /lifecycle/container

Bumps library/golang from `fbb7ae4` to `c65ecfe`.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-version: 1.27-trixie
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 12:14:39 +00:00
dependabot[bot] b7a3a19bc3 core: bump library/node from 26.12.1-trixie-slim to 26.13.0-trixie-slim in /lifecycle/container (#27417)
core: bump library/node in /lifecycle/container

Bumps library/node from 26.12.1-trixie-slim to 26.13.0-trixie-slim.

---
updated-dependencies:
- dependency-name: library/node
  dependency-version: 26.13.0-trixie-slim
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 12:14:34 +00:00
dependabot[bot] 3d2177afa4 core: bump library/node from 26.12.1-trixie to 26.13.0-trixie in /website (#27418)
core: bump library/node in /website

Bumps library/node from 26.12.1-trixie to 26.13.0-trixie.

---
updated-dependencies:
- dependency-name: library/node
  dependency-version: 26.13.0-trixie
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 12:14:27 +00:00
dependabot[bot] 241e4b467e ci: bump astral-sh/setup-uv from 10.3.2 to 10.3.3 in /.github/actions/setup (#27423)
ci: bump astral-sh/setup-uv in /.github/actions/setup

Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.3.2 to 10.3.3.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/07a047e608db84b3d8c06cd9a7c7dcc9c355c18e...68559e99cc807c1eb7e9238fd43a15bba460eec2)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 12:14:22 +00:00
dependabot[bot] 987a9b8a95 ci: bump taiki-e/install-action from 2.87.32 to 2.88.1 in /.github/actions/setup (#27424)
ci: bump taiki-e/install-action in /.github/actions/setup

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.32 to 2.88.1.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/5488ac5a951645ce95062214902ac4b6bc1a1037...68a389c788b2cd04016ce8c80ee23b80d2ab3d68)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.88.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 12:14:17 +00:00
Emil Burzo 0667c27782 root: disable MPTCP on Go listeners (#27425) 2026-11-02 13:44:58 +02:00
dependabot[bot] 428e6b3fb2 core: bump pyasn1 from 0.6.4 to 0.6.5 (#27398)
Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.6.4 to 0.6.5.
- [Release notes](https://github.com/pyasn1/pyasn1/releases)
- [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst)
- [Commits](https://github.com/pyasn1/pyasn1/compare/v0.6.4...v0.6.5)

---
updated-dependencies:
- dependency-name: pyasn1
  dependency-version: 0.6.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 08:52:14 +00:00
dependabot[bot] 4cdc3ba23e core: bump uuid from 1.28.0 to 1.29.0 (#27422)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.28.0 to 1.29.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.28.0...v1.29.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 1.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 10:48:40 +02:00
dependabot[bot] b1db8669b0 core: bump msgraph-sdk from 1.64.0 to 1.65.0 (#27420)
Bumps [msgraph-sdk](https://github.com/microsoftgraph/msgraph-sdk-python) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/microsoftgraph/msgraph-sdk-python/releases)
- [Changelog](https://github.com/microsoftgraph/msgraph-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoftgraph/msgraph-sdk-python/compare/v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: msgraph-sdk
  dependency-version: 1.65.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 10:47:18 +02:00
dependabot[bot] 4c491b2482 core: bump opentelemetry-propagator-b3 from 1.45.1 to 1.45.2 in the opentelemetry group (#27419)
core: bump opentelemetry-propagator-b3

Bumps the opentelemetry group with 1 update: [opentelemetry-propagator-b3](https://github.com/open-telemetry/opentelemetry-python).


Updates `opentelemetry-propagator-b3` from 1.45.1 to 1.45.2
- [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-python/compare/v1.45.1...v1.45.2)

---
updated-dependencies:
- dependency-name: opentelemetry-propagator-b3
  dependency-version: 1.45.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: opentelemetry
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 10:46:53 +02:00
Marcelo Elizeche Landó d6874b9e1a core: bump wcwidth from 0.8.3 to v0.9.4 (#27252) 2026-11-02 10:45:11 +02:00
Marcelo Elizeche Landó 71885a1e28 core: bump blessed from 1.49.0 to v1.52.0 (#27207) 2026-11-02 10:42:21 +02:00
dependabot[bot] 0d124f5095 core: bump github.com/go-openapi/runtime from 0.33.3 to 0.33.4 (#27414)
Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.33.3 to 0.33.4.
- [Release notes](https://github.com/go-openapi/runtime/releases)
- [Commits](https://github.com/go-openapi/runtime/compare/v0.33.3...v0.33.4)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/runtime
  dependency-version: 0.33.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 10:40:02 +02:00
Dominic Roy a3de4cc458 web/admin: add a required actions card to the user page (#24850) 2026-11-01 22:06:16 +00:00
Dominic Roy 548cb61541 website/docs: add required actions to the 2026.11 release notes (#24848) 2026-11-01 21:24:32 +00:00
Dominic Roy d9fd839753 website/docs: document required actions (#24847)
* website/docs: document next actions on login

* website/docs: clarify required-action scope and recovery

* website/docs: explain required-action redirect limits

* website/docs: explain assigning next actions in user attributes

* website/docs: locate the advanced attributes editor

* website/docs: rename next actions to required actions

Actions now apply on the user's next request rather than at their next
login, and the user resumes the page or flow they were in afterwards.
Flows that redirect or send the user to a source can't be used, since
the action flow has to finish on its own.

* website/docs: document what required actions don't cover
2026-11-01 13:11:15 -05:00
Dominic RoyandSimonyi Gergő 1be557ed65 enterprise: add required actions for users (#24846)
* stages/user_login: restrict sessions with next actions

* core: return a fixed next-action validation error

* stages/user_login: keep malformed next actions restricted

* stages/user_login: preserve required flow plans on direct entry

* stages/user_login: preserve attribute updates during action completion

* stages/user_login: enforce next actions when adding an account

* stages/user_login: reuse Django routing for restricted sessions

* core: verify delegated next-action permissions

* stages/user_login: resolve required flows with Django in_bulk

* core: simplify next-action audit handling

* stages/redirect: retain required-action completion across flow handoffs

* stages/user_login: remove redundant next-action tests

* enterprise: own required-action enforcement and validation

* enterprise: simplify next-action audit changes

* stages/redirect: make cooperative initialization explicit

* core, enterprise, web: enforce required actions on every request

Review asked for three changes: pause and resume flows the way the
Source stage does instead of splicing a completion stage into other
flows, apply actions to sessions that already exist, and a clearer name.

The middleware now reads goauthentik.io/user/required-actions on every
authenticated request, so an action added to a logged-in user applies on
their next request and the User Login stage needs no hook. Starting an
action suspends what the user was doing: a flow in progress is kept on
the action's completion stage and restored afterwards, and any other
page is opened again. The Redirect stage hook is gone, so an action flow
can no longer hand off to another flow.

The set and removed events are dropped because the user's model_updated
event already records the attribute change. Validation only runs when
the value changes, so a deleted flow doesn't block unrelated edits.

* enterprise/required_actions: tighten validation and resumed requests

Reject flows that a logged-in user can never plan, such as the
unauthenticated recovery and enrollment flows, which would otherwise
lock the user out. Keep the body of a suspended POST in the session,
as the login redirect does, so a SAML POST binding still works once the
actions are done. Complete the action for the plan's pending user, so a
plan restored in another browser from an email link doesn't fail.

* set the pending user on action plans

Otherwise an Email stage can fail with "No pending user." and leave
the user stuck.

---------

Co-authored-by: Simonyi Gergő <[email protected]>
2026-11-01 12:42:44 -05:00
Ken SternbergandCopilot Autofix powered by AI 887869960a web/elements: ak-crontab (#26810)
* web/elements: formalize the timestamp display

## What

Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.

The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.

* Move constant to be, y'know, a constant.

* Potential fix for pull request finding 'Implicit operand conversion'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>

* web/elements: introduce the crontab component

## What

Provide a component that provides a textual representation for crontab entries.

## Why

Because I hate trying to interpret those things, and I can’t imagine I’m the only one.

* web/elements: formalize the timestamp display

## What

Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.

The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.

* Move constant to be, y'know, a constant.

* Potential fix for pull request finding 'Implicit operand conversion'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>

* web/elements: introduce the crontab component

## What

Provide a component that provides a textual representation for crontab entries.

## Why

Because I hate trying to interpret those things, and I can’t imagine I’m the only one.

* Spellcheckers.

* web/elements: introduce the crontab component

## What

Provide a component that provides a textual representation for crontab entries.

## Why

Because I hate trying to interpret those things, and I can’t imagine I’m the only one.

---------

Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-10-30 16:15:20 -07:00
Jens L. 02b2212c1a policies: optimise policy engine for no policy or no cache (#27396)
* check pk first before doing expensive query

Signed-off-by: Jens Langhammer <[email protected]>

* dont write to cache if not reading from cache

Signed-off-by: Jens Langhammer <[email protected]>

* set gil_only false in pyroscope

Signed-off-by: Jens Langhammer <[email protected]>

* Revert "set gil_only false in pyroscope"

This reverts commit ca597736c2.

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-30 22:52:52 +00:00
Ken SternbergandCopilot Autofix powered by AI 428f06b6db web/elements: formalize the timestamp display (#26809)
* web/elements: formalize the timestamp display

## What

Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.

The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.

* Move constant to be, y'know, a constant.

* Potential fix for pull request finding 'Implicit operand conversion'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>

* web/elements: formalize the timestamp display

## What

Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.

The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.

* Move constant to be, y'know, a constant.

* Potential fix for pull request finding 'Implicit operand conversion'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>

* Spellcheckers.

---------

Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-10-30 15:43:33 -07:00
Jens L. 77fe944589 lib/tracing: use BatchSpanProcessor (#27387)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-30 19:14:43 +00:00
Dewi Roberts 2e6d75d5f5 website/integrations: add planka sso requirement note (#27376)
Update index.mdx
2026-10-30 09:59:46 -04:00
dependabot[bot] 7905cc436a core: bump ruff from 0.17.2 to 0.17.3 (#27370)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.17.2...0.17.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.17.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 08:33:40 +00:00
dependabot[bot] bd340bd17a core: bump cachetools from 7.2.5 to 7.2.6 (#27372)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.5 to 7.2.6.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.5...v7.2.6)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 08:27:47 +00:00
dependabot[bot] 20c4f7b652 core: bump coverage[toml] from 7.16.2 to 7.17.0 (#27373)
Bumps [coverage[toml]](https://github.com/coveragepy/coveragepy) from 7.16.2 to 7.17.0.
- [Release notes](https://github.com/coveragepy/coveragepy/releases)
- [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst)
- [Commits](https://github.com/coveragepy/coveragepy/compare/7.16.2...7.17.0)

---
updated-dependencies:
- dependency-name: coverage[toml]
  dependency-version: 7.17.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 10:18:04 +02:00
dependabot[bot] 70597c2dc1 core: bump django from 5.2.17 to 5.2.18 (#27369)
Bumps [django](https://github.com/django/django) from 5.2.17 to 5.2.18.
- [Commits](https://github.com/django/django/compare/5.2.17...5.2.18)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 10:10:01 +02:00
Marcelo Elizeche Landó 4517df06d3 core: bump google-api-core from 2.36.0 to v2.43.0 (#27214) 2026-10-30 09:44:19 +02:00
Marcelo Elizeche Landó 0416feba51 core: bump boto3 from 1.43.90 to v1.43.119 (#27208) 2026-10-30 09:43:44 +02:00
Marcelo Elizeche Landó e445f49e1d core: bump googleapis-common-protos from 1.75.3 to v1.76.0 (#27217) 2026-10-30 09:43:26 +02:00
Marcelo Elizeche Landó b34c7d79f0 core: bump msgpack from 1.2.3 to v1.2.4 (#27235) 2026-10-30 09:43:19 +02:00
Jens L. fa9abf12bb packages/django-dramatiq-postgres: limit task fetching (#27197)
* events: simplify execution of event rules/notifications

Signed-off-by: Jens Langhammer <[email protected]>

* remove policy engine changes

Signed-off-by: Jens Langhammer <[email protected]>

* separate pe

Signed-off-by: Jens Langhammer <[email protected]>

* sigh

Signed-off-by: Jens Langhammer <[email protected]>

* packages/django-dramatiq-postgres: limit task fetching

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 19:09:06 +00:00
Teffen Ellis 3f76e6abf9 web/admin: make flow execute links base-path aware (#27314) 2026-10-29 18:18:20 +00:00
Jens L. 1020466910 lib: fix capture_logs not thread safe (#27355)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 18:12:22 +00:00
Teffen Ellis 513ab3c99e web/user: keep configure URL query strings when adding next (#27313) 2026-10-29 17:34:01 +00:00
Jacob SachsandTeffen Ellis 3cfddf85be web/flow: refresh WebAuthn challenge on authentication retry (#26616)
* web/flow: refresh WebAuthn challenge on authentication retry

* web/tests: cover WebAuthn retry after challenge replacement across tabs

* web/flow: tidy WebAuthn retry refresh and drop redundant tests

---------

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-29 17:32:53 +00:00
Dominic Roy 62d919f36e server, lifecycle: drop idle upstream connections before uvicorn does (#27192)
* server, lifecycle: drop idle upstream connections before uvicorn does

The server kept idle connections to uvicorn pooled for a minute, but
uvicorn closes them after gunicorn's keepalive of 2 seconds. A request
that reused a connection uvicorn was closing got reset after it was
sent, and the client received a 503 "authentik starting".

Drop idle connections a second before uvicorn's keep-alive runs out.
Raising gunicorn's keepalive above the pool timeout would also work,
but uvicorn before 0.53 keeps a connection open after a request with
`Connection: Close` and silently drops the next request on it, so on
2026.8 a longer keepalive would leave that connection in the pool for
a minute instead of 2 seconds.

* server, lifecycle: raise uvicorn keep-alive to 5 seconds
2026-10-29 16:49:58 +00:00
Dominic Roy 358eaba364 outposts: only write changed permissions, add endpoint to rebuild them (#26928)
* outposts: only write changed service account permissions

Closes: #26924

* outposts: add API endpoint to rebuild service account permissions

Saving an outpost no longer deletes and recreates every permission of
its service account, which was useful when troubleshooting a desync.
POST /outposts/instances/{uuid}/rebuild_permissions/ does that full
rebuild explicitly and requires permission to change the outpost.

* outposts: test that a missing permission keeps existing ones

* outposts: type and rename existing permission sets in build_user_permissions
2026-10-29 16:45:25 +00:00
Jens L. d0e544cc01 flows: fix planner not resolving stages causing extra queries (#27320)
* flows: fix planner not resolving stages causing extra queries

Signed-off-by: Jens Langhammer <[email protected]>

* fuckin bandit

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 16:17:22 +00:00
Dominic Roy 0dc918d7a2 outposts/proxy: honor X-Forwarded-Host in envoy forward auth (#26888)
* outposts/proxy: honor X-Forwarded-Host in envoy forward auth

The envoy handler built the post-login redirect from the raw Host
header, while the outpost picks the application with the ak-axum Host
extractor, which uses X-Forwarded-Host from trusted proxies. When a
front proxy rewrote :authority to an internal name, users landed on
that internal host after login. The Go outpost replaced the host with
X-Forwarded-Host for trusted proxies, so this broke in the Rust
rewrite.

Use the same extractor for the redirect target. Untrusted peers still
cannot pick the redirect host.

Closes: #26867

* outposts/proxy: drop envoy handler tests that repeat ak-axum coverage

* outposts/proxy: test that envoy forward auth uses the forwarded host

The envoy_forward_target unit tests pass a host string directly, so
they still pass if handle_envoy goes back to reading the raw Host
header. Drive the handler through host_middleware with a trusted
proxy instead. The untrusted-peer case stays out because ak-axum's
Host extractor tests already cover it.
2026-10-29 11:53:58 -04:00
Dewi Roberts aeed272ae3 website/docs: Update wording for internal and external users (#27345)
Update wording for internal and external users
2026-10-29 15:41:20 +00:00
Dominic Roy 2c34c1efb3 server: strip hop-by-hop headers before forwarding to the application (#27191)
The server passed hop-by-hop headers such as `Connection` through to
uvicorn. They describe the client's connection to the server, and
RFC 9110 requires proxies to remove them, as the Go server's reverse
proxy did. Passing `Connection: Close` on made uvicorn before 0.53
keep the upstream connection open and silently drop the next request
sent on it, which uvicorn 0.53 and hyper 1.12 now avoid.

Remove them, and the headers `Connection` names, before adding our own
forwarding headers. WebSocket upgrades keep them for the handshake.
2026-10-29 11:35:47 -04:00
Dominic Roy 560f14ad1f enterprise/lifecycle: record each review and its note as an event (#27286)
review_attested was defined with object lifecycle management but never
emitted, so a reviewer's note on an access review reached no review
event. Submitting a review now records review_attested for the
reviewer, with the note and the reviewed object.
2026-10-29 11:30:21 -04:00
Dominic Roy a96ef0eb3d lib/sync/outgoing: report conflicting objects instead of failing sync (#27287)
When a remote system answered 409 and the provider couldn't link the
existing object, ObjectExistsSyncException escaped the sync task. The
task failed with an error that named no object and said nothing about
how to resolve it, the rest of the page was never synced, and the full
sync failed before it synced groups and cleaned up. SCIM made it worse:
a search response that wasn't a ListResponse raised AttributeError and
hid the conflict.

Full, direct, delete, and membership sync now log a warning with the
object and the remote system's response, and continue. A conflict also
says what to change. Errors that don't belong to one object, from
discovery or cleanup, end the full sync with a task error, as StopSync
already did.

Several errors could not reach that log. StopSync never set the
response that str() reads, so printing it raised AttributeError, and
Google Workspace passed two arguments to exceptions that take one, so
every 400 raised TypeError. Entra ID turned every Graph error into
StopSync before checking its status, so its conflict and re-create
handling never ran. It now maps 400, 404, and 409 like the other
providers, keeps Graph's error message, and no longer compares
odata_count, which Graph only returns when a count is requested.

Linking after a conflict now only links the matching object. SCIM
checks the returned userName or displayName, since some servers ignore
the filter, and Google Workspace checks the primary address, so an
address held by another kind of object or an alias is reported instead
of linked. Removing a member who is already gone counts as done.

Closes: #26904
2026-10-29 11:29:40 -04:00
Dominic Roy 9a68e73d58 outposts, internal/outpost: keep the web path when outposts connect to authentik (#27290)
With authentik under AUTHENTIK_WEB__PATH, outposts could not reach it:

- The RAC outpost built its session websocket URL from the API client's
  scheme and host only, so it dialed /ws/outpost_rac/... and got a 404,
  while the control websocket already kept the path. Both now go
  through one dialer, which also gives the session websocket the unix
  socket support and query parameters of the control websocket.
- The API base was the path of AUTHENTIK_HOST with "api/v3" appended, so
  a path without a trailing slash, such as /authentik, became
  /authentikapi/v3. The websockets already joined the path correctly.
- The default outpost config, which the admin interface pre-fills for
  new outposts, set authentik_host to the server root.

Closes: #26803
2026-10-29 11:24:36 -04:00
Dominic Roy c8585f5238 web: keep the web path in URLs the interfaces build (#27291)
Some URLs were built from the page's origin instead of the web base
path, so with authentik under AUTHENTIK_WEB__PATH they pointed outside
of authentik: the RAC tunnel websocket, the flow "Execute" buttons,
invitation links, the AUTHENTIK_HOST shown in the outpost deployment
info, and the event map, about dialog and email preview assets. The RAC
websocket also missed the session cookie, which is scoped to the web
path, so authentik refused it even where a proxy rewrote the path.

Closes: #26803
2026-10-29 11:23:46 -04:00
Dominic RoyandJens L. 612a4435b4 website/docs: document exchanging a token for a SAML response (#27311)
* website/docs: document exchanging a token for a SAML response

* Update website/docs/add-secure-apps/providers/oauth2/token_exchange.mdx

Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dominic Roy <[email protected]>

---------

Signed-off-by: Dominic Roy <[email protected]>
Co-authored-by: Jens L. <[email protected]>
2026-10-29 15:13:27 +00:00
Jens L. 3f6a13c45a policies: optimize count in engine (#27322)
* policies: optimize count in engine

Signed-off-by: Jens Langhammer <[email protected]>

* optimize loading policy types

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 14:56:19 +00:00
Joel Town RoadandJens L. 7d4eabffb3 server: quiet health_live warn when upstream socket not ready (#26741)
* fix(server): quiet health_live warn when upstream socket not ready

Before the Unix socket exists, health_live (and the analogous path in
the worker) called the upstream via hyper_util's legacy Client.  A
connect failure with ENOENT (No such file or directory) was logged at
warn level, producing false-positive production warnings from the
in-process healthcheck during every normal startup.

Add a small helper  that walks the error's
source chain looking for an  with .
In  (server and worker), use it to downgrade that
specific case to ; all other connect/request failures continue
to log at  so real outages remain visible.

The fix still returns Err so the health endpoint correctly reports
not-live until the socket is up — it only adjusts the log level for
the expected startup race.

Signed-off-by: hippi345 <[email protected]>

* fix(server): suppress AppError warn for health_live on startup ENOENT

When the upstream Unix socket does not yet exist, the health_live
handler in src/server/core.rs used to call server.health_live().await?
which converted the eyre::Report into AppError.  AppError::into_response
unconditionally logs warn!(err = ?self.0, "error occurred"), producing a
second spurious warning on top of the one already silenced in the client
layer.

Replace the await? with an explicit match.  A Connect/NotFound error
(socket not ready) is now logged at debug and the handler returns
SERVICE_UNAVAILABLE directly, bypassing AppError entirely.  All other
errors continue to log at warn and return SERVICE_UNAVAILABLE; no error
is silently swallowed.

Apply the same debug/warn split to the worker healthcheck handler
(src/worker/healthcheck.rs), which also logged warn unconditionally in
its Err arm.  Expose is_connect_not_found as pub(crate) in both
server/mod.rs and worker/mod.rs so the respective handler files can
import it.

Signed-off-by: hippi345 <[email protected]>

* dedupe

Signed-off-by: Jens Langhammer <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: hippi345 <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
2026-10-29 14:54:53 +00:00
Jens L. a47b4ad1ff packages/django-dramatiq-postgres: fix prometheus-related exception in tests (#27090)
* packages/django-dramatiq-postgres: fix prometheus-related exception in tests

Signed-off-by: Jens Langhammer <[email protected]>

* fix

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 14:53:57 +00:00
Jens L. 121dfe6eb3 website: remove docsmg (#27344)
if we ever need this again it'll be in the history

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 14:52:11 +00:00
Marcelo Elizeche Landó a2f99cae2a core: bump pycparser from 3.0 to v3.12 (#27243) 2026-10-29 16:15:54 +02:00
dependabot[bot] 2bc3067b8a core: bump pyroscope-io from 1.3.0 to 1.4.0 (#27337)
Bumps pyroscope-io from 1.3.0 to 1.4.0.

---
updated-dependencies:
- dependency-name: pyroscope-io
  dependency-version: 1.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 14:03:28 +00:00
Dominic Roy c4aed255df blueprints: reapply when !Env values change and key the hashed values (#26932)
* blueprints: reapply when `!Env` or `!File` values change

The values are keyed with the secret key before they go into the hash, since
the hash is visible in the API and a plain hash of a short secret could be
guessed. Blueprints without these tags keep their current hash.

Closes: #26925

* website/docs: note that blueprints reapply when `!Env` or `!File` values change
2026-10-29 13:01:05 +00:00
dependabot[bot] 9e8e930507 core: bump sentry-sdk from 2.72.0 to 2.73.0 (#27336)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.72.0 to 2.73.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.72.0...2.73.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-version: 2.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 13:00:02 +00:00
dependabot[bot] 19704222be core: bump kubernetes from 36.0.3 to 37.0.1 (#27161)
Bumps [kubernetes](https://github.com/kubernetes-client/python) from 36.0.3 to 37.0.1.
- [Release notes](https://github.com/kubernetes-client/python/releases)
- [Changelog](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-client/python/compare/v36.0.3...v37.0.1)

---
updated-dependencies:
- dependency-name: kubernetes
  dependency-version: 37.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 12:45:51 +00:00
dependabot[bot] 45d3a4dfee core: bump goauthentik/fips-debian from 645e4cc to d363011 in /lifecycle/container (#27333)
core: bump goauthentik/fips-debian in /lifecycle/container

Bumps goauthentik/fips-debian from `645e4cc` to `d363011`.

---
updated-dependencies:
- dependency-name: goauthentik/fips-debian
  dependency-version: trixie-slim-fips
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 12:38:17 +00:00
transifex-integration[bot]andauthentik-automation[bot] f8dd76a90b translate: Updates for project authentik and language ca_ES (#27150)
* translate: Translate web/xliff/en.xlf in ca_ES

100% translated source file: 'web/xliff/en.xlf'
on 'ca_ES'.

* translate: normalize locale paths

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>

---------

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-29 12:12:21 +00:00
transifex-integration[bot]andauthentik-automation[bot] 592c941f8a translate: Updates for project authentik and language sv_SE (#27317)
* translate: Translate django.po in sv_SE

100% translated source file: 'django.po'
on 'sv_SE'.

* translate: Translate web/xliff/en.xlf in sv_SE

100% translated source file: 'web/xliff/en.xlf'
on 'sv_SE'.

* translate: normalize locale paths

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>

---------

Signed-off-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-29 12:11:27 +00:00
Dominic Roy dbf9cc2390 enterprise/requests: record requester and reviewer notes on events (#27285)
The access request events only referenced the request, so the notes a
requester entered in the request flow and the notes reviewers left on
an approval or denial never reached the event log. The request is
created with auditing suppressed, so the requester's notes were not in
any event at all.

access_request_created now carries requester_data. The approved and
denied events carry every reviewer's decision with its notes, so
earlier approvers of a multi-reviewer rule are kept too. The approved,
denied and revoked events also resolve their targets to the
application or entitlement instead of the bare policy binding model.

Closes: #27185
2026-10-29 12:05:49 +00:00
Emil BurzoandJens L. fcf1eecac5 ci: ignore django major updates so dependabot opens 5.2.x patch PRs (#27307)
* ci: ignore django major updates so dependabot opens 5.2.x patch PRs

* Apply suggestion from @BeryJu

Signed-off-by: Jens L. <[email protected]>

---------

Signed-off-by: Jens L. <[email protected]>
Co-authored-by: Jens L. <[email protected]>
2026-10-29 12:02:38 +00:00
dependabot[bot] a6dd7057fd ci: bump taiki-e/install-action from 2.87.31 to 2.87.32 in /.github/actions/setup (#27326)
ci: bump taiki-e/install-action in /.github/actions/setup

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.31 to 2.87.32.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/1e29709c0ec63babbe8f266397a465f29a825f91...5488ac5a951645ce95062214902ac4b6bc1a1037)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.32
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 11:20:56 +00:00
dependabot[bot] f20fc7e789 core: bump goauthentik/fips-debian from b97a9f4 to 645e4cc in /lifecycle/container (#21066)
core: bump goauthentik/fips-debian in /lifecycle/container

Bumps goauthentik/fips-debian from `b97a9f4` to `645e4cc`.

---
updated-dependencies:
- dependency-name: goauthentik/fips-debian
  dependency-version: trixie-slim-fips
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 11:01:44 +00:00
dependabot[bot] 5cac608c47 core: bump tokio from 1.53.3 to 1.54.1 (#27324)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.53.3 to 1.54.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.53.3...tokio-1.54.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.54.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 08:07:03 +00:00
dependabot[bot] 397b2f9d3d core: bump cachetools from 7.2.4 to 7.2.5 (#27325)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.4 to 7.2.5.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.4...v7.2.5)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 09:54:07 +02:00
dependabot[bot] fedae9dc0a core: bump aws-lc-rs from 1.18.2 to 1.19.0 (#27323)
Bumps [aws-lc-rs](https://github.com/aws/aws-lc-rs) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/aws/aws-lc-rs/releases)
- [Commits](https://github.com/aws/aws-lc-rs/compare/v1.18.2...v1.19.0)

---
updated-dependencies:
- dependency-name: aws-lc-rs
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-29 09:53:08 +02:00
Jens L. 98c4b2866e root: improve middleware signal handling (#27196)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-29 01:52:01 +00:00
Jens L. c89fff5329 root: lazy imports for heavy modules (#27312)
* root: lazy imports for heavy modules

Signed-off-by: Jens Langhammer <[email protected]>

* ldap3 too

Signed-off-by: Jens Langhammer <[email protected]>

* fix outpost controllers

Signed-off-by: Jens Langhammer <[email protected]>

* fix xmlsec

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-28 19:47:21 +00:00
Dewi RobertsandDominic R 236e0ea909 website/docs: aws agent integration udpates (#27279)
* Update docs

* docs: !

* Address Jens' comments

* Update aws.mdx

---------

Co-authored-by: Dominic R <[email protected]>
2026-10-28 16:57:59 +00:00
Dominic Roy 54219d24e4 website/docs: document brand and system settings cache timeouts (#27310) 2026-10-28 16:21:18 +00:00
Marcelo Elizeche Landó e36f411840 providers/oauth2: fix authorization error routing and encoding (#27295) 2026-10-28 12:53:46 -03:00
dependabot[bot] b3a7d0b5f3 core: bump notify from 8.2.0 to 8.2.1 (#27299)
Bumps [notify](https://github.com/notify-rs/notify) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/notify-rs/notify/releases)
- [Changelog](https://github.com/notify-rs/notify/blob/notify-8.2.1/CHANGELOG.md)
- [Commits](https://github.com/notify-rs/notify/compare/notify-8.2.0...notify-8.2.1)

---
updated-dependencies:
- dependency-name: notify
  dependency-version: 8.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 15:06:00 +00:00
Teffen Ellis b579bb5c92 ci: fix changelog URLs in release workflow (#27276) 2026-10-28 15:05:11 +00:00
authentik-automation[bot] 0df71b7948 core, web: update translations (#27294)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-28 15:04:14 +00:00
Emil Burzo 8b2496a4bc core: bump goauthentik/fips-debian from 7726387 to b97a9f4 in /lifecycle/container (#27306) 2026-10-28 13:18:40 +00:00
Emil Burzo c7020dff77 lifecycle/container: drop no-op curl purge (#27305) 2026-10-28 12:40:20 +00:00
Dominic Roy effa9e40b7 website/docs: document how property mapping results are merged (#27284) 2026-10-28 09:37:55 +00:00
Dominic Roy f04935ea2f website/docs: providers: document how sync conflicts are reported (#27288)
Describe when the SCIM, Google Workspace, and Entra ID providers link
an object that already exists in the remote system, what the sync task
logs when they can't, and how to resolve the conflict.
2026-10-28 09:32:20 +00:00
Marcelo Elizeche Landó 71117f1614 core: bump setuptools from 84.1.0 to v84.2.1 (#27248) 2026-10-28 10:00:02 +02:00
Marcelo Elizeche Landó 605faf5c6c core: bump jsii from 1.140.0 to v1.142.0 (#27222) 2026-10-28 09:59:42 +02:00
dependabot[bot] cf58c7e8fb core: bump goauthentik/platform-ssh from 26.04-ak-0.72.4 to 26.04-ak-0.72.5 in /tests/e2e (#27297)
core: bump goauthentik/platform-ssh in /tests/e2e

Bumps goauthentik/platform-ssh from 26.04-ak-0.72.4 to 26.04-ak-0.72.5.

---
updated-dependencies:
- dependency-name: goauthentik/platform-ssh
  dependency-version: 26.04-ak-0.72.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 09:56:25 +02:00
dependabot[bot] a442a0a692 core: bump goauthentik/selenium from 155.0-ak-0.72.4 to 155.0-ak-0.72.5 in /tests/e2e (#27296)
core: bump goauthentik/selenium in /tests/e2e

Bumps [goauthentik/selenium](https://github.com/SeleniumHQ/docker-selenium) from 155.0-ak-0.72.4 to 155.0-ak-0.72.5.
- [Release notes](https://github.com/SeleniumHQ/docker-selenium/releases)
- [Commits](https://github.com/SeleniumHQ/docker-selenium/commits)

---
updated-dependencies:
- dependency-name: goauthentik/selenium
  dependency-version: 155.0-ak-0.72.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 09:55:50 +02:00
Jacob Sachs 9bbdfd9ee0 providers/scim: scope-aware adoption (#26174)
* initial attempt at SCIM scope fix

* providers/scim: use SystemSettings in discovery tests
2026-10-27 16:14:19 -04:00
Jacob Sachs f38ea3da34 sources/ldap: respect accountExpires attributes (#26135)
* inital attempt to support ldap account expiration

* prefer MicrosoftActiveDirectory helpers

* sources/ldap: extract account status aggregation from user sync
2026-10-27 16:14:02 -04:00
5def7a7497 web/flows: never let continuous login block the final redirect (#26269)
* never let continuous login block the final redirect

The final redirect awaits continuous-login orchestration and the exit
bookkeeping before navigating, so any error or hang there leaves the
page on the spinner after the server has already finished the flow.
In Google's Android account setup WebView, localStorage is null and
the orchestrator throws (#23660, #26267).

- Catch and log orchestration errors in RedirectStage, then always
  navigate.
- Return a copy from discoverTabs(). waitForTabExit() rediscovers
  while the leader iterates the live Set, and entries re-added during
  for...of are visited again, so a follower that never exits was
  resumed forever.
- Resolve the wait when rediscovery rejects in the timer callback, and
  release the tab lock in a finally block.

* web/flow: elect continuous-login resume leader with a Web Lock

Replace the hand-rolled localStorage lock — a non-atomic check-then-set
guarded by a tab-liveness heuristic — with navigator.locks. `ifAvailable`
gives immediate leader election with no double-leader race, and the
browser releases the lock on navigation or close, so there is no stale
lock to reap and no manual cleanup.

* web/test: cover continuous-login multi-tab resume

Drive two real tabs in one browser context: authenticate in the leader
and assert the follower leaves the identification stage on its own. The
global flag is enabled in beforeAll and restored in afterAll; the file
carries the highest numeric prefix and runs serially so it does not race
the parallel login suite.

* Refine comments.

* web/test: align continuous-login e2e with suite conventions

Move the global-flag toggle into an e2e/ helper (setInstanceFlag) so the
test stops hand-constructing fixtures inline, and confirm the settings
save through its success toast instead of matching the settings network
response — keeping the flow on the UI like the rest of the suite.

* web/test: pad the continuous-login visibility assertions

* web/flow: rework continuous-login unit tests around the Web Lock

* web/test: wait for each tab to see the continuous-login flag

* web: share server-context document readers via @goauthentik/core/document

* web/flow: share a brand injection helper across continuous-login tests

* Clean up comment.

---------

Co-authored-by: Teffen Ellis <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]>
2026-10-27 18:31:14 +00:00
Dominic Roy a1e049bae8 website: document password hash import restrictions (#24235)
* website/docs: document password hash import policy

* website/docs: document password salt entropy estimate

* website/docs: use password hash import settings terminology
2026-10-27 16:41:21 +00:00
Dominic RoyandSimonyi Gergő aa137a9099 core: restrict imported password hashers (#24234)
* core: restrict imported password hashers

* hmmm

* apply suggestions from aug25

* Gergo's comments

* api: remove password hash save error handling

* root: define password hash import algorithms

* api: list accepted password hash algorithms

* core: rename password hash override audit fact

* core: use Django password hasher update checks

* api: clarify password hash parameter errors

* core: stop translating bootstrap hash errors

* core: use password hashing settings terminology

* core: remove redundant password hash tests

* core: configure allowed password hashers

* events: record password hash overrides only

* core: default password hash override state

* core: clarify password hash validation flow

* fix lint

* core: remove unused API test import

* repharse salt error message

Since we can't know the alphabet with certainty, we can't know the
entropy with certainty either.

* simplify tests

This is probably enough and is less brittle.

* simplify password hash validation

* packages/client-ts: regenerate

---------

Co-authored-by: Simonyi Gergő <[email protected]>
2026-10-27 16:16:26 +00:00
authentik-automation[bot] c40dc3fe84 core, web: update translations (#27148)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-27 15:43:15 +00:00
Andrew Berry 6c093564d5 server: retry requests on connections closed by a recycled worker (#27275)
When gunicorn recycles a worker after max_requests, the worker closes its
idle keep-alive connections. A request the server had already sent on one
of those pooled connections failed with a connection reset or broken pipe,
and was answered with a 503 "authentik starting" even though gunicorn was
healthy.

Retry such requests once on a new connection when they are safe (GET,
HEAD, OPTIONS, TRACE) and have no body, as Go's net/http transport did
for the previous server, and log upstream errors that still end in a 503.

Fixes #26274

Claude-Session: https://claude.ai/code/session_01WX2DCUMd7PSr17cXK69vQF
2026-10-27 15:34:25 +00:00
Dominic Roy aa020fd63f packages/django-postgres-cache, flows: count cache keys in the database (#25808)
* flows: count cache keys in the database

* fix lint

* flows: count cache entries without extending the cache backend

* packages/django-postgres-cache, flows: add keys_count to the cache backend

keys() is already a method of our backend rather than Django's cache
API, so counting belongs next to it instead of in a direct CacheEntry
query in the flow API. Both methods share one filter, so a count always
matches the length of the key list for the same pattern and version.

* packages/django-postgres-cache: type keys_count test against DatabaseCache
2026-10-27 14:31:52 +00:00
Jens L. 980d4dee74 events: simplify execution of event rules/notifications (#26873)
* events: simplify execution of event rules/notifications

Signed-off-by: Jens Langhammer <[email protected]>

* remove policy engine changes

Signed-off-by: Jens Langhammer <[email protected]>

* separate pe

Signed-off-by: Jens Langhammer <[email protected]>

* sigh

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-27 13:45:36 +00:00
dependabot[bot] 71e8d5b8b6 core: bump github.com/pires/go-proxyproto from 0.15.0 to 0.16.0 (#27260)
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: github.com/pires/go-proxyproto
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 12:54:32 +00:00
dependabot[bot] f1f55b0b93 core: bump goauthentik/platform-ssh from 26.04-ak-0.72.3 to 26.04-ak-0.72.4 in /tests/e2e (#27263)
core: bump goauthentik/platform-ssh in /tests/e2e

Bumps goauthentik/platform-ssh from 26.04-ak-0.72.3 to 26.04-ak-0.72.4.

---
updated-dependencies:
- dependency-name: goauthentik/platform-ssh
  dependency-version: 26.04-ak-0.72.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 11:41:19 +00:00
dependabot[bot] 9eb7c1123f core: bump goauthentik/selenium from 155.0-ak-0.72.3 to 155.0-ak-0.72.4 in /tests/e2e (#27261)
core: bump goauthentik/selenium in /tests/e2e

Bumps [goauthentik/selenium](https://github.com/SeleniumHQ/docker-selenium) from 155.0-ak-0.72.3 to 155.0-ak-0.72.4.
- [Release notes](https://github.com/SeleniumHQ/docker-selenium/releases)
- [Commits](https://github.com/SeleniumHQ/docker-selenium/commits)

---
updated-dependencies:
- dependency-name: goauthentik/selenium
  dependency-version: 155.0-ak-0.72.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 11:40:25 +00:00
dependabot[bot] a16e4fbf4c core: bump astral-sh/uv from 0.13.5 to 0.13.6 in /lifecycle/container (#27264)
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.13.5 to 0.13.6.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.13.5...0.13.6)

---
updated-dependencies:
- dependency-name: astral-sh/uv
  dependency-version: 0.13.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 11:40:06 +00:00
dependabot[bot] 831997277c core: bump jsonpatch from 1.35 to 1.36 (#27269)
Bumps [jsonpatch](https://github.com/stefankoegl/python-json-patch) from 1.35 to 1.36.
- [Release notes](https://github.com/stefankoegl/python-json-patch/releases)
- [Commits](https://github.com/stefankoegl/python-json-patch/compare/v1.35...v1.36)

---
updated-dependencies:
- dependency-name: jsonpatch
  dependency-version: '1.36'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 11:39:33 +00:00
KetchupZandDewi Roberts d428a99d8e outposts: refresh channel groups on hello (#27136)
Co-authored-by: Dewi Roberts <[email protected]>
2026-10-27 11:26:04 +00:00
dependabot[bot] 54230000db core: bump certifi from 2026.10.19 to 2026.10.23 (#27266)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2026.10.19 to 2026.10.23.
- [Commits](https://github.com/certifi/python-certifi/compare/2026.10.19...2026.10.23)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.10.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-27 11:23:54 +00:00
Marcelo Elizeche Landó 76caff2dea core: bump pluggy from 1.6.0 to v1.7.0 (#27238) 2026-10-27 10:11:58 +02:00
Marcelo Elizeche Landó 18e34f5f96 core: bump markupsafe from 3.0.3 to v3.0.4 (#27225) 2026-10-27 10:11:49 +02:00
Marcelo Elizeche Landó da32cba5ea core: bump httptools from 0.8.0 to v0.9.0 (#27219) 2026-10-27 10:11:46 +02:00
Marcelo Elizeche Landó 6242343d0d core: bump iniconfig from 2.3.0 to v2.3.1 (#27221) 2026-10-27 10:11:16 +02:00
Marcelo Elizeche Landó 527d782bb7 core: bump ast-serialize from 0.11.0 to v0.13.1 (#27205) 2026-10-27 10:11:09 +02:00
Marcelo Elizeche Landó 47865deea3 core: bump google-auth-httplib2 from 0.4.2 to v0.4.4 (#27216) 2026-10-27 10:11:06 +02:00
Marcelo Elizeche Landó ecea9e3f9e core: bump wrapt from 2.4.0 to v2.5.1 (#27254) 2026-10-27 10:04:44 +02:00
Marcelo Elizeche Landó c373184d43 core: bump uvloop from 0.22.1 to v0.23.0 (#27250) 2026-10-27 10:04:37 +02:00
Marcelo Elizeche Landó 54528dc899 core: bump proto-plus from 1.28.4 to v1.29.0 (#27240) 2026-10-27 10:04:21 +02:00
Marcelo Elizeche Landó 38070dd9b1 core: bump protobuf from 7.36.1 to v7.36.2 (#27241) 2026-10-27 10:04:18 +02:00
Marcelo Elizeche Landó eef0431a51 core: bump platformdirs from 4.11.8 to v4.13.5 (#27237) 2026-10-27 10:04:12 +02:00
Marcelo Elizeche Landó 0544d38293 core: bump greenlet from 3.5.5 to v3.5.6 (#27218) 2026-10-27 10:03:52 +02:00
Marcelo Elizeche Landó 117fdaff9a core: bump rpds-py from 2026.6.3 to v2026.9.1 (#27246) 2026-10-27 10:03:47 +02:00
Marcelo Elizeche Landó 814f505ca1 core: bump zope-interface from 8.6 to v8.7 (#27256) 2026-10-27 10:03:37 +02:00
Marcelo Elizeche Landó 138a37d66f core: bump pyparsing from 3.3.2 to v3.3.3 (#27244) 2026-10-27 10:03:35 +02:00
Marcelo Elizeche Landó 6686097cdf core: bump propcache from 0.5.2 to v0.5.4 (#27239) 2026-10-27 10:03:32 +02:00
Marcelo Elizeche Landó 465f4431a7 core: bump watchfiles from 1.2.0 to v1.3.0 (#27251) 2026-10-27 10:03:27 +02:00
Marcelo Elizeche Landó cd49bf348c core: bump ua-parser-builtins from 202606 to v202610 (#27249) 2026-10-27 10:03:23 +02:00
Marcelo Elizeche Landó 2fcfa9f3c7 core: bump s3transfer from 0.19.2 to v0.19.3 (#27247) 2026-10-27 10:03:20 +02:00
Marcelo Elizeche Landó 5e58666565 core: bump zipp from 4.1.0 to v4.1.2 (#27255) 2026-10-27 10:03:16 +02:00
Marcelo Elizeche Landó ecd2482047 core: bump websockets from 17.1 to v17.3 (#27253) 2026-10-27 10:03:14 +02:00
Marcelo Elizeche Landó 93454396d2 core: bump django-stubs-ext from 6.1.0 to v6.1.2 (#27212) 2026-10-27 10:03:11 +02:00
Marcelo Elizeche Landó b44537510d core: bump python-dotenv from 1.2.3 to v1.2.4 (#27245) 2026-10-27 10:03:07 +02:00
Marcelo Elizeche Landó c614d735c7 core: bump google-auth from 2.57.1 to v2.62.0 (#27215) 2026-10-27 10:03:04 +02:00
Marcelo Elizeche Landó f4d0ce5c7c core: bump dnspython from 2.8.0 to v2.9.0 (#27213) 2026-10-27 10:03:02 +02:00
Marcelo Elizeche Landó f88bbbfa92 core: bump psycopg-pool from 3.3.1 to v3.3.3 (#27242) 2026-10-27 10:02:57 +02:00
Marcelo Elizeche Landó 57ba7b3519 core: bump librt from 0.15.0 to v0.16.0 (#27224) 2026-10-27 10:02:55 +02:00
Marcelo Elizeche Landó c34dc76e8b core: bump cbor2 from 6.1.4 to v6.1.5 (#27210) 2026-10-27 10:02:47 +02:00
Marcelo Elizeche Landó 5aba7e5423 core: bump maxminddb from 3.1.1 to v3.2.0 (#27226) 2026-10-27 10:02:45 +02:00
Marcelo Elizeche Landó cb5bc90f15 core: bump idna from 3.19 to v3.20 (#27220) 2026-10-27 10:02:40 +02:00
Marcelo Elizeche Landó 107d250021 core: bump charset-normalizer from 3.5.1 to v3.5.2 (#27211) 2026-10-27 10:02:24 +02:00
Marcelo Elizeche Landó 34e0987859 core: bump cattrs from 26.2.0 to v26.2.1 (#27209) 2026-10-27 10:02:19 +02:00
Marcelo Elizeche Landó 06ad9b534b core: bump azure-identity from 1.25.3 to v1.27.0 (#27206) 2026-10-27 09:40:06 +02:00
Marcelo Elizeche Landó 3e12f0c913 core: bump anyio from 4.14.2 to v4.15.1 (#27203) 2026-10-27 09:39:40 +02:00
Marcelo Elizeche Landó aa5ea3f602 core: bump asgiref from 3.12.1 to v3.13.0 (#27204) 2026-10-27 09:39:32 +02:00
Marcelo Elizeche Landó ccd363e6b9 core: bump aiohttp from 3.14.4 to v3.14.5 (#27202) 2026-10-27 09:36:17 +02:00
ΕliandDominic R 2a63024a8b website/integrations: add fluxer (#27271)
* Add Fluxer integration documentation

Added documentation for integrating Fluxer with authentik, including configuration steps and optional settings.

Signed-off-by: Εli <[email protected]>

* integrations: cleanup

* integrations: cleanup

---------

Signed-off-by: Εli <[email protected]>
Co-authored-by: Dominic R <[email protected]>
2026-10-27 07:30:13 +00:00
Ken SternbergandTeffen Ellis c2bf7a42f6 web/elements: sidebar api disconnect (#27075)
* web/elements: prevent wizard double submission

Ignore Next while a step is saving and disable the button meanwhile, so
a second activation can't post the form again. Clear the busy state when
the save fails.

The provider tests' verification searched the table while the wizard was
still open. The modal kept the search field inert, so its Enter went to
the focused Create button and submitted the form a second time. Wait for
the wizard to close first.

Pad each byte in IDGenerator.randomID so IDs have the requested length.

* web/element: remove license & capabilities requirements from SidebarItem

This commit moves the “isLicensed” and “canEnterprise” checks in SidebarItem and instead decorates the SidebarEntries collection with additional flags and values to support holding the information entirely within the Admin UI.

SidebarItem takes two additional attributes: `notice`, which is where the “Enterprise Only” message goes, and `pathoverride`, which will override the default path if provided. This is hardly an elegant way to go around it, but it preserves the original `entries` tree, producing a new tree and not mutating the original. With this, SidebarItem (and Sidebar itself!) is completely generic and no longer needs to know anything at all about licensing or enterprise capability.

The CSS for SidebarItem has been modified: it’s just `notice` not `enterprise-ntice` now. Fit for any purpose under the sun.

A new function, `resolveSidebarEntries`, completely centralizes the logic for “do we even show Enterprise features” and “if the user isn’t licensed, decorate them with ‘enterprise only’ markers”; it contains the logic dictating, for each element in the SidebarEntries tree, if the instance isLicensed and canEnterprise; it filters out entries that are enterprise-only when the instance does not support enterprise features, then generates the new tree, decorating the `attributes` field with the “Enterprise only” message and path override as required. These generic features are passed to SidebarItem.

`ak-interface-admin` then needed only to <s>rip out</s> modify the navigationEntries method to use the `resolveSidebarEntries` function, and remove the redundant check for enterprise-only features in the palette-generator, since those features will not be present after the resolver does its magic.

Also: A couple of tests.

* web/admin: hide enterprise notices until the license summary loads

* web/admin: Make Sidebar a wholly coherent and independent entity

This commit revises how Sidebar works.

I introduce a new type that the Sidebar understands: `SidebarItem`:

``` javascript
export interface SidebarItem {
    label: string;
    key: string;
    expanded?: boolean;
    path?: string | null;
    notice?: string | TemplateResult | null;
    children?: SidebarItem[];
}
```

This type is meant to drive the Sidebar alone, independent of the needs of any client code (although it is, obviously, good enough to support ak-interface-admin).

I revise `Sidebar` to be the whole component; no SidebarItem renderer, no slots. The container into which it is rendered is the client code’s responsibility. There are two levels of rendering: the Groups and the Items, and right now they’re only distinguished by “Does it have children?” There were four renderers in SidebarItem, and two of them are gone since they were unused.

I have deliberately left room to revise this again so that a second-level can support a path *and* children. I have an idea for what to do with it.

The CSS has entirely been brought in to handle a single sidebar.

This is entirely in a controller now; it only needs to be included to do its magic, and it works quite well. I have also revised the very long function names in `expansion.ts` and treat the entire file as a single namespace. The names are shorter and more readable, and can be imported with the `* as SidebarExpansion` syntax to support the full namespace.

This makes Sidebar Session Persistence swappable with a Sidebar Device Persistence (using `localStorage`), should we so desire.

Functions in `expansion` that no one was using have been deleted. YAGNI forever.

*`sidebarEntries.ts`*

The navigation folder is split: the `Entries` file was always meant to be an easy-to-find collection of all the *Entries*, and nothing more, the Entries themselves were meant to be easily editable and fit within a visually informative table. All the tooling cluttered that. With one exception, all tooling has been mooved to the `Tools` file. That exception is a tool, *here*, that will either hand you a “plain” SidebarEntries, or a “can enterprise” SidebarEntries, based on a flag. That logic does not belong in the Interface file.

*`sidebarTools.ts`*

Contains two separate units: one converts the `SidebarEntries` collection into a `SidebarItems` collection fit for sending to the Sidebar. The others (a) assists the Interface in finding the right key to send to the Sidebar for the current path, and (b) assists the header in filling out the page title.

Due to some of the needs in the Interface, `resolveSidebarItems` is an `ExtendedSidebarItem`; it has extra fields to help the CommandPalette. The shape passed to Sidebar is an unchanged `SidebarItem`.

The palette code is revised to understand the new `ExtendedSidebarItem` format.

The `ak-page-navbar` and `ak-sidebar` calls have been revised to take the new format. The values are derived at the beginning of the `render()` function to avoid multiple calls to the resolvers.

* web/admin: drop redundant children fallback in sidebar resolver

* web/elements: separate the enterprise notice from the sidebar link label

---------

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-27 06:33:58 +00:00
Teffen Ellis ec66a3a0ad web/elements: rebuild ak-checkbox-group as a form-associated element (#27048)
* web/elements: rebuild ak-checkbox-group as a form-associated element

ak-checkbox-group now extends FormAssociatedElement instead of the
deprecated AKControlElement, and is form-associated whether or not it has a
name.

`value` is the host's selection and `values` holds the user's choices. A
custom hasChanged compares the two selections as sets of names. Most call
sites compute `value` with map/filter on every render, so a new array with
the same names keeps the user's choices and different names replace them.
This replaces the "apply value on first update only" flag and drops the
write-back into `value`.

The change and input events now reach the host's ancestors. The old
connectedCallback stopped every change and input event on the element,
including its own, and re-added those listeners on each reconnect. Native
input events stop at the checkbox instead.

Form association brings form.elements membership, one FormData entry per
chosen option, formResetCallback restoring the host's value, and a missing
value reported on the first checkbox when `required`. Checkboxes bind
`.checked`, so a reset updates boxes the user already toggled.

* web/elements: return early from ak-checkbox-group validity sync
2026-10-27 05:26:44 +00:00
Ken SternbergandTeffen Ellis 39b0497f7a web/elements: re-arrange sidebar footer dependency (#27033)
* web/element: Move the SidebarVersion out of Elements.

# What

This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.

# Why

SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.

# Details

SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.

`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.

The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.

The hover styling has been moved into SidebarVersion explicitly.

VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.

`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.

The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈

Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.

* Replace aria wayfinders used for testing with Open UI Automation identifiers.

* web/test: locate the about button by role and name

---------

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-27 05:25:34 +00:00
Teffen Ellis 7dc50d2cf2 web/elements: rebuild ak-array-input as a form-associated element (#27046)
* web/elements: rebuild ak-array-input as a form-associated element

ak-array-input now extends FormAssociatedElement instead of the deprecated
AKControlElement.

`items` becomes a plain reactive property. Lit's identity check decides
when the host's list replaces the rows, so re-rendering with the same array
keeps the user's edits and a fresh fetch replaces them. A custom hasChanged
treats two empty lists as equal for hosts that pass `items ?? []`. This
replaces the JSON comparison from the previous commit.

The user's edits live in a `rows` state with keys assigned once per row.
Rows report their value through their change event instead of the element
scraping every row from the DOM. Row change events stop at the array
input, which dispatches one change per edit.

Form association brings form.elements membership, a JSON form value,
formResetCallback restoring the host's items, and native validity: with
`validate`, an invalid row sets a custom error anchored on that row, and
`required` reports a missing value when the list is empty. The element
implements SettlingFormField, so Form.submit() waits for the rows to render.

Footer link and OAuth2 redirect URI rows delegate focus, so a new row's
first control is focused after "Add entry".

* web/elements: match ak-array-input validity sync to the other form-associated elements

Radio, ak-codemirror and ak-search-select each keep a #syncValidity() that
sets the form value, builds the flags and message, and calls
internals.setValidity() once.

* web/elements: return early from ak-array-input validity sync
2026-10-27 05:07:11 +00:00
Ken SternbergandTeffen Ellis ef82977d7c web/admin: Simplify sidebar entries handling (#27112)
* web/admin: Simplify sidebar entries handling

This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.

We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.

@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?

* That side effect infected downstream tests. Darnit.

* Formatter opinions.

* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible.  Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.

* The test exists and passes.

* web/sidebar: move route validation into the unit test

---------

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-27 04:13:00 +00:00
Jens L. 94fd54e694 revert: core: bump paramiko from 5.0.1 to 5.1.0 (#27258)
Revert "core: bump paramiko from 5.0.1 to 5.1.0 (#27164)"

This reverts commit cbbbb7b7ee.
2026-10-27 00:34:32 +00:00
Teffen Ellis 2ad893354c web: Flow overlays cleanup (#27028)
* web: move stylesheets into per-interface folders

Groups the entrypoints and flow stylesheets under styles/if/{authenticated,flow,shared}. Renames and path updates only.

* web/flow: widen login card and align breakpoints

Bumps the card width from 35rem to 36.25rem (matching the small dialog), raises the background-image height cutoff to 27.5rem, and makes the small/large media queries use <= and > consistently so no viewport size matches both.

* web/flow: add FlowMeta type and default flow metadata

* core: extract loading spinner template

Also makes the spinner's aria-valuetext translatable.

* web/flow: render loading overlays from server-provided slots

The flow template now ships card and viewport overlays as slotted light DOM, replacing ak-loading-overlay. The executor only exposes their slots while a challenge is reloading, and overlay.css picks which one is visible per layout and viewport size.
2026-10-26 19:53:28 +00:00
1c38087c0c website/integrations: add agent-claude code doc (#27195)
* Add docs

* Update website/integrations/development/claude-code/index.mdx

Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>

* Update website/docs/endpoint-devices/authentik-agent/device-authentication/cli-app-authentication/index.mdx

Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>

* Changes based on Jens' feedback

* website/docs: cleanup

---------

Signed-off-by: Dewi Roberts <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Co-authored-by: Dominic R <[email protected]>
2026-10-26 14:14:52 -04:00
Jens L.andCopilot Autofix powered by AI 1fd6c73f7f providers/oauth2: support saml token exchange (#27135)
* providers/oauth2: add token exchange SAML2 support

Signed-off-by: Jens Langhammer <[email protected]>

* gen

Signed-off-by: Jens Langhammer <[email protected]>

* allow self

Signed-off-by: Jens Langhammer <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

* lookup by slug

Signed-off-by: Jens Langhammer <[email protected]>

* Potential fix for pull request finding 'Empty except'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Jens L. <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens L. <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-10-26 16:32:57 +00:00
Jens L. d5af6856e6 root: bump rust deps (#27190)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-26 15:24:02 +00:00
Teffen Ellis a0808db4db root: bump Go to 1.27.3 (#27151)
Standalone outpost binaries take their toolchain from go.mod and were built
with 1.27.0; the outpost images already use 1.27.3.
2026-10-26 15:09:29 +00:00
Dewi Roberts 1c664bdcda website/docs: update ha and LDAP provider docs (#27119)
Update ha and LDAP provider doc
2026-10-26 08:01:26 -07:00
Dewi Roberts 476308373f website/docs: events: change sidebar title and ordering (#27130)
Change sidebar title and ordering
2026-10-26 07:54:34 -07:00
dependabot[bot] d871a47233 core: bump library/golang from 1896654 to fbb7ae4 in /lifecycle/container (#27157)
core: bump library/golang in /lifecycle/container

Bumps library/golang from `1896654` to `fbb7ae4`.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-version: 1.27-trixie
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:33 +00:00
dependabot[bot] 43793dfee5 core: bump library/node from 1653c74 to 36793bc in /lifecycle/container (#27158)
core: bump library/node in /lifecycle/container

Bumps library/node from `1653c74` to `36793bc`.

---
updated-dependencies:
- dependency-name: library/node
  dependency-version: 26.12.1-trixie-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:27 +00:00
dependabot[bot] ea40165e3c core: bump library/node from 62314d9 to a98e6fd in /website (#27159)
Bumps library/node from `62314d9` to `a98e6fd`.

---
updated-dependencies:
- dependency-name: library/node
  dependency-version: 26.12.1-trixie
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:21 +00:00
dependabot[bot] 7d27cc8ccc core: bump library/nginx from 1.31.6-trixie to 1.31.8-trixie in /website (#27160)
Bumps library/nginx from 1.31.6-trixie to 1.31.8-trixie.

---
updated-dependencies:
- dependency-name: library/nginx
  dependency-version: 1.31.8-trixie
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:15 +00:00
dependabot[bot] f60f5c661e ci: bump the codeql group across 1 directory with 3 updates (#27165)
Bumps the codeql group with 3 updates in the / directory: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.39.0 to 4.39.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee...9b3254085494b55a0f7c4c2b3d2d52cc712ce370)

Updates `github/codeql-action/autobuild` from 4.39.0 to 4.39.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee...9b3254085494b55a0f7c4c2b3d2d52cc712ce370)

Updates `github/codeql-action/analyze` from 4.39.0 to 4.39.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee...9b3254085494b55a0f7c4c2b3d2d52cc712ce370)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: codeql
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: codeql
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: codeql
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:09 +00:00
dependabot[bot] 1761ed2586 ci: bump getsentry/action-release from 3.7.1 to 3.7.2 (#27166)
Bumps [getsentry/action-release](https://github.com/getsentry/action-release) from 3.7.1 to 3.7.2.
- [Release notes](https://github.com/getsentry/action-release/releases)
- [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/action-release/compare/6fb9aeade7061441cf3864e34fbe11a1457ad7dc...e6703d0b00208e0b3687ba660d18ab5af7892821)

---
updated-dependencies:
- dependency-name: getsentry/action-release
  dependency-version: 3.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:58:04 +00:00
dependabot[bot] 259517f499 ci: bump actions/setup-python from 7.0.0 to 7.1.0 in /.github/actions/setup (#27167)
ci: bump actions/setup-python in /.github/actions/setup

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:57:58 +00:00
dependabot[bot] 9646c34f7b ci: bump astral-sh/setup-uv from 10.3.0 to 10.3.2 in /.github/actions/setup (#27168)
ci: bump astral-sh/setup-uv in /.github/actions/setup

Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.3.0 to 10.3.2.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/1c37ad07a6a961277cf70c0d37d6f313000f5884...07a047e608db84b3d8c06cd9a7c7dcc9c355c18e)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:57:52 +00:00
dependabot[bot] cffca91de8 ci: bump taiki-e/install-action from 2.87.29 to 2.87.31 in /.github/actions/setup (#27169)
ci: bump taiki-e/install-action in /.github/actions/setup

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.29 to 2.87.31.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/8cca0918f8471c33515202b73f56ab27f2bed283...1e29709c0ec63babbe8f266397a465f29a825f91)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 12:57:46 +00:00
dependabot[bot] a2dc06e073 core: bump setuptools from 84.0.0 to 84.1.0 (#27175)
Bumps [setuptools](https://github.com/pypa/setuptools) from 84.0.0 to 84.1.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v84.0.0...v84.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 84.1.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 11:38:32 +02:00
dependabot[bot] cbbbb7b7ee core: bump paramiko from 5.0.1 to 5.1.0 (#27164)
Bumps [paramiko](https://github.com/paramiko/paramiko) from 5.0.1 to 5.1.0.
- [Commits](https://github.com/paramiko/paramiko/compare/5.0.1...5.1.0)

---
updated-dependencies:
- dependency-name: paramiko
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 08:37:21 +00:00
dependabot[bot] 6ee52753db core: bump ruff from 0.17.1 to 0.17.2 (#27163)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.17.1...0.17.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.17.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 10:06:49 +02:00
dependabot[bot] 99c57a6436 core: bump pyrad from 2.5.4 to 2.6.0 (#27162)
Bumps [pyrad](https://github.com/pyradius/pyrad) from 2.5.4 to 2.6.0.
- [Release notes](https://github.com/pyradius/pyrad/releases)
- [Changelog](https://github.com/pyradius/pyrad/blob/master/CHANGES.rst)
- [Commits](https://github.com/pyradius/pyrad/compare/2.5.4...2.6.0)

---
updated-dependencies:
- dependency-name: pyrad
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 10:05:15 +02:00
dependabot[bot] b1b8ce7185 core: bump axllent/mailpit from v1.31.6 to v1.32.0 in /tests/e2e (#27155)
Bumps axllent/mailpit from v1.31.6 to v1.32.0.

---
updated-dependencies:
- dependency-name: axllent/mailpit
  dependency-version: v1.32.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 10:03:45 +02:00
dependabot[bot] 223de58133 core: bump goauthentik/platform-ssh from 26.04-ak-0.72.1 to 26.04-ak-0.72.3 in /tests/e2e (#27156)
core: bump goauthentik/platform-ssh in /tests/e2e

Bumps goauthentik/platform-ssh from 26.04-ak-0.72.1 to 26.04-ak-0.72.3.

---
updated-dependencies:
- dependency-name: goauthentik/platform-ssh
  dependency-version: 26.04-ak-0.72.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 10:02:52 +02:00
dependabot[bot] 0267ff613b core: bump goauthentik/selenium from 152.0-ak-0.72.1 to 155.0-ak-0.72.3 in /tests/e2e (#27154)
core: bump goauthentik/selenium in /tests/e2e

Bumps [goauthentik/selenium](https://github.com/SeleniumHQ/docker-selenium) from 152.0-ak-0.72.1 to 155.0-ak-0.72.3.
- [Release notes](https://github.com/SeleniumHQ/docker-selenium/releases)
- [Commits](https://github.com/SeleniumHQ/docker-selenium/commits)

---
updated-dependencies:
- dependency-name: goauthentik/selenium
  dependency-version: 155.0-ak-0.72.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 10:01:42 +02:00
Connor Peshek 3f10b64d70 stages/authenticator_webauthn: prevent duplicate enrollment via excludeCredentials (#24451)
* stages/authenticator_webauthn: remove prevent_duplicate_devices

* stages/authenticator_webauthn: prevent duplicate enrollment via excludeCredentials

* only exclude confirmed devices

* add feedback
2026-10-26 05:19:59 +00:00
aab9fb5fca website/integrations: add filex (#27152)
* website/integrations: add filex

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* filex: clean up

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Dominic R <[email protected]>
2026-10-26 01:31:04 +00:00
Jens L. 7ff197b50a enterprise: cache license summary in-memory (#27147)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-25 01:54:05 +00:00
Jens L. 64b803383e packages/django-postgres-cache: revert to plain SQL instead of ORM (#27146)
* packages/django-postgres-cache: revert to plain SQL instead of ORM

Signed-off-by: Jens Langhammer <[email protected]>

* remove django-postgres-extra

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-25 00:49:51 +01:00
Jens L. a25ffa9785 brands: in memory cache (#26926)
* brands: in memory cache

Signed-off-by: Jens Langhammer <[email protected]>

* fix tests

Signed-off-by: Jens Langhammer <[email protected]>

* same cache for system settings

Signed-off-by: Jens Langhammer <[email protected]>

* fix typing

Signed-off-by: Jens Langhammer <[email protected]>

* invalidate all via channels

Signed-off-by: Jens Langhammer <[email protected]>

* Revert "invalidate all via channels"

This reverts commit 6186875d77.

* fixup

Signed-off-by: Jens Langhammer <[email protected]>

* down to 1 min, add to API

Signed-off-by: Jens Langhammer <[email protected]>

* add ui

Signed-off-by: Jens Langhammer <[email protected]>

* fix gen

Signed-off-by: Jens Langhammer <[email protected]>

* Apply suggestion from @BeryJu

Signed-off-by: Jens L. <[email protected]>

* fixes for web-e2e

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens L. <[email protected]>
2026-10-24 19:50:52 +01:00
Jens L. 71930c1da7 events: cache app lookup & optimize event user (#27143)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-24 17:23:59 +01:00
7a92c99821 sources/oauth: support Entra national cloud group membership (#27091)
* sources/oauth: support Entra national cloud group membership

* website/docs: align Entra cloud setup with style guide

* Docs update

* Spelling

* refactor URL

Signed-off-by: Jens Langhammer <[email protected]>

* removeSimpleTestCase

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Dewi Roberts <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
2026-10-23 15:20:22 +01:00
Jens L. cd6f84fe4a website/docs: remove xattr workaround for agent (#27128)
since 0.72.3 the installer is correctly signed, notarised and stapled so this isnt needed anymore

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-23 13:59:27 +01:00
Ken Sternberg 4aef2aa503 web/elements: make ak-toggle-group akForm-compatible and form-associated (#27092)
* Initial check-in, but I need the test harness cleared to do the other fixes.

* .
2026-10-23 13:29:37 +01:00
Jens L. 8a8c952998 root: bump ctutils (#27129)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-23 13:14:37 +01:00
Jens L.andKen Sternberg 0f5a9432b9 web/elements: make toggle group usable as input field (#27061)
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Ken Sternberg <[email protected]>
2026-10-23 12:50:50 +01:00
Simonyi Gergő dfe71c6ccd sources/ldap: fix password write error message (#27076) 2026-10-23 12:48:33 +01:00
authentik-automation[bot] 757dabdab2 core, web: update translations (#27123)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-23 12:46:06 +01:00
dependabot[bot] 545479ecad core: bump cachetools from 7.2.3 to 7.2.4 (#27125)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.3 to 7.2.4.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.3...v7.2.4)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-23 11:11:44 +03:00
Connor Peshek 61e1f1d0a4 sources/saml: log response processing errors and show users a generic message (#27012)
* sources/saml: log response processing errors and show users a generic message

* pass full exception
2026-10-22 21:13:54 +00:00
Connor PeshekandDewi Roberts 46cbb1480c sources/saml: Tell IDP to use AES256-GCM by default (#27010)
* sources/saml: Tell IDP to use AES256-GCM by default

* update

* Docs tidy

---------

Co-authored-by: Dewi Roberts <[email protected]>
2026-10-22 15:57:18 -05:00
Dewi Roberts 678beb6f13 website/docs: fix mention of saml 1.1 assertion support for ws-fed (#27113)
Fix 1.1 vs 2.0 docs
2026-10-22 18:51:51 +00:00
Jan KahmenandTeffen Ellis aeb0989ea2 web/elements: test that ak-mdx does not evaluate API-supplied content (#24524)
Render <ak-mdx> with content that calls a probe from an expression and
from an ESM export, and assert the probe never runs, while Markdown
still renders.

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-22 17:19:16 +00:00
Teffen Ellis c3b29d2187 root: require Node.js 24.22.1 (#27093)
* root: require Node.js 24.22.1

Raise the minimum Node.js version to the 24.22.1 security release
across `.nvmrc`, `engines.node`, and `devEngines.runtime`.

https://nodejs.org/en/blog/release/v24.22.1

* lifecycle/container, website: bump node images to 26.12.1

Pin both build images to the 26.12.1 security release. The server
image previously floated on the `26-trixie-slim` tag.

https://nodejs.org/en/blog/release/v26.12.1

* ci: fix stale setup-node version comments

The pinned commit is already v7.1.0 (#26852, #26854).

* scripts/node: support || and ^ ranges in lint-runtime

Check versions against every `||`-separated comparator instead of a single `>=` or exact pin.

* root: exclude unpatched Node.js 25 and 26 releases

Narrow the engines range to `^24.22.1 || >=26.12.1`. The previous
`>=24.22.1` also accepted 26.12.0 and every 25.x release.
2026-10-22 18:02:59 +01:00
Dewi Roberts 3abd6e5e51 website/docs: change routing info after 2026.8 changes (#27109)
Update embedded.mdx
2026-10-22 16:02:10 +00:00
dependabot[bot] 807cd00b3f core: bump astral-sh/uv from 0.13.4 to 0.13.5 in /lifecycle/container (#27096)
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.13.4 to 0.13.5.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.13.4...0.13.5)

---
updated-dependencies:
- dependency-name: astral-sh/uv
  dependency-version: 0.13.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 12:28:40 +01:00
Jens L. adfca030c1 flows: avoid saving plan history when inspector inaccessible (#27089)
* flows: avoid saving plan history when inspector inaccessible

Signed-off-by: Jens Langhammer <[email protected]>

* fix lint & user delete tests

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-22 11:41:39 +01:00
dependabot[bot] 0a7b8705f6 core: bump pyo3 from 0.29.0 to 0.30.1 (#27099)
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.29.0 to 0.30.1.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.30.1/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.29.0...v0.30.1)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 07:55:05 +00:00
dependabot[bot] 6644b384ac core: bump arc-swap from 1.9.2 to 1.9.3 (#27098)
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.9.2 to 1.9.3.
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/commits/v1.9.3)

---
updated-dependencies:
- dependency-name: arc-swap
  dependency-version: 1.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 10:13:31 +03:00
dependabot[bot] b2bdbd0bba core: bump pyroscope-io from 1.2.5 to 1.3.0 (#27100)
Bumps pyroscope-io from 1.2.5 to 1.3.0.

---
updated-dependencies:
- dependency-name: pyroscope-io
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 10:12:51 +03:00
dependabot[bot] f135df66b8 core: bump pyo3-build-config from 0.29.0 to 0.30.1 (#27097)
Bumps [pyo3-build-config](https://github.com/pyo3/pyo3) from 0.29.0 to 0.30.1.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.30.1/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.29.0...v0.30.1)

---
updated-dependencies:
- dependency-name: pyo3-build-config
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 10:11:54 +03:00
dependabot[bot] 4d11af21c2 core: bump dexidp/dex from v2.46.0 to v2.46.1 in /tests/e2e (#27095)
Bumps [dexidp/dex](https://github.com/dexidp/dex) from v2.46.0 to v2.46.1.
- [Release notes](https://github.com/dexidp/dex/releases)
- [Commits](https://github.com/dexidp/dex/compare/v2.46.0...v2.46.1)

---
updated-dependencies:
- dependency-name: dexidp/dex
  dependency-version: v2.46.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-22 10:11:16 +03:00
HenryandDominic R 63ab65f3e5 website/integrations: VCF 9: touch up (#27094)
* update 1

Signed-off-by: Henry <[email protected]>

* info

* rename + title on info section

* website/docs: !

---------

Signed-off-by: Henry <[email protected]>
Co-authored-by: Dominic R <[email protected]>
2026-10-21 23:51:02 +00:00
Emil BurzoandEmil Burzo 088d72e671 lifecycle/container: add a distroless version of the server image (#26321)
* lifecycle/container: build the server image distroless

* redo

* wip

* shorter comment

* update base images from fips#178

Co-authored-by: Emil Burzo <[email protected]>
Signed-off-by: Emil Burzo <[email protected]>

* non-PR fips image

---------

Signed-off-by: Emil Burzo <[email protected]>
2026-10-21 19:42:40 +03:00
Emil Burzo 5ed22141ee ci: run tests in the server image (#26510)
* ci: run tests on the distroless server image

* redo

* wip

* fix test_locales

* match main
2026-10-21 19:42:40 +03:00
Teffen Ellis 0643bba680 packages/client-ts: Generate imports with .js extensions (#27029)
Set `importFileExtension` so the generator emits Node-resolvable
relative imports, and switch the client to `nodenext` module
resolution in place of the bundler-only workaround.
2026-10-21 16:02:44 +00:00
dependabot[bot]andJens Langhammer 223f54ecfe core: bump djangorestframework from 3.18.1 to 3.18.3 (#26838)
* core: bump djangorestframework from 3.18.1 to 3.18.3

Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.18.1 to 3.18.3.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.18.1...3.18.3)

---
updated-dependencies:
- dependency-name: djangorestframework
  dependency-version: 3.18.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* gen

Signed-off-by: Jens Langhammer <[email protected]>

* fix tests

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <[email protected]>
2026-10-21 13:59:33 +01:00
Emil Burzo 052edb7d27 website/docs: add release notes for 2026.8.5 (#27084) 2026-10-21 11:34:06 +00:00
Emil Burzo d3176ae7d6 website/docs: add release notes for 2026.5.8 (#27083)
release notes for 2026.5.8
2026-10-21 14:15:11 +03:00
authentik-automation[bot] 74bba5bd21 core, web: update translations (#27035)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
2026-10-21 11:40:50 +01:00
dependabot[bot] 83109e16d2 core: bump twilio from 9.11.2 to 9.12.0 (#27081)
Bumps [twilio](https://github.com/twilio/twilio-python) from 9.11.2 to 9.12.0.
- [Release notes](https://github.com/twilio/twilio-python/releases)
- [Changelog](https://github.com/twilio/twilio-python/blob/main/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-python/compare/9.11.2...9.12.0)

---
updated-dependencies:
- dependency-name: twilio
  dependency-version: 9.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 08:17:53 +00:00
dependabot[bot] 4e59ecce27 core: bump cachetools from 7.2.2 to 7.2.3 (#27082)
Bumps [cachetools](https://github.com/tkem/cachetools) from 7.2.2 to 7.2.3.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.2.2...v7.2.3)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 08:15:17 +00:00
dependabot[bot] 66fba9b87b core: bump paramiko from 5.0.0 to 5.0.1 (#27080)
Bumps [paramiko](https://github.com/paramiko/paramiko) from 5.0.0 to 5.0.1.
- [Commits](https://github.com/paramiko/paramiko/compare/5.0.0...5.0.1)

---
updated-dependencies:
- dependency-name: paramiko
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 10:53:15 +03:00
dependabot[bot] cce41038de core: bump ruff from 0.17.0 to 0.17.1 (#27077)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.17.0...0.17.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.17.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 10:52:19 +03:00
Jens L. ed243d60dc lib/tracing: fix sentry tracing when otel is enabled (#27066)
* lib/tracing: fix sentry tracing when otel is enabled

Signed-off-by: Jens Langhammer <[email protected]>

* remove from experiments

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-21 00:55:06 +01:00
pulgasa 7b653d4b0b website/integrations: audiobookshelf: Fix Post Logout URI (#27074)
Signed-off-by: pulgasa <[email protected]>
2026-10-20 23:21:10 +00:00
Jens L. aba73777c0 web/user: fix agents tab flashing without license (#27069)
* web/user: fix agents tab flashing without license

Signed-off-by: Jens Langhammer <[email protected]>

* format, sigh

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 22:29:44 +01:00
Jens L. d53447b6bc root: bump cert-related deps due to emudhra (#27068)
* root: bump cert-related deps due to emudhra

Signed-off-by: Jens Langhammer <[email protected]>

* bump

Signed-off-by: Jens Langhammer <[email protected]>

* update go too

Signed-off-by: Jens Langhammer <[email protected]>

* fix cargo deny

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 21:37:30 +01:00
Teffen Ellis 1b68f3c027 web: fix table fetch races and search select e2e lookups (#27059)
* web/elements: show the table loading state until the first response

Since #26423 dropped the visibility check from renderRows, a table whose
first fetch is deferred until it scrolls into view rendered its empty
state, including the empty state's own create button, until that fetch
started. Render the loading state whenever there's no data yet, which is
what #26423 describes, while still not reverting to it once data exists.

* web/elements: rerun a table fetch requested while one is in flight

Table.fetch() returned early while a request was in flight, so a search
typed during the first load was silently dropped: the box showed the
query while the table kept the unfiltered results. Queue the request
instead and run it once the in-flight one settles, with whatever
parameters are current by then. Repeated requests collapse into one
follow-up.

* web/e2e: filter search selects for plain-text patterns

selectSearchValue only typed a filter for string patterns, so a RegExp
like /default-authentication-flow/ searched the picker's first page of
options. Once a dev instance accumulates enough test flows, the stock
defaults drop off that page and unrelated provider and brand tests fail.
Type the pattern's text as a filter when it's plain, and fall back to
the unfiltered list for options the server doesn't search, such as the
blank choice.

* Format.
2026-10-20 20:56:22 +01:00
dependabot[bot] f6373b481a core: bump astral-sh/uv from 0.13.1 to 0.13.3 in /lifecycle/container (#27037)
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.13.1 to 0.13.3.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.13.1...0.13.3)

---
updated-dependencies:
- dependency-name: astral-sh/uv
  dependency-version: 0.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 18:26:16 +01:00
Jens L. 747243c69e policies: fix warning from setting non-string tracing data (#27062)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 18:19:35 +01:00
Jens L. 7968fb43c3 root: annotate hot paths (#27052)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 18:19:20 +01:00
Dominic Roy da2d83c318 website/docs: contributing: add guidelines for vendor contributions (#27032) 2026-10-20 16:59:54 +00:00
Connor PeshekandDewi Roberts f6e2acf6f5 providers/saml: Add ability to select encryption algorithm (#27009)
* providers/saml: add configurable assertion encryption algorithm

* update to main and add docs

* show only when encryption certificate is set, update help text

* default to aes256-gcm

* update wording

* update

* Docs tidy

* feedback

---------

Co-authored-by: Dewi Roberts <[email protected]>
2026-10-20 11:02:29 -05:00
Jens L. 98961371f0 lib: set postgres timezone on connection (#27053)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 14:45:09 +01:00
Emil BurzoandJens Langhammer f6b83e41b1 core: add postgres connection info (#27024)
* core: add postgres version and JIT setting in system info

* ssl info

* handle error

Signed-off-by: Jens Langhammer <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
2026-10-20 14:43:22 +01:00
Jens L. bf9a3f7fcb ci: fix cargo deny for basic-toml (#27054)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 13:29:12 +01:00
Teffen Ellis 103b228fb2 web/elements: keep ak-array-input edits through form submission (#27045)
Form.submit() became async in #26566 and now awaits settleFormFields()
before serializing. That gives the host form a chance to re-render first,
and Lit re-assigns array property bindings on every render, so
`.items=${settings.footerLinks}` reset the list to the server's copy and
the PUT went out with stale values.

The items setter now ignores a list whose contents match the one the
parent last assigned.

This also fixes a long-standing keying bug. The setter's map callback had
its arguments swapped, so every row got a fresh key on each change and
`repeat` rebuilt it. Clicking from one field into another in the same row
sent the next keystrokes into a detached input. Edits, adds and deletes now
operate on the keyed list directly, and delete removes the clicked row by
key instead of by index.
2026-10-20 12:26:13 +01:00
Jens L. a6458625c4 enterprise: optimize middleware (#27015)
* enterprise: optimize middleware

Signed-off-by: Jens Langhammer <[email protected]>

* optimize more

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
2026-10-20 11:54:31 +01:00
dependabot[bot] 30f7ffaaf4 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 goauthentik/platform-ssh in /tests/e2e

Bumps goauthentik/platform-ssh from 26.04-ak-0.72.0 to 26.04-ak-0.72.1.

---
updated-dependencies:
- dependency-name: goauthentik/platform-ssh
  dependency-version: 26.04-ak-0.72.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 07:03:49 +00:00
dependabot[bot] 57e2ec1b67 core: bump ruff from 0.16.10 to 0.17.0 (#27044)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.10 to 0.17.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.16.10...0.17.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.17.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:47:39 +03:00
dependabot[bot] 6d69fb1041 core: bump sentry-sdk from 2.71.0 to 2.72.0 (#27043)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.71.0 to 2.72.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.71.0...2.72.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-version: 2.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:47:11 +03:00
dependabot[bot] e02da24604 core: bump django-postgres-extra from 3.0.0 to 3.0.1 (#27042)
Bumps [django-postgres-extra](https://github.com/SectorLabs/django-postgres-extra) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/SectorLabs/django-postgres-extra/releases)
- [Commits](https://github.com/SectorLabs/django-postgres-extra/commits)

---
updated-dependencies:
- dependency-name: django-postgres-extra
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:43:07 +03:00
dependabot[bot] 6ab4cc65e5 core: bump python-kadmin-rs from 0.7.4 to 0.7.5 (#27040)
Bumps [python-kadmin-rs](https://github.com/authentik-labs/kadmin-rs) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/authentik-labs/kadmin-rs/releases)
- [Commits](https://github.com/authentik-labs/kadmin-rs/compare/kadmin/version/0.7.4...kadmin/version/0.7.5)

---
updated-dependencies:
- dependency-name: python-kadmin-rs
  dependency-version: 0.7.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:42:40 +03:00
dependabot[bot] ab6e667f51 core: bump goauthentik/selenium from 152.0-ak-0.72.0 to 152.0-ak-0.72.1 in /tests/e2e (#27039)
core: bump goauthentik/selenium in /tests/e2e

Bumps [goauthentik/selenium](https://github.com/SeleniumHQ/docker-selenium) from 152.0-ak-0.72.0 to 152.0-ak-0.72.1.
- [Release notes](https://github.com/SeleniumHQ/docker-selenium/releases)
- [Commits](https://github.com/SeleniumHQ/docker-selenium/commits)

---
updated-dependencies:
- dependency-name: goauthentik/selenium
  dependency-version: 152.0-ak-0.72.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:42:13 +03:00
dependabot[bot] e47f86b7d2 core: bump aiohttp from 3.14.3 to 3.14.4 (#27034)
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-version: 3.14.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 09:39:54 +03:00
Shawn O'DellandTeffen Ellis 2eafedc1c1 web/flow: fix remember-me being cleared by CSRF token rotation (#25205)
* web: namespace storage keys and migrate legacy values

Split #common/storage into an accessor and shared types, and require
storage keys to use the ak: prefix via a PersistenceKey type. Values
under the old remember-me and library view mode keys are moved to the
new keys on load, so returning users keep their remembered username and
layout. The migrations are marked for removal in 2027.2 (#27036).

Remove ShowHintController, which has had no users since #21781.

* web/flow: fix remember-me being cleared by CSRF token rotation

The remembered username was keyed to a session ID derived from the CSRF
token, and cleared whenever the two didn't match. Django rotates the
CSRF token on every successful login, so the check failed on every
later visit and the username was always forgotten. Drop the check, so
the username is only cleared by switching the toggle off or following
"Not you?", and discard the session ID left by earlier versions.

Co-authored-by: Shawn O'Dell <[email protected]>

* web/flow: bind remember-me keystroke listener for returning users

The remember-me input listener was only attached from the toggle's change
handler, so a returning user, who arrives with the switch already checked,
never had it bound. A different user on the same device could type and
submit their own username without it ever reaching localStorage, leaving
the previous username prefilled forever, and auto-submitted in
identification-only flows.

Track whether the feature is on, seeded from the persisted value, and
reconcile the listener when the controller connects and after each update.
The stage adds the controller after it has rendered, so a further update
isn't guaranteed. Cancel a pending keystroke write when the listener is
detached, so switching the toggle off can't be undone by a write queued in
the same frame. Disconnect the controller before the stage removes it,
since removeController doesn't notify it and the listener would otherwise
keep recording after the server turns remember-me off.

Co-authored-by: Shawn O'Dell <[email protected]>

* web/flow: respect the remember-me toggle when auto-submitting

canAutoSubmit only checked whether a username was remembered when the
page loaded, so a returning user who switched the toggle off was kept
from being auto-submitted only by the one-shot attempt counter. Also
require the feature to still be on. Checking only the live toggle state
would instead auto-submit first-time visitors as soon as they opted in.

* web/e2e: wait for the login flow before running browser tests

The API answers before the worker has applied the default blueprints.
Until then `/` redirects to an authentication flow that doesn't exist
yet and 404s, so the availability check could fail on a slow start and
skip the whole suite. Poll until the redirect chain resolves, and run
the setup steps serially so the login step waits on it too.

---------

Co-authored-by: Teffen Ellis <[email protected]>
2026-10-20 05:17:01 +01:00
Ken Sternberg a749575a30 web/theme: Remove the categories build from the theme (#26982)
## What

This commit removes the generation of the seven categories from the Theme build:

- `./color.css`
- `./typography.css`
- `./spacing.css`
- `./shape.css`
- `./shadow.css`
- `./motion.css`
- `./z-index.css`

And correspondingly:

- The exports are removed from `package.json`
- The documentation has been updated to remove the reference to the category files
- Bumps the major version number to reflect that this is a major change, even if we have no one who uses the removed feature.

## Why

Mostly because we’re not using it, and we don’t know anyone else who is. Lines of code we run with every build, that builds tools we never use, is a liability in terms of maintenance, performance, test time, and code quality. These files are generated through regular expressions over the generated CSS, which is notoriously fragile; a change in the Styleframe output would require corresponding changes to the parser. There are no tests to validate the parser output.

If we need them back someday, (a) they’re still there, and still categorized, in the DTCG (Design Token Community Group) files and can be extracted at any time and (b) the original code is still in the git history, there for as long as the repo lasts.

Practically, *we* don’t even use the categories in Patternfly SASS files when we look something up; we just got to `patternfly.css` and look at the generated theme file. What `package.json` generates is the base theme for Authentik and the metadata necessary to make that theme malleable for agents and automation tools. The DTCG and Theme CSS Custom Property files are more than sufficient for that purpose; if anything, as a separate source of truth for “what is a property set to?” the category files are a barrier to tooling rather than a help.
2026-10-19 15:31:12 -07:00
dependabot[bot] 72d5a74797 core: bump library/golang from 2f84bc9 to 4766793 in /lifecycle/container (#26996)
core: bump library/golang in /lifecycle/container

Bumps library/golang from `2f84bc9` to `4766793`.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-version: 1.27-trixie
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 17:33:25 +01:00
Connor Peshek f1a8934934 providers/saml: verify logoutrequest/response signatures (#26534)
* providers/saml: verify logoutrequest/response signatures

* add feedback
2026-10-19 11:09:16 -05:00
Ken Sternberg b2d7466257 core/outposts: Move setOutpostHost() from the client to the server (#26979)
* core/outposts: Move `setOutpostHost()` from the client to the server

## What

Writes the `config.outpost.authentik_host` field from information derived on first set-up and available server-side, then removes the same transaction from the client.q

## Why

@beryju has proposed some changes to the Dashboard, and making them would be awkward if a critical infrastructure transaction like this were made “optional” to the system administrator. My first thought was to move just this transaction into a ReactiveController so we could hook it into the lifecycle of something else, like the Dashboard shell or even the entire Admin application shell in ak-interface-admin. He pointed out that the current `main` has `base_url` as a *required* field. So putting it into the server makes sense.

The port was straightforward. I’m not so confident about the tests, but I think they’re right. I’m not as comfortable with the reconciliation process as I should be. There’s some deep magic there. (And *why* is `ManagedAppConfig` in `blueprints`, of all places?)

* Sigh.

* Have I ever mentioned how much I hate side-effects?
2026-10-19 09:02:07 -07:00
dependabot[bot] 2765e2551f core: bump library/node from 26.11.1-trixie to 26.12.0-trixie in /website (#26999)
core: bump library/node in /website

Bumps library/node from 26.11.1-trixie to 26.12.0-trixie.

---
updated-dependencies:
- dependency-name: library/node
  dependency-version: 26.12.0-trixie
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 16:04:18 +01:00
dependabot[bot] c2a9af999e ci: bump taiki-e/install-action from 2.87.28 to 2.87.29 in /.github/actions/setup (#27008)
ci: bump taiki-e/install-action in /.github/actions/setup

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.28 to 2.87.29.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/1168f6810a3cb30a3514bf5756a3b7f0422c6df8...8cca0918f8471c33515202b73f56ab27f2bed283)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 16:04:06 +01:00
Alexander Tereshkin d9f633652f stages/email: make rate limit apply across flow restarts, not just on "resend email" button (#25496) 2026-10-19 15:56:31 +01:00
Emil Burzo bd56b644c7 lifecycle: disable PostgreSQL JIT (#26970)
disable postgres JIT
2026-10-19 15:45:23 +01:00
dependabot[bot] 8c6b57018a ci: bump the codeql group across 1 directory with 3 updates (#27004)
Bumps the codeql group with 3 updates in the / directory: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.38.3 to 4.39.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee)

Updates `github/codeql-action/autobuild` from 4.38.3 to 4.39.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee)

Updates `github/codeql-action/analyze` from 4.38.3 to 4.39.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: codeql
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: codeql
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: codeql
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 15:31:29 +01:00
Dewi Roberts 76c97217b0 website/docs: kerberos: remove version frontmatter (#27019)
Remove version frontmatter
2026-10-19 14:22:49 +00:00
Jens L. 6002cf57a9 web/admin: fix duplicate locale ID (#27018)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-19 15:08:40 +01:00
Jens L. 12df5be965 providers/oauth2: token exchange support chained act (#26668)
Signed-off-by: Jens Langhammer <[email protected]>
2026-10-19 14:54:19 +01:00
1508 changed files with 71122 additions and 17189 deletions

No files matched your search

+6 -1
View File
@@ -7,7 +7,6 @@ allow = [
"CDLA-Permissive-2.0",
"ISC",
"MIT",
"MPL-2.0",
"OpenSSL",
"Unicode-3.0",
"Zlib",
@@ -45,3 +44,9 @@ allow = [
]
name = "aws-lc-rs"
exact = true
[advisories]
ignore = [
# https://github.com/askama-rs/askama/issues/594
{ id = "RUSTSEC-2026-0374", reason = "basic-toml is a build-time only dependency of the askama template engine, not shipped in the app or daemon; remove when askama drops basic-toml" },
]
+4 -4
View File
@@ -42,12 +42,12 @@ runs:
sudo rsync -a --delete /tmp/empty/ /usr/local/lib/android/
- name: Install uv
if: ${{ contains(inputs.dependencies, 'python') }}
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v5
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v5
with:
enable-cache: true
- name: Setup python
if: ${{ contains(inputs.dependencies, 'python') }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v5
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v5
with:
python-version-file: "${{ inputs.working-directory }}pyproject.toml"
- name: Install Python deps
@@ -69,7 +69,7 @@ runs:
rustflags: ""
- name: Setup rust dependencies
if: ${{ contains(inputs.dependencies, 'rust') }}
uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2
uses: taiki-e/install-action@1919c4a95903d2c33e4a221102edca87309fc14b # v2
with:
tool: cargo-deny cargo-machete cargo-llvm-cov nextest
- name: Setup pnpm
@@ -85,7 +85,7 @@ runs:
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- name: Setup node (root, web)
if: ${{ contains(inputs.dependencies, 'node') }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ${{ inputs.working-directory }}package.json
cache: pnpm
+6
View File
@@ -310,6 +310,12 @@ updates:
opentelemetry:
patterns:
- opentelemetry-*
ignore:
# Without this rule no 5.2.x patch PR gets opened.
# TODO: Remove this rule when moving to Django 6.
- dependency-name: "django"
update-types:
- "version-update:semver-major"
#endregion
@@ -28,6 +28,14 @@ on:
description: "Build args to pass to Docker"
type: string
default: ""
image-target:
description: "Dockerfile stage to build. Empty builds the last stage."
type: string
default: ""
image-tag-suffix:
description: "Suffix for the tags and the artifacts of an image variant that is built from another stage"
type: string
default: ""
should-cache:
description: "Whether a build cache should be created"
type: boolean
@@ -47,7 +55,7 @@ jobs:
packages: write
# Needed for checkout
contents: read
name: "Build ${{ inputs.image-name }} on ${{ inputs.image-arch }}"
name: "Build ${{ inputs.image-name }}${{ inputs.image-tag-suffix }} on ${{ inputs.image-arch }}"
runs-on: "${{ inputs.runs-on }}"
outputs:
image-digest: "${{ steps.build.outputs.digest }}"
@@ -74,6 +82,7 @@ jobs:
# inputs
context: .
file: "${{ inputs.image-dockerfile }}"
target: "${{ inputs.image-target }}"
build-args: "${{ inputs.image-build-args }}"
secrets: |
GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }}
@@ -81,19 +90,19 @@ jobs:
# outputs
push: false
cache-from: |
type=registry,ref=ghcr.io/goauthentik/dev-${{ inputs.image-name }}:buildcache-${{ inputs.image-arch }}-main
type=registry,ref=ghcr.io/goauthentik/dev-${{ inputs.image-name }}:buildcache-${{ inputs.image-arch }}${{ inputs.cache-suffix }}
cache-to: "${{ inputs.should-cache && format('type=registry,ref=ghcr.io/goauthentik/dev-{0}:buildcache-{1}{2},mode=max', inputs.image-name, inputs.image-arch, inputs.cache-suffix) || '' }}"
type=registry,ref=ghcr.io/goauthentik/dev-${{ inputs.image-name }}:buildcache-${{ inputs.image-arch }}${{ inputs.image-tag-suffix }}-main
type=registry,ref=ghcr.io/goauthentik/dev-${{ inputs.image-name }}:buildcache-${{ inputs.image-arch }}${{ inputs.image-tag-suffix }}${{ inputs.cache-suffix }}
cache-to: "${{ inputs.should-cache && format('type=registry,ref=ghcr.io/goauthentik/dev-{0}:buildcache-{1}{2}{3},mode=max', inputs.image-name, inputs.image-arch, inputs.image-tag-suffix, inputs.cache-suffix) || '' }}"
attests: |
type=provenance,mode=max
outputs: |
type=oci,dest=build/container/${{ inputs.image-name }}-${{ inputs.image-arch }}.oci.tar
type=oci,dest=build/container/${{ inputs.image-name }}${{ inputs.image-tag-suffix }}-${{ inputs.image-arch }}.oci.tar
# params
platforms: "linux/${{ inputs.image-arch }}"
- id: upload
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v4
with:
name: "container-build-${{ inputs.image-name }}-${{ inputs.image-arch }}"
name: "container-build-${{ inputs.image-name }}${{ inputs.image-tag-suffix }}-${{ inputs.image-arch }}"
path: build/
if-no-files-found: error
retention-days: 2
@@ -12,6 +12,14 @@ on:
description: "Name of the image to build"
type: string
required: true
image-target:
description: "Dockerfile stage to build. Empty builds the last stage."
type: string
default: ""
image-tag-suffix:
description: "Suffix for the tags and the artifacts of an image variant that is built from another stage"
type: string
default: ""
image-dockerfile:
description: "Path to the Dockerfile to build from"
type: string
@@ -39,6 +47,8 @@ jobs:
image-name: "${{ inputs.image-name }}"
image-arch: amd64
image-dockerfile: "${{ inputs.image-dockerfile }}"
image-target: "${{ inputs.image-target }}"
image-tag-suffix: "${{ inputs.image-tag-suffix }}"
image-build-args: "${{ inputs.image-build-args }}"
should-cache: "${{ inputs.should-cache }}"
cache-suffix: "${{ inputs.cache-suffix }}"
@@ -52,6 +62,8 @@ jobs:
image-name: "${{ inputs.image-name }}"
image-arch: arm64
image-dockerfile: "${{ inputs.image-dockerfile }}"
image-target: "${{ inputs.image-target }}"
image-tag-suffix: "${{ inputs.image-tag-suffix }}"
image-build-args: "${{ inputs.image-build-args }}"
should-cache: "${{ inputs.should-cache }}"
cache-suffix: "${{ inputs.cache-suffix }}"
@@ -73,7 +85,7 @@ jobs:
run: |
set -euo pipefail
image_name="${{ inputs.image-name }}"
image_name="${{ inputs.image-name }}${{ inputs.image-tag-suffix }}"
target="ocidir://${image_name}:build"
regctl image import \
@@ -231,7 +243,7 @@ jobs:
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v4
with:
name: "container-build-${{ inputs.image-name }}"
name: "container-build-${{ inputs.image-name }}${{ inputs.image-tag-suffix }}"
path: build/
if-no-files-found: error
retention-days: 2
+3 -3
View File
@@ -31,7 +31,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -54,7 +54,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -100,7 +100,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
+3 -3
View File
@@ -33,7 +33,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -57,7 +57,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
name: Setup Node.js
with:
node-version-file: package.json
@@ -82,7 +82,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
+7 -5
View File
@@ -22,12 +22,14 @@ jobs:
- version-2026-5
- version-2026-8
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
- run: |
set -euo pipefail
current="$(pwd)"
dir="/tmp/authentik/${{ matrix.version }}"
mkdir -p "${dir}/lifecycle/container"
wget "https://${{ matrix.version }}.goauthentik.io/compose.yml" -O /tmp/compose.yml
# Test the release that the compose file runs, with that release's own script
tag="$(grep -m1 -o 'AUTHENTIK_TAG:-[^}]*' /tmp/compose.yml)"
tag="${tag#AUTHENTIK_TAG:-}"
git clone --depth 1 --branch "version/${tag}" https://github.com/goauthentik/authentik.git "${dir}"
cp /tmp/compose.yml "${dir}/lifecycle/container/compose.yml"
cd "${dir}"
wget "https://${{ matrix.version }}.goauthentik.io/compose.yml" -O "${dir}/lifecycle/container/compose.yml"
"${current}/scripts/test_docker.sh"
./scripts/test_docker.sh
+57 -12
View File
@@ -53,6 +53,10 @@ jobs:
include:
- name: server
dockerfile: Dockerfile
- name: server
dockerfile: Dockerfile
target: distroless
tag-suffix: -distroless
- name: proxy
dockerfile: proxy.Dockerfile
- name: ldap
@@ -67,6 +71,8 @@ jobs:
ref: "${{ github.ref }}"
image-name: "${{ matrix.name }}"
image-dockerfile: "lifecycle/container/${{ matrix.dockerfile }}"
image-target: "${{ matrix.target || '' }}"
image-tag-suffix: "${{ matrix.tag-suffix || '' }}"
image-build-args: |
GIT_BUILD_HASH=${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
should-cache: "${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}"
@@ -345,7 +351,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -376,6 +382,39 @@ jobs:
if: ${{ always() }}
with:
flags: e2e
test-container:
name: test-container - server${{ matrix.tag-suffix }}${{ matrix.fips && ' (FIPS)' || '' }} - Run ${{ matrix.run_id }}/10
runs-on: ubuntu-26.04
timeout-minutes: 30
needs:
- build
- test-make-seed
strategy:
fail-fast: false
matrix:
tag-suffix: ["", "-distroless"]
run_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
include:
- tag-suffix: "-distroless"
fips: true
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v5
with:
name: container-build-server${{ matrix.tag-suffix }}-amd64
- name: Load container image
run: |
skopeo copy "oci-archive:container/server${{ matrix.tag-suffix }}-amd64.oci.tar" "docker-daemon:authentik.invalid/goauthentik/server:ci${{ matrix.tag-suffix }}"
rm -rf container/
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
- name: Run tests in the server image
env:
AUTHENTIK_IMAGE: authentik.invalid/goauthentik/server
AUTHENTIK_TAG: ci${{ matrix.tag-suffix }}
CI_TEST_SEED: ${{ needs.test-make-seed.outputs.seed }}
CI_RUN_ID: ${{ matrix.run_id }}
CI_TOTAL_RUNS: "10"
AUTHENTIK_COMPLIANCE__FIPS__ENABLED: ${{ matrix.fips }}
run: ./scripts/test_docker.sh
test-openid-conformance:
name: test-openid-conformance (${{ matrix.job.name }})
runs-on: ubuntu-26.04
@@ -604,6 +643,7 @@ jobs:
- test-unittest
- test-integration
- test-e2e
- test-container
- test-rust
runs-on: ubuntu-26.04
steps:
@@ -615,6 +655,7 @@ jobs:
needs:
- build-compute-tags
- build
- ci-core-mark
permissions:
# Needed to upload container images to ghcr.io
packages: write
@@ -628,12 +669,14 @@ jobs:
strategy:
fail-fast: false
matrix:
name:
- server
- proxy
- ldap
- radius
- rac
include:
- name: server
- name: server
tag-suffix: -distroless
- name: proxy
- name: ldap
- name: radius
- name: rac
steps:
- uses: regclient/actions/regctl-installer@dd58ad94f76adb73d8ac1bf75ed25f01545d5b32
# logs in to ghcr.io by default
@@ -646,15 +689,15 @@ jobs:
password: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v5
with:
name: "container-build-${{ matrix.name }}"
name: "container-build-${{ matrix.name }}${{ matrix.tag-suffix }}"
- id: publish
name: publish
run: |
regctl image import "ocidir://${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-full }}" "container/${{ matrix.name }}.oci.tar"
regctl image import "ocidir://${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-full }}" "container/${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
echo "digest=$(regctl image digest "ocidir://${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-full }}")" >> "$GITHUB_OUTPUT"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-full }}" "container/${{ matrix.name }}.oci.tar"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-branch }}" "container/${{ matrix.name }}.oci.tar"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-flux }}" "container/${{ matrix.name }}.oci.tar"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-full }}${{ matrix.tag-suffix }}" "container/${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-branch }}${{ matrix.tag-suffix }}" "container/${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
regctl image import "ghcr.io/goauthentik/dev-${{ matrix.name }}:${{ needs.build-compute-tags.outputs.tag-flux }}${{ matrix.tag-suffix }}" "container/${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
- uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6
with:
subject-name: "ghcr.io/goauthentik/dev-${{ matrix.name }}"
@@ -687,6 +730,7 @@ jobs:
```shell
AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=${{ needs.build-compute-tags.outputs.tag-full }}
# Distroless image: AUTHENTIK_TAG=${{ needs.build-compute-tags.outputs.tag-full }}-distroless
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
```
@@ -705,6 +749,7 @@ jobs:
image:
repository: ghcr.io/goauthentik/dev-server
tag: ${{ needs.build-compute-tags.outputs.tag-full }}
# Distroless image: tag: ${{ needs.build-compute-tags.outputs.tag-full }}-distroless
```
Afterwards, run the upgrade commands from the latest release notes.
+3 -3
View File
@@ -32,7 +32,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -62,7 +62,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
@@ -100,7 +100,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
cache: pnpm
+1 -1
View File
@@ -45,7 +45,7 @@ jobs:
run: |
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: package.json
registry-url: https://registry.npmjs.org
+14 -6
View File
@@ -21,17 +21,25 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ["go", "javascript", "python"]
language:
- lang: "go"
deps: "system,go,runtime"
- lang: "javascript"
deps: "system,node,runtime"
- lang: "python"
deps: "system,python,rust,runtime"
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
- name: Setup authentik env
uses: ./.github/actions/setup
- name: Initialize CodeQL
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3
with:
languages: ${{ matrix.language }}
dependencies: ${{ matrix.language.deps }}
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: ${{ matrix.language.lang }}
- name: Autobuild
uses: github/codeql-action/autobuild@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3
uses: github/codeql-action/autobuild@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
+16 -14
View File
@@ -41,12 +41,14 @@ jobs:
strategy:
fail-fast: false
matrix:
name:
- server
- proxy
- ldap
- radius
- rac
include:
- name: server
- name: server
tag-suffix: -distroless
- name: proxy
- name: ldap
- name: radius
- name: rac
needs:
- metadata
env:
@@ -63,18 +65,18 @@ jobs:
password: "${{ secrets.DOCKER_CORP_PASSWORD }}"
- name: Download release container artifact
run: |
gh release download "${{ needs.metadata.outputs.tag-name }}" --pattern "${{ matrix.name }}.oci.tar"
gh attestation verify "${{ matrix.name }}.oci.tar" --owner goauthentik
gh release download "${{ needs.metadata.outputs.tag-name }}" --pattern "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
gh attestation verify "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar" --owner goauthentik
- id: publish
name: Publish container
run: |
regctl image import "ocidir://${{ matrix.name }}:${{ needs.metadata.outputs.version }}" "${{ matrix.name }}.oci.tar"
regctl image import "ocidir://${{ matrix.name }}:${{ needs.metadata.outputs.version }}" "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
echo "digest=$(regctl image digest "ocidir://${{ matrix.name }}:${{ needs.metadata.outputs.version }}")" >> "$GITHUB_OUTPUT"
regctl image import "ghcr.io/goauthentik/${{ matrix.name }}:${{ needs.metadata.outputs.version }}" "${{ matrix.name }}.oci.tar"
regctl image import "docker.io/authentik/${{ matrix.name }}:${{ needs.metadata.outputs.version }}" "${{ matrix.name }}.oci.tar"
regctl image import "ghcr.io/goauthentik/${{ matrix.name }}:${{ needs.metadata.outputs.version }}${{ matrix.tag-suffix }}" "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
regctl image import "docker.io/authentik/${{ matrix.name }}:${{ needs.metadata.outputs.version }}${{ matrix.tag-suffix }}" "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
if [ "${{ needs.metadata.outputs.release-reason }}" != "prerelease" ]; then
regctl image import "ghcr.io/goauthentik/${{ matrix.name }}:${{ needs.metadata.outputs.version-family }}" "${{ matrix.name }}.oci.tar"
regctl image import "docker.io/authentik/${{ matrix.name }}:${{ needs.metadata.outputs.version-family }}" "${{ matrix.name }}.oci.tar"
regctl image import "ghcr.io/goauthentik/${{ matrix.name }}:${{ needs.metadata.outputs.version-family }}${{ matrix.tag-suffix }}" "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
regctl image import "docker.io/authentik/${{ matrix.name }}:${{ needs.metadata.outputs.version-family }}${{ matrix.tag-suffix }}" "${{ matrix.name }}${{ matrix.tag-suffix }}.oci.tar"
fi
# we need to re-login for the attestation to go through
- uses: docker/login-action@v4
@@ -165,7 +167,7 @@ jobs:
container=$(docker container create "$image")
docker cp ${container}:web/ .
- name: Create a Sentry.io release
uses: getsentry/action-release@6fb9aeade7061441cf3864e34fbe11a1457ad7dc # v3
uses: getsentry/action-release@e6703d0b00208e0b3687ba660d18ab5af7892821 # v3
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+19 -7
View File
@@ -48,11 +48,11 @@ jobs:
- id: changelog-url
run: |
if [ "${{ inputs.release_reason }}" = "feature" ]; then
changelog_url="https://docs.goauthentik.io/docs/releases/${{ steps.check.outputs.version-family }}"
changelog_url="https://docs.goauthentik.io/releases/${{ steps.check.outputs.version-family }}"
elif [ "${{ inputs.release_reason }}" = "prerelease" ]; then
changelog_url="https://next.goauthentik.io/docs/releases/${{ steps.check.outputs.version-family }}"
changelog_url="https://next.goauthentik.io/releases/${{ steps.check.outputs.version-family }}"
else
changelog_url="https://docs.goauthentik.io/docs/releases/${{ steps.check.outputs.version-family }}#fixed-in-$(echo -n "${{ steps.check.outputs.version }}" | sed 's/\.//g')"
changelog_url="https://docs.goauthentik.io/releases/${{ steps.check.outputs.version-family }}#fixed-in-$(echo -n "${{ steps.check.outputs.version }}" | sed 's/\.//g')"
fi
echo "changelog-url=${changelog_url}" >> "$GITHUB_OUTPUT"
outputs:
@@ -118,6 +118,10 @@ jobs:
include:
- name: server
dockerfile: Dockerfile
- name: server
dockerfile: Dockerfile
target: distroless
tag-suffix: -distroless
- name: proxy
dockerfile: proxy.Dockerfile
- name: ldap
@@ -132,6 +136,8 @@ jobs:
ref: "${{ needs.bump-version.outputs.release-commit }}"
image-name: "${{ matrix.name }}"
image-dockerfile: "lifecycle/container/${{ matrix.dockerfile }}"
image-target: "${{ matrix.target || '' }}"
image-tag-suffix: "${{ matrix.tag-suffix || '' }}"
image-build-args: |
VERSION=${{ needs.check-inputs.outputs.version }}
build-go-binaries:
@@ -222,20 +228,24 @@ jobs:
retention-days: 2
include-hidden-files: true
test:
name: Pre-release test
name: Pre-release test (server${{ matrix.tag-suffix }})
runs-on: ubuntu-26.04
needs:
- check-inputs
- bump-version
- build-container
strategy:
fail-fast: false
matrix:
tag-suffix: ["", "-distroless"]
steps:
- name: Fetch container images
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v5
with:
name: container-build-server-amd64
name: container-build-server${{ matrix.tag-suffix }}-amd64
- name: Load container images
run: |
skopeo copy "oci-archive:container/server-amd64.oci.tar" "docker-daemon:authentik.invalid/goauthentik/server:${{ needs.check-inputs.outputs.version }}"
skopeo copy "oci-archive:container/server${{ matrix.tag-suffix }}-amd64.oci.tar" "docker-daemon:authentik.invalid/goauthentik/server:${{ needs.check-inputs.outputs.version }}${{ matrix.tag-suffix }}"
rm -rf container/
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
with:
@@ -244,7 +254,7 @@ jobs:
env:
COMPOSE_PROJECT_NAME: authentik-release-test
AUTHENTIK_IMAGE: authentik.invalid/goauthentik/server
AUTHENTIK_TAG: "${{ needs.check-inputs.outputs.version }}"
AUTHENTIK_TAG: "${{ needs.check-inputs.outputs.version }}${{ matrix.tag-suffix }}"
run: ./scripts/test_docker.sh
create-release:
name: Create release
@@ -301,6 +311,7 @@ jobs:
subject-path: |
metadata.json
container/server.oci.tar
container/server-distroless.oci.tar
container/proxy.oci.tar
container/ldap.oci.tar
container/radius.oci.tar
@@ -320,6 +331,7 @@ jobs:
files: |
metadata.json
container/server.oci.tar
container/server-distroless.oci.tar
container/proxy.oci.tar
container/ldap.oci.tar
container/radius.oci.tar
+1 -1
View File
@@ -1 +1 @@
24.20
24.22.1
+1 -1
View File
@@ -18,7 +18,7 @@ The Python core and the web UI talk through a **generated OpenAPI client** — n
```
authentik/ # Django core — the IdP itself (see "The authentik Django package" below)
lifecycle/ # Boot/runtime: migrations, the prefork Python server, the `ak` CLI, container + AWS entrypoints
lifecycle/ # Boot/runtime: migrations, gunicorn config, the `ak` CLI, container + AWS entrypoints
cmd/ # Go entrypoints: ldap/ rac/ radius/ outposts
internal/ # Shared Go: outpost implementations, config
src/ # Rust server/worker (ak-axum based; gated behind cargo features)
Generated
+84 -222
View File
@@ -28,15 +28,15 @@ dependencies = [
[[package]]
name = "alloc-no-stdlib"
version = "2.0.4"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a"
[[package]]
name = "alloc-stdlib"
version = "0.2.2"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1"
dependencies = [
"alloc-no-stdlib",
]
@@ -56,56 +56,6 @@ dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
[[package]]
name = "anstyle-parse"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys 0.61.2",
]
[[package]]
name = "anyhow"
version = "1.0.102"
@@ -114,9 +64,9 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "arc-swap"
version = "1.9.2"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b"
checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e"
dependencies = [
"rustversion",
]
@@ -452,9 +402,9 @@ dependencies = [
[[package]]
name = "aws-lc-rs"
version = "1.18.2"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13"
checksum = "048006790404103c488e6c5616b3e7e702a71292aadda08e8f7698a9e0d2eb53"
dependencies = [
"aws-lc-fips-sys",
"aws-lc-sys",
@@ -464,9 +414,9 @@ dependencies = [
[[package]]
name = "aws-lc-sys"
version = "0.46.0"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc"
checksum = "8bfbe32ac36b3c428696ce315464181bc4029d689fd58e3f2a4e58c252242f52"
dependencies = [
"cc",
"cmake",
@@ -699,9 +649,9 @@ dependencies = [
[[package]]
name = "brotli"
version = "8.0.2"
version = "9.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560"
checksum = "6737ce8b81460bf9407909f73ff50bf13f7cb8577e1e76715f57ed0eba58ba44"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -710,9 +660,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
version = "5.0.0"
version = "6.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
checksum = "34c6783f42c21c952ad7112b354f0ba2f10760e9decea5b1b60523d6e270faaf"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -820,46 +770,6 @@ dependencies = [
"libloading",
]
[[package]]
name = "clap"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 3.0.3",
]
[[package]]
name = "clap_lex"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
[[package]]
name = "cmake"
version = "0.1.57"
@@ -902,21 +812,6 @@ dependencies = [
"tracing-error",
]
[[package]]
name = "colorchoice"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
[[package]]
name = "colored"
version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "combine"
version = "4.6.7"
@@ -929,9 +824,9 @@ dependencies = [
[[package]]
name = "compression-codecs"
version = "0.4.37"
version = "0.4.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb7b51a7d9c967fc26773061ba86150f19c50c0d65c887cb1fbe295fd16619b7"
checksum = "cae36683101b2899f48bd31f8db9839437356188e3b1ff23096e73dab09ba8fe"
dependencies = [
"brotli",
"compression-core",
@@ -943,9 +838,9 @@ dependencies = [
[[package]]
name = "compression-core"
version = "0.4.31"
version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d"
checksum = "2ebdda89edc534bf8d5dd2857562633b6495557e5846552ade994b99ed13c36a"
[[package]]
name = "concurrent-queue"
@@ -1154,9 +1049,9 @@ dependencies = [
[[package]]
name = "ctutils"
version = "0.4.2"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e"
checksum = "38d28fb6aa7dd680b3ffd1a3e64e115c177bdba63c0ae7f9cd48129ff05c4fa0"
dependencies = [
"cmov",
]
@@ -1272,17 +1167,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "docsmg"
version = "0.0.0"
dependencies = [
"clap",
"colored",
"dotenvy",
"eyre",
"regex",
]
[[package]]
name = "dotenvy"
version = "0.15.7"
@@ -1479,15 +1363,6 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "fsevent-sys"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2"
dependencies = [
"libc",
]
[[package]]
name = "futures"
version = "0.3.34"
@@ -2135,12 +2010,6 @@ dependencies = [
"serde",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "itertools"
version = "0.13.0"
@@ -2575,20 +2444,21 @@ dependencies = [
[[package]]
name = "notify"
version = "8.2.0"
version = "8.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
checksum = "82f812702fbc75d35416d3f884e04925be7e9498f4eceea2e24ba34559284674"
dependencies = [
"bitflags 2.11.0",
"fsevent-sys",
"inotify",
"kqueue",
"libc",
"log",
"mio",
"notify-types",
"objc2-core-foundation",
"objc2-core-services",
"walkdir",
"windows-sys 0.60.2",
"windows-sys 0.61.2",
]
[[package]]
@@ -2726,6 +2596,16 @@ dependencies = [
"objc2-foundation",
]
[[package]]
name = "objc2-core-services"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583300ad934cba24ff5292aee751ecc070f7ca6b39a574cc21b7b5e588e06a0b"
dependencies = [
"libc",
"objc2-core-foundation",
]
[[package]]
name = "objc2-core-text"
version = "0.3.2"
@@ -2835,12 +2715,6 @@ version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "openssl-probe"
version = "0.2.1"
@@ -3054,9 +2928,9 @@ dependencies = [
[[package]]
name = "pyo3"
version = "0.29.1"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc153f5fd745cc038b5eed86622125969f8a39834a57bc96beaaf2512b1da729"
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
dependencies = [
"libc",
"once_cell",
@@ -3068,18 +2942,18 @@ dependencies = [
[[package]]
name = "pyo3-build-config"
version = "0.29.1"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb77d9aa6d647507b55c69ee714d266d84c526c78ff0bc6dd8757f58591e64d1"
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
version = "0.29.1"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3160087aa5733bce7d9a729f8c55f85a2a53b74742a09613178eeebff0722253"
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
dependencies = [
"libc",
"pyo3-build-config",
@@ -3087,26 +2961,26 @@ dependencies = [
[[package]]
name = "pyo3-macros"
version = "0.29.1"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91f9d455db760a9a0b0ddeaac25f1390b8a36ba73dfbda9f127cac6fc340d4d5"
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
"quote",
"syn 2.0.117",
"syn 3.0.3",
]
[[package]]
name = "pyo3-macros-backend"
version = "0.29.1"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e343bcec300ff262f5806a33a4e51b6d097a8a46435f512fcb83e95592581625"
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.117",
"syn 3.0.3",
]
[[package]]
@@ -3550,9 +3424,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
[[package]]
name = "rustls-webpki"
version = "0.103.15"
version = "0.103.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
dependencies = [
"aws-lc-rs",
"ring",
@@ -3633,9 +3507,9 @@ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
[[package]]
name = "sentry"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa951f4e644464ebfd2347a7ab03b0828c512d2448a76262cad2607b343dff4"
checksum = "e7c2c887f17023c9462a4202176efc33ca7228f9c30c0141c765ab534ab2d36b"
dependencies = [
"cfg_aliases",
"httpdate",
@@ -3654,9 +3528,9 @@ dependencies = [
[[package]]
name = "sentry-backtrace"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f27cf048aa63ccd5bc94c29989133eabb82e9c6bf7441b58e9d4a95837a105"
checksum = "c391d4330f3b37fdddf2b928151244e8c2dc0cfea1740e455cc8942af436f919"
dependencies = [
"backtrace",
"regex",
@@ -3665,9 +3539,9 @@ dependencies = [
[[package]]
name = "sentry-contexts"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5ed680585dbdacdf9859c2b4dc53358ff02bd256766882e22e343836db36b22"
checksum = "654dacb94135c713e1dcbff01314a83d333f0e62f76b91fed5ab87415075530c"
dependencies = [
"hostname",
"libc",
@@ -3679,9 +3553,9 @@ dependencies = [
[[package]]
name = "sentry-core"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3ed398494bb8fc412a11a182c1883a10ae147587b8f6314abd222d1d626f31b"
checksum = "edcb294ca821e5c5624edaf33535eb18b06ef4f8675201d3e4d81ce325741692"
dependencies = [
"rand 0.10.3",
"sentry-types",
@@ -3692,9 +3566,9 @@ dependencies = [
[[package]]
name = "sentry-debug-images"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55854bb40681e84ffd2a69578ad4ef9bfaf5bf2bf1380a745578b591fa24af22"
checksum = "74835055f6a57b78c0e13f941b460e39edc1899b05fe31dd47cd02367f70888f"
dependencies = [
"findshlibs",
"sentry-core",
@@ -3702,9 +3576,9 @@ dependencies = [
[[package]]
name = "sentry-panic"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7153e68642b761ed3aa62c022795c11b2facc728b2db7484084492373c944f9"
checksum = "f5d28522f81ed90510ec43ed01cb1873a393b329dc719f93335b4c75fbef05d1"
dependencies = [
"sentry-backtrace",
"sentry-core",
@@ -3712,9 +3586,9 @@ dependencies = [
[[package]]
name = "sentry-tower"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624ee2c60caf72fa2cd6be00334b3a3ce0c6df3b1f01941ea62e3d244492d334"
checksum = "057730796d82b72f35f57e66fc41c2b9e334eb3edf5030dd18d3b1f88d062c78"
dependencies = [
"sentry-core",
"tower-layer",
@@ -3723,9 +3597,9 @@ dependencies = [
[[package]]
name = "sentry-tracing"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7e7db1aefdf623f4e48e21ec9e4af535024187aeafb2a4cc7e29d035def5a13"
checksum = "ec67c296aadc41d4d41b64738908c51cacddf99edebe7a2b476f9bf40de93ff5"
dependencies = [
"bitflags 2.11.0",
"sentry-backtrace",
@@ -3736,9 +3610,9 @@ dependencies = [
[[package]]
name = "sentry-types"
version = "0.49.3"
version = "0.49.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c18bf7b159bdfc7c8f97816f476b4947a1937fb6bea9d38d3479e58631614ac"
checksum = "83d84a36b6bdeeb7813976fb899fca45d94540d2e2b80eac91ba66b4c654d8f0"
dependencies = [
"debugid",
"hex",
@@ -4029,7 +3903,7 @@ dependencies = [
"tracing",
"url",
"uuid",
"webpki-roots 1.0.6",
"webpki-roots 1.0.10",
]
[[package]]
@@ -4180,12 +4054,6 @@ dependencies = [
"unicode-properties",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "subtle"
version = "2.6.1"
@@ -4388,9 +4256,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.53.3"
version = "1.54.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e"
checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
dependencies = [
"bytes",
"libc",
@@ -4813,7 +4681,7 @@ dependencies = [
"rustls-pki-types",
"ureq-proto",
"utf8-zero",
"webpki-roots 1.0.6",
"webpki-roots 1.0.10",
]
[[package]]
@@ -4853,17 +4721,11 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
version = "1.28.0"
version = "1.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606"
checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514"
dependencies = [
"getrandom 0.4.2",
"js-sys",
@@ -5060,9 +4922,9 @@ dependencies = [
[[package]]
name = "webpki-root-certs"
version = "1.0.6"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca"
checksum = "58ec80e73fd8baf57bf0d9615554c75348bda990d6d5bbeab964dd068319fecb"
dependencies = [
"rustls-pki-types",
]
@@ -5073,14 +4935,14 @@ version = "0.26.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
dependencies = [
"webpki-roots 1.0.6",
"webpki-roots 1.0.10",
]
[[package]]
name = "webpki-roots"
version = "1.0.6"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed"
checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9"
dependencies = [
"rustls-pki-types",
]
@@ -5681,27 +5543,27 @@ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
[[package]]
name = "zstd"
version = "0.13.3"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "7.2.4"
version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.0.16+zstd.1.5.7"
version = "2.1.2+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
dependencies = [
"cc",
"pkg-config",
+8 -12
View File
@@ -3,7 +3,6 @@ members = [
"packages/ak-axum",
"packages/ak-common",
"packages/client-rust",
"website/scripts/docsmg",
]
resolver = "3"
@@ -19,21 +18,19 @@ license-file = "LICENSE"
publish = false
[workspace.dependencies]
arc-swap = "= 1.9.2"
arc-swap = "= 1.9.3"
argh = "= 0.1.19"
askama = "= 0.16.1"
axum-server = { version = "= 0.8.0", features = ["tls-rustls-no-provider"] }
aws-lc-rs = { version = "= 1.18.2", features = ["fips"] }
aws-lc-rs = { version = "= 1.19.0", features = ["fips"] }
axum = { version = "= 0.8.9", features = ["http2", "macros", "ws"] }
axum-extra = { version = "= 0.12.6", default-features = false, features = [
"cookie-signed",
"cookie-key-expansion",
] }
base64 = "= 0.23.1"
clap = { version = "= 4.6.7", features = ["derive", "env"] }
chrono = { version = "0.4.45", features = ["serde"] }
color-eyre = "= 0.6.5"
colored = "= 3.1.1"
config-rs = { package = "config", version = "= 0.15.22", default-features = false, features = [
"json",
"yaml",
@@ -71,16 +68,15 @@ moka = { version = "= 0.12.16", default-features = false, features = [
nix = { version = "= 0.31.3", features = [
"fs",
"hostname",
"process",
"signal",
"user",
] }
notify = "= 8.2.0"
notify = "= 8.2.1"
pem = "= 4.0.0"
percent-encoding = "= 2.3.2"
pin-project-lite = "= 0.2.17"
pyo3 = "= 0.29.1"
pyo3-build-config = "= 0.29.1"
pyo3 = "= 0.30.1"
pyo3-build-config = "= 0.30.1"
rand = "= 0.10.3"
rcgen = { version = "= 0.14.10", default-features = false, features = [
"aws_lc_rs",
@@ -103,7 +99,7 @@ reqwest-middleware = { version = "= 0.5.2", features = [
"rustls",
] }
rustls = { version = "= 0.23.46", features = ["fips"] }
sentry = { version = "= 0.49.3", default-features = false, features = [
sentry = { version = "= 0.49.5", default-features = false, features = [
"backtrace",
"contexts",
"debug-images",
@@ -133,7 +129,7 @@ sqlx = { version = "= 0.9.0", default-features = false, features = [
tempfile = "= 3.27.0"
thiserror = "= 2.0.21"
time = { version = "= 0.3.55", features = ["macros"] }
tokio = { version = "= 1.53.3", features = ["full", "tracing"] }
tokio = { version = "= 1.54.1", features = ["full", "tracing"] }
tokio-retry2 = "= 0.9.1"
tokio-rustls = "= 0.26.6"
tokio-tungstenite = { version = "= 0.30.0", features = [
@@ -157,7 +153,7 @@ tracing-subscriber = { version = "= 0.3.23", features = [
"tracing-log",
] }
url = "= 2.5.8"
uuid = { version = "= 1.28.0", features = ["serde", "v4"] }
uuid = { version = "= 1.29.0", features = ["serde", "v4"] }
ak-axum = { package = "authentik-axum", version = "2026.11.0-rc1", path = "./packages/ak-axum" }
ak-client = { package = "authentik-client", version = "2026.11.0-rc1", path = "./packages/client-rust" }
+3 -2
View File
@@ -12,7 +12,7 @@ from rest_framework.permissions import SAFE_METHODS
from authentik.admin.flags import Flag
from authentik.admin.models import SystemSettings
from authentik.admin.utils import get_system_settings, normalize_base_url
from authentik.admin.utils import normalize_base_url
from authentik.core.api.utils import JSONDictField, ModelSerializer
from authentik.rbac.permissions import HasPermission
@@ -122,6 +122,7 @@ class SettingsView(RetrieveUpdateAPIView):
]
def get_object(self):
obj = get_system_settings()
# Fresh instance; the serializer mutates it on update
obj = SystemSettings.objects.get(pk=True)
self.check_object_permissions(self.request, obj)
return obj
+34
View File
@@ -8,6 +8,7 @@ from typing import TypedDict
from cryptography.hazmat.backends.openssl.backend import backend
from django.conf import settings
from django.db import Error, connection
from django.utils.timezone import now
from django.views.debug import SafeExceptionReporterFilter
from drf_spectacular.utils import extend_schema
@@ -48,6 +49,17 @@ class RuntimeDict(TypedDict):
authentik_version: str
class PostgreSQLDict(TypedDict):
"""PostgreSQL information"""
version: str
jit: str
jit_source: str
ssl: bool
ssl_version: str | None
ssl_cipher: str | None
class SystemInfoSerializer(PassiveSerializer):
"""Get system information."""
@@ -60,6 +72,7 @@ class SystemInfoSerializer(PassiveSerializer):
embedded_outpost_disabled = SerializerMethodField()
embedded_outpost_host = SerializerMethodField()
base_url = SerializerMethodField()
postgresql = SerializerMethodField(allow_null=True)
def get_http_headers(self, request: Request) -> dict[str, str]:
"""Get HTTP Request headers"""
@@ -120,6 +133,27 @@ class SystemInfoSerializer(PassiveSerializer):
"""Configured external base URL. Can be empty"""
return get_system_settings().base_url
def get_postgresql(self, request: Request) -> PostgreSQLDict:
"""PostgreSQL information for this request's database connection"""
try:
with connection.cursor() as cursor:
cursor.execute(
"SELECT current_setting('server_version'), setting, source, ssl, "
"version, cipher FROM pg_settings, pg_stat_ssl WHERE name = 'jit' "
"AND pid = pg_backend_pid()"
)
version, jit, jit_source, ssl, ssl_version, ssl_cipher = cursor.fetchone()
except Error:
return None
return {
"version": version,
"jit": jit,
"jit_source": jit_source,
"ssl": ssl,
"ssl_version": ssl_version,
"ssl_cipher": ssl_cipher,
}
class SystemView(APIView):
"""Get system information."""
+2 -3
View File
@@ -106,9 +106,8 @@ class FileView(APIView):
raise ValidationError(
{
"file": [
_(
f"File size ({file.size}B) exceeds maximum allowed "
f"size ({MAX_FILE_SIZE_BYTES}B)."
_("File size ({size}B) exceeds maximum allowed size ({max_size}B).").format(
size=file.size, max_size=MAX_FILE_SIZE_BYTES
)
]
}
+11 -4
View File
@@ -1,12 +1,9 @@
from collections.abc import Generator, Iterator
from contextlib import contextmanager
from tempfile import SpooledTemporaryFile
from typing import Any, TypeVar
from typing import TYPE_CHECKING, Any, TypeVar
from urllib.parse import urlsplit, urlunsplit
import boto3
from botocore.config import Config
from botocore.exceptions import ClientError
from django.db import connection
from django.http.request import HttpRequest
@@ -15,6 +12,9 @@ from authentik.admin.files.usage import FileUsage
from authentik.lib.config import CONFIG
from authentik.lib.utils.time import timedelta_from_string
if TYPE_CHECKING:
import boto3
_ConfigValue = TypeVar("_ConfigValue")
@@ -74,6 +74,9 @@ class S3Backend(ManageableBackend):
@property
def session(self) -> boto3.Session:
"""Create boto3 session with configured credentials."""
# boto3 is heavy, only import it when S3 is used
import boto3
session_profile, session_profile_r = self._get_config("session_profile", None)
if session_profile is not None:
if session_profile_r or self._session is None:
@@ -100,6 +103,8 @@ class S3Backend(ManageableBackend):
@property
def client(self):
"""Create S3 client with configured endpoint and region."""
from botocore.config import Config
endpoint_url, endpoint_url_r = self._get_config("endpoint", None)
session = self.session
use_ssl, use_ssl_r = self._get_bool_config("use_ssl", True)
@@ -274,6 +279,8 @@ class S3Backend(ManageableBackend):
def file_exists(self, name: str) -> bool:
"""Check if a file exists in S3."""
from botocore.exceptions import ClientError
try:
self.client.head_object(
Bucket=self.bucket_name,
+35 -6
View File
@@ -1,9 +1,10 @@
from collections.abc import Generator
from pathlib import Path
from pathlib import Path, PurePosixPath
from django.conf import settings
from django.http.request import HttpRequest
from authentik.admin.files.backends.base import Backend
from authentik.admin.files.backends.base import THEME_VARIABLE, Backend, get_valid_themes
from authentik.admin.files.usage import FileUsage
from authentik.lib.config import CONFIG
@@ -12,6 +13,15 @@ STATIC_ASSETS_DIRS = [Path(p) for p in ("assets/icons", "assets/images")]
STATIC_ASSETS_SOURCES_DIR = Path("web/authentik/sources")
STATIC_FILE_EXTENSIONS = [".svg", ".png", ".jpg", ".jpeg"]
STATIC_PATH_PREFIX = "/static"
STATIC_SOURCES_PREFIX = f"{STATIC_PATH_PREFIX}/authentik/sources/"
def static_url_name(url: str | None) -> str | None:
"""Name of the static file behind a URL from Django's ``static()``, as this backend
names it. Models use ``static()`` for their default icons."""
if not url or not url.startswith(settings.STATIC_URL):
return None
return f"{STATIC_PATH_PREFIX}/{url.removeprefix(settings.STATIC_URL)}"
class StaticBackend(Backend):
@@ -30,11 +40,15 @@ class StaticBackend(Backend):
def list_files(self) -> Generator[str]:
"""List all static files."""
# List built-in source icons
# List built-in source icons, one folder per icon with a variant per theme
if STATIC_ASSETS_SOURCES_DIR.exists():
for file_path in STATIC_ASSETS_SOURCES_DIR.iterdir():
if file_path.is_file() and (file_path.suffix in STATIC_FILE_EXTENSIONS):
yield f"{STATIC_PATH_PREFIX}/authentik/sources/{file_path.name}"
for icon_dir in STATIC_ASSETS_SOURCES_DIR.iterdir():
if not icon_dir.is_dir():
continue
for light in icon_dir.glob("light.*"):
if light.suffix in STATIC_FILE_EXTENSIONS:
icon = f"{icon_dir.name}/{THEME_VARIABLE}{light.suffix}"
yield f"{STATIC_SOURCES_PREFIX}{icon}"
# List other static assets
for dir in STATIC_ASSETS_DIRS:
@@ -56,3 +70,18 @@ class StaticBackend(Backend):
if request is None:
return url
return request.build_absolute_uri(url)
def themed_urls(
self,
name: str,
request: HttpRequest | None = None,
use_cache: bool = True,
) -> dict[str, str] | None:
"""Theme variants of ``%(theme)s`` files, and of a single variant of a built-in
source icon, such as ``github/light.svg``, which models use as default icons."""
path = PurePosixPath(name)
if path.parent.parent == PurePosixPath(STATIC_SOURCES_PREFIX) and (
path.stem in get_valid_themes()
):
name = str(path.with_stem(THEME_VARIABLE))
return super().themed_urls(name, request, use_cache=use_cache)
@@ -19,7 +19,7 @@ class TestS3BackendClientCache(TestCase):
@CONFIG.patch("storage.s3.use_ssl", "true")
def test_client_reuses_boto_client(self):
"""Test repeated client access reuses the same boto client."""
with patch("authentik.admin.files.backends.s3.boto3.Session") as session_cls:
with patch("boto3.Session") as session_cls:
session = session_cls.return_value
client = Mock()
session.client.return_value = client
@@ -36,7 +36,7 @@ class TestS3BackendClientCache(TestCase):
def test_client_refreshes_when_config_changes(self):
"""Test client cache is invalidated when S3 client config changes."""
with CONFIG.patch("storage.s3.endpoint", "https://s3-1.example.com"):
with patch("authentik.admin.files.backends.s3.boto3.Session") as session_cls:
with patch("boto3.Session") as session_cls:
session = session_cls.return_value
first_client = Mock()
second_client = Mock()
@@ -34,9 +34,42 @@ class TestStaticBackend(TestCase):
self.assertFalse(self.backend.supports_file("test.jpg"))
def test_list_files(self):
"""Test list_files includes expected files"""
"""Test list_files lists built-in source icons with a variant per theme"""
files = list(self.backend.list_files())
self.assertIn("/static/authentik/sources/ldap.png", files)
self.assertIn("/static/authentik/sources/openidconnect.svg", files)
self.assertIn("/static/authentik/sources/saml.png", files)
self.assertIn("/static/authentik/sources/github/%(theme)s.svg", files)
self.assertIn("/static/authentik/sources/kerberos/%(theme)s.png", files)
self.assertNotIn("/static/authentik/sources/github/light.svg", files)
self.assertNotIn("/static/authentik/sources/github/dark.svg", files)
def test_themed_urls_source_icon(self):
"""Test themed_urls of a built-in source icon picked in the file picker"""
self.assertEqual(
self.backend.themed_urls("/static/authentik/sources/github/%(theme)s.svg"),
{
"light": "/static/authentik/sources/github/light.svg",
"dark": "/static/authentik/sources/github/dark.svg",
},
)
def test_themed_urls_source_icon_variant(self):
"""Test themed_urls of one variant of a built-in source icon, as used by defaults"""
github = {
"light": "/static/authentik/sources/github/light.svg",
"dark": "/static/authentik/sources/github/dark.svg",
}
self.assertEqual(
self.backend.themed_urls("/static/authentik/sources/github/light.svg"), github
)
self.assertEqual(
self.backend.themed_urls("/static/authentik/sources/github/dark.svg"), github
)
def test_themed_urls_other_static_files(self):
"""Test themed_urls returns None for other static files"""
self.assertIsNone(self.backend.themed_urls("/static/dist/assets/icons/icon.svg"))
self.assertIsNone(self.backend.themed_urls("/static/dist/assets/icons/light.svg"))
self.assertIsNone(self.backend.themed_urls("/static/authentik/sources/github/logo.svg"))
self.assertIsNone(
self.backend.themed_urls("/static/authentik/sources/github/../github/light.svg")
)
+8 -3
View File
@@ -5,7 +5,7 @@ from django.http.request import HttpRequest
from rest_framework.request import Request
from structlog.stdlib import get_logger
from authentik.admin.files.backends.base import ManageableBackend
from authentik.admin.files.backends.base import ManageableBackend, substitute_theme
from authentik.admin.files.backends.file import FileBackend
from authentik.admin.files.backends.passthrough import PassthroughBackend
from authentik.admin.files.backends.s3 import S3Backend
@@ -78,6 +78,9 @@ class FileManager:
Set ``use_cache=False`` when the caller needs a fresh signed URL instead
of a cached one, for example when serializing flow/login payloads that
may be refreshed after the previous JWT has expired.
A name with ``%(theme)s`` resolves to its light variant, so the URL always
points at a real file. Callers that know the theme use ``themed_urls()``.
"""
if not name:
return ""
@@ -85,6 +88,7 @@ class FileManager:
if isinstance(request, Request):
request = request._request
name = substitute_theme(name, "light")
for backend in self.backends:
if backend.supports_file(name):
return backend.file_url(name, request, use_cache=use_cache)
@@ -99,12 +103,13 @@ class FileManager:
use_cache: bool = True,
) -> dict[str, str] | None:
"""
Get URLs for each theme variant when filename contains %(theme)s.
Get URLs for each theme variant when filename contains %(theme)s, or when it is
one variant of a built-in source icon.
``use_cache`` has the same semantics as ``file_url()`` and allows
callers to force regeneration of expiring signed URLs.
Returns dict mapping theme to URL if %(theme)s present, None otherwise.
Returns dict mapping theme to URL if there are theme variants, None otherwise.
"""
if not name:
return None
+15 -9
View File
@@ -92,10 +92,13 @@ class TestFileAPI(FileTestFileBackendMixin, TestCase):
self.assertEqual(response.status_code, 200)
self.assertIn(
{
"name": "/static/authentik/sources/ldap.png",
"url": "http://testserver/static/authentik/sources/ldap.png",
"mime_type": "image/png",
"themed_urls": None,
"name": "/static/authentik/sources/ldap/%(theme)s.svg",
"url": "http://testserver/static/authentik/sources/ldap/light.svg",
"mime_type": "image/svg+xml",
"themed_urls": {
"light": "http://testserver/static/authentik/sources/ldap/light.svg",
"dark": "http://testserver/static/authentik/sources/ldap/dark.svg",
},
},
response.data,
)
@@ -120,7 +123,7 @@ class TestFileAPI(FileTestFileBackendMixin, TestCase):
reverse(
"authentik_api:files",
query={
"search": "LDAP.PNG",
"search": "LDAP/",
},
)
)
@@ -128,10 +131,13 @@ class TestFileAPI(FileTestFileBackendMixin, TestCase):
self.assertEqual(response.status_code, 200)
self.assertIn(
{
"name": "/static/authentik/sources/ldap.png",
"url": "http://testserver/static/authentik/sources/ldap.png",
"mime_type": "image/png",
"themed_urls": None,
"name": "/static/authentik/sources/ldap/%(theme)s.svg",
"url": "http://testserver/static/authentik/sources/ldap/light.svg",
"mime_type": "image/svg+xml",
"themed_urls": {
"light": "http://testserver/static/authentik/sources/ldap/light.svg",
"dark": "http://testserver/static/authentik/sources/ldap/dark.svg",
},
},
response.data,
)
@@ -54,6 +54,18 @@ class TestResolveFileUrlBasic(TestCase):
result = manager.file_url("/static/authentik/sources/icon.svg")
self.assertEqual(result, "/static/authentik/sources/icon.svg")
def test_file_url_theme_variable_uses_light(self):
"""Test file_url resolves %(theme)s to the light variant, never the placeholder"""
manager = FileManager(FileUsage.MEDIA)
self.assertEqual(
manager.file_url("/static/authentik/sources/kerberos/%(theme)s.png"),
"/static/authentik/sources/kerberos/light.png",
)
self.assertEqual(
manager.file_url("https://example.com/logo-%(theme)s.png"),
"https://example.com/logo-light.png",
)
def test_file_url_forwards_use_cache(self):
"""Test file_url forwards use_cache to backend."""
manager = FileManager(FileUsage.MEDIA)
+8 -2
View File
@@ -76,10 +76,16 @@ def validate_upload_file_name(
# Check path length limits
normalized = str(path)
if len(normalized) > MAX_FILE_NAME_LENGTH:
raise ValidationError(_(f"File name too long (max {MAX_FILE_NAME_LENGTH} characters)"))
raise ValidationError(
_("File name too long (max {MAX_FILE_NAME_LENGTH} characters)").format(
MAX_FILE_NAME_LENGTH=MAX_FILE_NAME_LENGTH
)
)
for part in path.parts:
if len(part) > MAX_PATH_COMPONENT_LENGTH:
raise ValidationError(
_(f"Path component too long (max {MAX_PATH_COMPONENT_LENGTH} characters)")
_("Path component too long (max {MAX_PATH_COMPONENT_LENGTH} characters)").format(
MAX_PATH_COMPONENT_LENGTH=MAX_PATH_COMPONENT_LENGTH
)
)
+1 -2
View File
@@ -46,7 +46,7 @@ class Flag[T]:
@classmethod
def set(cls, value: T, settings: SystemSettings | None = None) -> T | None:
from authentik.admin.models import SystemSettings
from authentik.admin.utils import clear_system_settings_cache, get_system_settings
from authentik.admin.utils import get_system_settings
if not settings:
settings = get_system_settings()
@@ -59,7 +59,6 @@ class Flag[T]:
function="jsonb_set",
)
)
clear_system_settings_cache()
def get_default(self) -> T | None:
return self.default
@@ -0,0 +1,34 @@
"""Change a user's password"""
from getpass import getpass
from django.core.management.base import BaseCommand, CommandError
from rest_framework.exceptions import ValidationError
from authentik.core.models import User
from authentik.stages.password.models import PasswordDevice
class Command(BaseCommand):
"""Change a user's password, replacing Django's command that writes to the user"""
help = "Change a user's password."
def add_arguments(self, parser):
parser.add_argument("username")
def handle(self, *args, username: str, **options):
user = User.objects.filter(username=username).first()
if not user:
raise CommandError(f"User '{username}' does not exist")
password = getpass("Password: ")
if password != getpass("Password (again): "):
raise CommandError("Passwords do not match")
if not password:
raise CommandError("Password cannot be empty")
try:
PasswordDevice.set_password(user, password)
except ValidationError as exc:
# An LDAP or Kerberos source refused the password
raise CommandError(str(exc)) from exc
self.stdout.write(f"Password changed for user '{username}'")
-18
View File
@@ -1,18 +0,0 @@
from collections.abc import Callable
from django.http import HttpRequest, HttpResponse
from authentik.admin.utils import system_settings_cache
class SystemSettingsMiddleware:
"""Read the system settings at most once per request"""
get_response: Callable[[HttpRequest], HttpResponse]
def __init__(self, get_response: Callable[[HttpRequest], HttpResponse]):
self.get_response = get_response
def __call__(self, request: HttpRequest) -> HttpResponse:
with system_settings_cache():
return self.get_response(request)
+12
View File
@@ -18,11 +18,23 @@ DEFAULT_REPUTATION_LOWER_LIMIT = -5
DEFAULT_REPUTATION_UPPER_LIMIT = 5
class SystemSettingsQuerySet(models.QuerySet):
def update(self, **kwargs) -> int:
# Queryset updates skip post_save, so drop the cached settings here too
from authentik.admin.utils import get_system_settings
rows = super().update(**kwargs)
get_system_settings.cache_clear()
return rows
class SystemSettings(InternallyManagedMixin, SerializerModel):
"""Global settings for this authentik instance"""
id = models.BooleanField(primary_key=True, default=True)
objects = SystemSettingsQuerySet.as_manager()
avatars = models.TextField(
help_text=_("Configure how authentik should show avatars for users."),
default="gravatar,initials",
+2 -2
View File
@@ -3,7 +3,7 @@ from django.dispatch import receiver
from authentik.admin.models import SystemSettings
from authentik.admin.tasks import _set_prom_info
from authentik.admin.utils import clear_system_settings_cache
from authentik.admin.utils import get_system_settings
from authentik.root.signals import post_startup
@@ -14,4 +14,4 @@ def post_startup_admin_metrics(sender, **_):
@receiver(post_save, sender=SystemSettings)
def system_settings_saved(**_):
clear_system_settings_cache()
get_system_settings.cache_clear()
+2 -2
View File
@@ -106,8 +106,8 @@ def update_latest_version():
return
Event.new(
EventAction.UPDATE_AVAILABLE,
message=_(
"New version {version} available!".format(version=upstream_version.version)
message=_("New version {version} available!").format(
version=upstream_version.version
),
new_version=upstream_version.version,
changelog=upstream_version.changelog_url,
+14
View File
@@ -2,6 +2,7 @@
from json import loads
from django.db import connection
from django.test import TestCase
from django.urls import reverse
@@ -44,3 +45,16 @@ class TestAdminAPI(TestCase):
"""Test system API"""
response = self.client.get(reverse("authentik_api:admin_system"))
self.assertEqual(response.status_code, 200)
def test_system_postgresql(self):
"""Test system API reports the JIT setting and TLS status of the database connection"""
with connection.cursor() as cursor:
cursor.execute("SET jit = off")
response = self.client.get(reverse("authentik_api:admin_system"))
self.assertEqual(response.status_code, 200)
postgresql = loads(response.content)["postgresql"]
self.assertEqual(postgresql["jit"], "off")
self.assertEqual(postgresql["jit_source"], "session")
self.assertTrue(postgresql["version"])
self.assertEqual(postgresql["ssl"], connection.connection.pgconn.ssl_in_use)
self.assertEqual(postgresql["ssl_version"] is not None, postgresql["ssl"])
@@ -1,32 +1,20 @@
from django.http import HttpRequest, HttpResponse
from django.test import RequestFactory, TestCase
from django.test import TestCase
from authentik.admin.middleware import SystemSettingsMiddleware
from authentik.admin.models import SystemSettings
from authentik.admin.utils import get_system_settings
class TestSystemSettingsCache(TestCase):
def test_scoped_to_request(self):
"""Settings are only cached within a single request"""
seen = []
def test_cached(self):
"""Settings are cached across calls"""
self.assertIs(get_system_settings(), get_system_settings())
def view(request: HttpRequest) -> HttpResponse:
seen.extend([get_system_settings(), get_system_settings()])
return HttpResponse()
middleware = SystemSettingsMiddleware(view)
middleware(RequestFactory().get("/"))
middleware(RequestFactory().get("/"))
self.assertIs(seen[0], seen[1])
self.assertIsNot(seen[1], seen[2])
self.assertIs(seen[2], seen[3])
self.assertIsNot(get_system_settings(), get_system_settings())
def test_fresh_outside_requests(self):
"""System settings cache is not used outside of a request"""
def test_cleared_on_save(self):
"""Saving the settings drops the cached instance"""
first = get_system_settings()
SystemSettings.objects.filter(pk=True).update(avatars="none")
settings = SystemSettings.objects.get(pk=True)
settings.avatars = "none"
settings.save()
second = get_system_settings()
self.assertIsNot(first, second)
self.assertEqual(second.avatars, "none")
+5 -28
View File
@@ -1,37 +1,14 @@
"""authentik admin utils"""
from collections.abc import Iterator
from contextlib import contextmanager
from contextvars import ContextVar
from authentik.admin.models import SystemSettings
_CTX_SYSTEM_SETTINGS = ContextVar[dict[str, SystemSettings] | None](
"authentik_system_settings", default=None
)
from authentik.lib.config import CONFIG
from authentik.root.cache import in_memory_cache
@in_memory_cache(key=lambda: None, timeout=CONFIG.get_int("cache.timeout_system_settings", 30))
def get_system_settings() -> SystemSettings:
cache = _CTX_SYSTEM_SETTINGS.get()
if cache is None:
return SystemSettings.objects.get(pk=True)
if "settings" not in cache:
cache["settings"] = SystemSettings.objects.get(pk=True)
return cache["settings"]
@contextmanager
def system_settings_cache() -> Iterator[None]:
token = _CTX_SYSTEM_SETTINGS.set({})
try:
yield
finally:
_CTX_SYSTEM_SETTINGS.reset(token)
def clear_system_settings_cache() -> None:
if (cache := _CTX_SYSTEM_SETTINGS.get()) is not None:
cache.clear()
"""Get the system settings. The returned object is shared, don't mutate it."""
return SystemSettings.objects.get(pk=True)
def normalize_base_url(value: str | None) -> str:
+44 -3
View File
@@ -1,15 +1,19 @@
"""DjangoQL search"""
from django.db.models import QuerySet
from django.db.models.constants import LOOKUP_SEP
from djangoql.ast import Name
from djangoql.exceptions import DjangoQLError
from djangoql.queryset import apply_search
from djangoql.parser import DjangoQLParser
from djangoql.queryset import build_filter
from djangoql.schema import DjangoQLSchema
from rest_framework.filters import SearchFilter
from rest_framework.request import Request
from structlog.stdlib import get_logger
from authentik.api.search.fields import JSONSearchField
from authentik.rbac.endpoint_checks import EndpointChecks
from authentik.rbac.field_rules import FieldRules
LOGGER = get_logger()
@@ -33,12 +37,35 @@ class BaseSchema(DjangoQLSchema):
return super().resolve_name(name)
class HiddenFieldsSearchFilter(SearchFilter):
"""This is used to prevent unauthorized users from probing values of fields hidden to them."""
def __init__(self):
super().__init__()
self.hidden_whole_fields: set[str] = set()
def get_search_fields(self, view, request: Request):
fields = super().get_search_fields(view, request)
if not fields or not self.hidden_whole_fields:
return fields
return [
field for field in fields if self.searched_field(field) not in self.hidden_whole_fields
]
def searched_field(self, search_field: str) -> str:
"""The model field a `search_fields` entry starts from, without DRF's lookup prefix
(`^`, `=`, `@` or `$`) or a `__` path into related models"""
if search_field[:1] in self.lookup_prefixes:
search_field = search_field[1:]
return search_field.split(LOOKUP_SEP)[0]
class QLSearch(SearchFilter):
"""rest_framework search filter which uses DjangoQL"""
def __init__(self):
super().__init__()
self._fallback = SearchFilter()
self._fallback = HiddenFieldsSearchFilter()
def get_search_terms(self, request: Request) -> str:
"""Search terms are set by a ?search=... query parameter,
@@ -59,12 +86,26 @@ class QLSearch(SearchFilter):
return InlineSchema
def filter_queryset(self, request: Request, queryset: QuerySet, view) -> QuerySet:
rules = EndpointChecks.for_request(request).field_rules()
rules.refuse_hidden_parameters(request, view)
self._fallback.hidden_whole_fields = rules.hidden_whole_fields
search_query = self.get_search_terms(request)
schema = self.get_schema(request, view)
if len(search_query) == 0:
return self._fallback.filter_queryset(request, queryset, view)
try:
return apply_search(queryset, search_query, schema=schema)
return self.apply_search(queryset, search_query, schema, rules)
except DjangoQLError as exc:
LOGGER.debug("Failed to parse search expression", exc=exc)
return self._fallback.filter_queryset(request, queryset, view)
def apply_search(
self, queryset: QuerySet, search: str, schema: type[BaseSchema], rules: FieldRules
) -> QuerySet:
"""This is a rewrite of `djangoql.queryset.apply_search`"""
ast = DjangoQLParser().parse(search)
if rules.hidden:
rules.guard_search(ast)
schema_instance = schema(queryset.model)
schema_instance.validate(ast)
return queryset.filter(build_filter(ast, schema_instance))
+1 -1
View File
@@ -13,7 +13,7 @@ class LocalAnonRateThrottle(AnonRateThrottle):
protective layer amplifies DB load under flood.
Points the throttle's cache at the ``throttle`` LocMemCache alias instead.
Counters are per-process (per server worker)
Counters are per-process (per gunicorn worker)
"""
cache = caches["throttle"]
+4
View File
@@ -61,6 +61,8 @@ class ConfigSerializer(PassiveSerializer):
cache_timeout = IntegerField(required=True)
cache_timeout_flows = IntegerField(required=True)
cache_timeout_policies = IntegerField(required=True)
cache_timeout_brands = IntegerField(required=True)
cache_timeout_system_settings = IntegerField(required=True)
class ConfigView(APIView):
@@ -106,6 +108,8 @@ class ConfigView(APIView):
"cache_timeout": CONFIG.get_int("cache.timeout"),
"cache_timeout_flows": CONFIG.get_int("cache.timeout_flows"),
"cache_timeout_policies": CONFIG.get_int("cache.timeout_policies"),
"cache_timeout_brands": CONFIG.get_int("cache.timeout_brands"),
"cache_timeout_system_settings": CONFIG.get_int("cache.timeout_system_settings"),
}
)
+2 -1
View File
@@ -12,6 +12,7 @@ from structlog.stdlib import get_logger
from authentik.api.v3.config import ConfigView
from authentik.api.views import APIBrowserView
from authentik.lib.utils.reflection import get_apps
from authentik.lib.utils.urls import sort_hot
LOGGER = get_logger()
@@ -45,7 +46,7 @@ for _authentik_app in get_apps():
)
urlpatterns = (
urlpatterns = sort_hot(
[
path("", APIBrowserView.as_view(), name="schema-browser"),
]
+1 -1
View File
@@ -227,7 +227,7 @@ class BlueprintInstanceViewSet(UsedByMixin, ModelViewSet):
try:
importer = Importer.from_string(string_contents, context)
except EntryInvalidError as exc:
raise ValidationError(_("Invalid blueprint file: {exc}".format(exc=str(exc)))) from None
raise ValidationError(_("Invalid blueprint file: {exc}").format(exc=str(exc))) from None
check_blueprint_perms(importer.blueprint, self.request.user)
return importer
@@ -1,7 +1,6 @@
"""Test and debug Blueprints"""
import atexit
import readline
from pathlib import Path
from pprint import pformat
from sys import exit as sysexit
@@ -11,6 +10,12 @@ from django.core.management.base import BaseCommand, no_translations
from structlog.stdlib import get_logger
from yaml import load
try:
import readline
except ImportError: # pragma: no cover
# There's no libreadline in the distroless image, degrade instead of failing
readline = None
from authentik.blueprints.v1.common import BlueprintLoader, EntryInvalidError
from authentik.core.management.commands.shell import get_banner_text
from authentik.lib.utils.errors import exception_to_string
@@ -25,6 +30,9 @@ class Command(BaseCommand):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
if readline is None:
self.stderr.write("readline is not available, line editing and history are disabled")
return
histfolder = Path("~").expanduser() / Path(".local/share/authentik")
histfolder.mkdir(parents=True, exist_ok=True)
histfile = histfolder / Path("blueprint_shell_history")
@@ -38,6 +38,16 @@ class TestBlueprintsV1RBAC(TransactionTestCase):
self.assertIsNotNone(role)
self.assertEqual(get_perms(role), {"authentik_blueprints.view_blueprintinstance"})
def test_role_unknown_permission(self):
"""Test that an unknown permission fails validation"""
uid = generate_id()
import_yaml = load_fixture("fixtures/rbac_role.yaml", id=uid).replace(
"authentik_blueprints.view_blueprintinstance", "authentik_blueprints.view_nothing"
)
importer = Importer.from_string(import_yaml)
self.assertFalse(importer.validate()[0])
def test_object_permission(self):
"""Test permissions"""
uid = generate_id()
+54 -2
View File
@@ -3,8 +3,10 @@
from hashlib import sha512
from pathlib import Path
from tempfile import NamedTemporaryFile, mkdtemp
from unittest.mock import patch
from django.test import TransactionTestCase
from django.utils.crypto import salted_hmac
from yaml import dump
from authentik.blueprints.models import BlueprintInstance, BlueprintInstanceStatus
@@ -125,6 +127,49 @@ class TestBlueprintsV1Tasks(TransactionTestCase):
},
)
@CONFIG.patch("blueprints_dir", TMP)
def test_valid_updated_external_values(self):
"""Test that changing only an `!Env` or `!File` value reapplies the blueprint"""
name = generate_id()
env_key = f"AUTHENTIK_TEST_{generate_id().upper()}"
with (
NamedTemporaryFile(mode="w+", suffix=".yaml", dir=TMP) as file,
NamedTemporaryFile(mode="w+") as value_file,
patch.dict("os.environ", {env_key: "foo"}),
):
value_file.write("foo")
value_file.flush()
content = (
"version: 1\n"
f"metadata:\n name: {name}\n"
f"context:\n env: !Env {env_key}\n file: !File {value_file.name}\n"
"entries: []\n"
)
file.write(content)
file.flush()
blueprints_discovery.send()
instance = BlueprintInstance.objects.get(name=name)
first_hash = instance.last_applied_hash
self.assertNotEqual(first_hash, sha512(content.encode()).hexdigest())
# Unchanged values don't reapply
blueprints_discovery.send()
instance.refresh_from_db()
self.assertEqual(instance.last_applied_hash, first_hash)
with patch.dict("os.environ", {env_key: "bar"}):
blueprints_discovery.send()
instance.refresh_from_db()
env_hash = instance.last_applied_hash
self.assertNotEqual(env_hash, first_hash)
value_file.seek(0)
value_file.write("bar")
value_file.flush()
blueprints_discovery.send()
instance.refresh_from_db()
self.assertNotIn(instance.last_applied_hash, [first_hash, env_hash])
@CONFIG.patch("blueprints_dir", TMP)
def test_valid_disabled(self):
"""Test valid file"""
@@ -290,8 +335,13 @@ class TestBlueprintsV1Tasks(TransactionTestCase):
):
content = f"version: 1\nentries: []\ncontext:\n secret: {reference}\n"
expected = sha512(content.encode())
for _ in range(routes):
expected.update(sha512(b"initial").digest())
expected.update(
salted_hmac(
"goauthentik.io/blueprints/v1/external-values",
sha512(b"initial").digest() * routes,
algorithm="sha512",
).digest()
)
self.assertEqual(self.write_blueprint(file, reference), expected.hexdigest())
@CONFIG.patch("blueprints_dir", TMP)
@@ -332,6 +382,8 @@ class TestBlueprintsV1Tasks(TransactionTestCase):
("path from a mapping", f'!File {{path: "{TMP}/fallback"}}'),
("path no syscall can take", '!File "\\0"'),
("path outside the filesystem encoding", '!File "\\ud800"'),
("env key with a null byte", '!Env "\\0"'),
("env key outside the filesystem encoding", '!Env "\\ud800"'),
("sequence containing itself", "&anchor [*anchor]"),
("mapping containing itself", "&anchor {key: *anchor}"),
("two anchors containing each other", "&outer [{inner: &inner [*outer]}, *inner]"),
+1 -1
View File
@@ -69,7 +69,7 @@ class Exporter:
blueprint = Blueprint()
self._pre_export(blueprint)
blueprint.metadata = BlueprintMetadata(
name=_("authentik Export - {date}".format_map({"date": str(now())})),
name=_("authentik Export - {date}").format(date=str(now())),
labels={
LABEL_AUTHENTIK_GENERATED: "true",
},
+43 -24
View File
@@ -2,23 +2,27 @@
from collections.abc import Generator
from hashlib import sha512
from os import getenv
from pathlib import Path
from typing import Any
from django.utils.crypto import salted_hmac
from yaml import load
from yaml.error import YAMLError
from authentik.blueprints.v1.common import BlueprintLoader, File, YAMLTag
from authentik.blueprints.v1.common import BlueprintLoader, Env, File, YAMLTag
def iter_file_tags(value: Any, ancestors: frozenset[int] = frozenset()) -> Generator[File]:
"""Find all `!File` tags in a loaded blueprint, including tags used as arguments
of other tags. A node is not descended into again below itself; a node reached by
several routes is visited once per route."""
def iter_external_tags(
value: Any, ancestors: frozenset[int] = frozenset()
) -> Generator[Env | File]:
"""Find all `!Env` and `!File` tags in a loaded blueprint, including tags used as
arguments of other tags. A node is not descended into again below itself; a node
reached by several routes is visited once per route."""
if id(value) in ancestors:
return
ancestors = ancestors | {id(value)}
if isinstance(value, File):
if isinstance(value, Env | File):
yield value
if isinstance(value, dict):
children = value.values()
@@ -29,32 +33,47 @@ def iter_file_tags(value: Any, ancestors: frozenset[int] = frozenset()) -> Gener
else:
return
for child in children:
yield from iter_file_tags(child, ancestors)
yield from iter_external_tags(child, ancestors)
# One byte where a readable reference contributes a 64-byte digest
MISSING_FILE_MARKER = b"\0"
# One byte where a readable value contributes a 64-byte digest
MISSING_VALUE_MARKER = b"\0"
def blueprint_hash(content: str) -> str:
"""Hash a blueprint's content and the contents of the files it references with
`!File` tags"""
"""Hash a blueprint's content and the current values of its `!Env` and `!File` tags.
The values are keyed with the secret key, as the hash is visible in the API and a
plain hash of a short secret could be brute-forced."""
hasher = sha512(content.encode())
try:
raw_blueprint = load(content, BlueprintLoader)
except YAMLError:
return hasher.hexdigest()
for tag in iter_file_tags(raw_blueprint):
# Mapping-node tags have no path; nested tags cannot be resolved here
path = getattr(tag, "path", None)
if not isinstance(path, str):
continue
try:
referenced = Path(path).read_bytes()
except OSError, ValueError:
# An unreadable reference still takes its place in the sequence, so a file
# that goes missing while another appears cannot leave the hash unchanged
hasher.update(MISSING_FILE_MARKER)
continue
hasher.update(sha512(referenced).digest())
values = salted_hmac("goauthentik.io/blueprints/v1/external-values", b"", algorithm="sha512")
has_values = False
for tag in iter_external_tags(raw_blueprint):
# Mapping-node tags have no key or path; nested tags cannot be resolved here
if isinstance(tag, Env):
key = getattr(tag, "key", None)
if not isinstance(key, str):
continue
try:
env = getenv(key)
except ValueError:
env = None
value = None if env is None else env.encode(errors="surrogateescape")
else:
path = getattr(tag, "path", None)
if not isinstance(path, str):
continue
try:
value = Path(path).read_bytes()
except OSError, ValueError:
value = None
has_values = True
# A missing value still takes its place in the sequence, so a value that goes
# missing while another appears cannot leave the hash unchanged
values.update(MISSING_VALUE_MARKER if value is None else sha512(value).digest())
if has_values:
hasher.update(values.digest())
return hasher.hexdigest()
+21
View File
@@ -0,0 +1,21 @@
"""authentik brand signals"""
from django.db.models.signals import post_delete, post_save
from django.dispatch import receiver
from authentik.brands.models import Brand
from authentik.brands.utils import get_brand_for_request
from authentik.core.models import Application
from authentik.flows.models import Flow
@receiver(post_save, sender=Brand)
@receiver(post_delete, sender=Brand)
# Cached brands carry their flows and default application (see _BRAND_RELATED_FK_FIELDS)
@receiver(post_save, sender=Flow)
@receiver(post_delete, sender=Flow)
@receiver(post_save, sender=Application)
@receiver(post_delete, sender=Application)
def brand_cache_clear(**_):
"""Drop cached brand lookups when a brand or an object it caches changes"""
get_brand_for_request.cache_clear()
+5
View File
@@ -12,7 +12,9 @@ from authentik import authentik_full_version
from authentik.admin.models import SystemSettings
from authentik.admin.utils import get_system_settings
from authentik.brands.models import _BRAND_RELATED_FK_FIELDS, SESSION_KEY_BRAND_SAFE_MODE, Brand
from authentik.lib.config import CONFIG
from authentik.lib.tracing import active_tracer
from authentik.root.cache import in_memory_cache
_q_default = Q(default=True)
DEFAULT_BRAND = Brand(domain="fallback")
@@ -27,6 +29,9 @@ def session_safe_mode(request: HttpRequest) -> bool:
return bool(session.get(SESSION_KEY_BRAND_SAFE_MODE))
@in_memory_cache(
key=lambda request: request.get_host(), timeout=CONFIG.get_int("cache.timeout_brands", 30)
)
def get_brand_for_request(request: HttpRequest) -> Brand:
"""Get brand object for current request"""
+2
View File
@@ -16,6 +16,8 @@ GRANT_TYPE_TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange" #
# https://datatracker.ietf.org/doc/html/rfc8693#section-3
TOKEN_TYPE_URI_ACCESS_TOKEN = "urn:ietf:params:oauth:token-type:access_token" # nosec
TOKEN_TYPE_URI_JWT = "urn:ietf:params:oauth:token-type:jwt" # nosec
# Only valid as requested_token_type, with a federated SAML provider as `audience`
TOKEN_TYPE_URI_SAML2 = "urn:ietf:params:oauth:token-type:saml2" # nosec
# authentik's own built-in Token model (e.g. API tokens), not part of RFC 8693 -- only
# meaningful as an actor_token_type, never as a subject_token/requested_token_type
TOKEN_TYPE_URI_AUTHENTIK_TOKEN = "goauthentik.io/oauth/token-type/authentik_token" # nosec
+22
View File
@@ -73,3 +73,25 @@ DIGEST_ALGORITHM_TRANSLATION_MAP = {
SHA384: xmlsec.constants.TransformSha384,
SHA512: xmlsec.constants.TransformSha512,
}
AES128_CBC = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
AES256_CBC = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
AES128_GCM = "http://www.w3.org/2009/xmlenc11#aes128-gcm"
AES256_GCM = "http://www.w3.org/2009/xmlenc11#aes256-gcm"
RSA_OAEP_MGF1P = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
# Algorithms advertised in SP metadata as <md:EncryptionMethod>, in order of preference
ENCRYPTION_METHODS_ADVERTISED = (
AES256_GCM,
AES128_GCM,
AES256_CBC,
AES128_CBC,
RSA_OAEP_MGF1P,
)
ENCRYPTION_ALGORITHM_TRANSLATION_MAP = {
AES128_CBC: (xmlsec.constants.TransformAes128Cbc, 128),
AES256_CBC: (xmlsec.constants.TransformAes256Cbc, 256),
AES128_GCM: (xmlsec.constants.TransformAes128Gcm, 128),
AES256_GCM: (xmlsec.constants.TransformAes256Gcm, 256),
}
@@ -2,13 +2,17 @@
from base64 import b64decode
from dataclasses import dataclass
from xml.etree.ElementTree import ParseError # nosec
from defusedxml import ElementTree
from structlog.stdlib import get_logger
from authentik.common.saml.constants import NS_SAML_ASSERTION, NS_SAML_PROTOCOL
from authentik.common.saml.exceptions import ERROR_CANNOT_DECODE_REQUEST, CannotHandleAssertion
from authentik.providers.saml.utils.encoding import decode_base64_and_inflate
LOGGER = get_logger()
@dataclass(slots=True)
class LogoutRequest:
@@ -31,7 +35,15 @@ class LogoutRequestParser:
"""LogoutRequest Parser"""
def _parse_xml(self, decoded_xml: str | bytes, relay_state: str | None = None) -> LogoutRequest:
root = ElementTree.fromstring(decoded_xml)
try:
root = ElementTree.fromstring(decoded_xml)
except (ParseError, ValueError) as exc:
LOGGER.warning("Failed to parse SAML logout request", exc=exc)
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from exc
# `ID` is a required attribute of every SAML request (SAML 2.0 core §3.2.1)
if "ID" not in root.attrib:
LOGGER.warning("SAML logout request is missing the ID attribute")
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST)
request = LogoutRequest(
id=root.attrib["ID"],
)
@@ -66,8 +78,9 @@ class LogoutRequestParser:
"""Validate and parse raw request with enveloped signautre."""
try:
decoded_xml = b64decode(saml_request.encode())
except UnicodeDecodeError:
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from None
except ValueError as exc:
LOGGER.warning("Failed to decode SAML logout request", exc=exc)
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from exc
return self._parse_xml(decoded_xml, relay_state)
def parse_detached(
@@ -78,7 +91,8 @@ class LogoutRequestParser:
"""Validate and parse raw request with detached signature"""
try:
decoded_xml = decode_base64_and_inflate(saml_request)
except UnicodeDecodeError:
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from None
except ValueError as exc:
LOGGER.warning("Failed to decode SAML logout request", exc=exc)
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from exc
return self._parse_xml(decoded_xml, relay_state)
@@ -0,0 +1,84 @@
"""LogoutResponse parser"""
import binascii
from base64 import b64decode
from dataclasses import dataclass
from xml.etree.ElementTree import ParseError # nosec
from defusedxml import ElementTree
from django.utils.translation import gettext_lazy as _
from authentik.common.saml.constants import NS_SAML_ASSERTION, NS_SAML_PROTOCOL, SAML_STATUS_SUCCESS
from authentik.common.saml.exceptions import CannotHandleAssertion
from authentik.providers.saml.utils.encoding import decode_base64_and_inflate
ERROR_CANNOT_DECODE_RESPONSE = _("Cannot decode SAML response.")
@dataclass(slots=True)
class LogoutResponse:
"""Logout Response"""
id: str | None = None
in_response_to: str | None = None
issuer: str | None = None
status: str | None = None
relay_state: str | None = None
class LogoutResponseParser:
"""LogoutResponse Parser"""
def _parse_xml(
self, decoded_xml: str | bytes, relay_state: str | None = None
) -> LogoutResponse:
try:
root = ElementTree.fromstring(decoded_xml)
except (ParseError, ValueError) as exc:
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_RESPONSE) from exc
response = LogoutResponse(
id=root.attrib.get("ID"),
in_response_to=root.attrib.get("InResponseTo"),
)
# Try both namespaces for Issuer
issuers = root.findall(f"{{{NS_SAML_ASSERTION}}}Issuer")
if not issuers:
issuers = root.findall(f"{{{NS_SAML_PROTOCOL}}}Issuer")
if len(issuers) > 0:
response.issuer = issuers[0].text
# Extract Status
status_elements = root.findall(f"{{{NS_SAML_PROTOCOL}}}Status")
if len(status_elements) > 0:
status_codes = status_elements[0].findall(f"{{{NS_SAML_PROTOCOL}}}StatusCode")
if len(status_codes) > 0:
response.status = status_codes[0].attrib.get("Value")
response.relay_state = relay_state
return response
def parse(self, saml_response: str, relay_state: str | None = None) -> LogoutResponse:
"""Parse raw response with enveloped signature (POST binding)"""
try:
decoded_xml = b64decode(saml_response.encode())
except UnicodeDecodeError, binascii.Error:
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_RESPONSE) from None
return self._parse_xml(decoded_xml, relay_state)
def parse_detached(self, saml_response: str, relay_state: str | None = None) -> LogoutResponse:
"""Parse raw response with detached signature (Redirect binding)"""
try:
decoded_xml = decode_base64_and_inflate(saml_response)
except UnicodeDecodeError, binascii.Error:
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_RESPONSE) from None
return self._parse_xml(decoded_xml, relay_state)
def verify_status(self, response: LogoutResponse) -> None:
"""Verify that the LogoutResponse has a successful status."""
if response.status != SAML_STATUS_SUCCESS:
raise CannotHandleAssertion(f"LogoutResponse status is not success: {response.status}")
+85
View File
@@ -0,0 +1,85 @@
"""Shared SAML signature verification"""
from base64 import b64decode
from urllib.parse import urlencode
import xmlsec
from lxml.etree import _Element # nosec
from authentik.common.saml.constants import NS_MAP, SIGN_ALGORITHM_TRANSFORM_MAP
from authentik.common.saml.exceptions import (
ERROR_FAILED_TO_VERIFY,
ERROR_SIGNATURE_REQUIRED_BUT_ABSENT,
CannotHandleAssertion,
)
from authentik.crypto.models import CertificateKeyPair
from authentik.lib.xml import UnsafeXML, lxml_from_string
def verify_enveloped_signature(
raw_xml: bytes, verification_kp: CertificateKeyPair, xpath: str
) -> None:
"""Verify an enveloped XML signature (POST binding).
`xpath` selects the signature node, for example `/samlp:LogoutRequest/ds:Signature`."""
try:
root = lxml_from_string(raw_xml)
except UnsafeXML as exc:
raise CannotHandleAssertion(str(exc)) from exc
xmlsec.tree.add_ids(root, ["ID"])
signature_nodes = root.xpath(xpath, namespaces=NS_MAP)
if not isinstance(signature_nodes, list) or len(signature_nodes) < 1:
raise CannotHandleAssertion(ERROR_SIGNATURE_REQUIRED_BUT_ABSENT)
signature_node = signature_nodes[0]
if not isinstance(signature_node, _Element):
raise CannotHandleAssertion(ERROR_SIGNATURE_REQUIRED_BUT_ABSENT)
try:
ctx = xmlsec.SignatureContext()
ctx.key = xmlsec.Key.from_memory(
verification_kp.certificate_data,
xmlsec.constants.KeyDataFormatCertPem,
None,
)
ctx.verify(signature_node)
except xmlsec.Error as exc:
raise CannotHandleAssertion(ERROR_FAILED_TO_VERIFY) from exc
def verify_detached_signature( # noqa: PLR0913
saml_param_name: str,
saml_value: str,
relay_state: str | None,
signature: str | None,
sig_alg: str | None,
verification_kp: CertificateKeyPair,
) -> None:
"""Verify a detached signature (Redirect binding).
`saml_param_name` is either `SAMLRequest` or `SAMLResponse`, and `saml_value` the
encoded message as it was received."""
if not (signature and sig_alg):
raise CannotHandleAssertion(ERROR_SIGNATURE_REQUIRED_BUT_ABSENT)
params = {saml_param_name: saml_value}
if relay_state is not None:
params["RelayState"] = relay_state
params["SigAlg"] = sig_alg
querystring = urlencode(params)
ctx = xmlsec.SignatureContext()
ctx.key = xmlsec.Key.from_memory(
verification_kp.certificate_data, xmlsec.constants.KeyDataFormatCertPem, None
)
sign_algorithm_transform = SIGN_ALGORITHM_TRANSFORM_MAP.get(
sig_alg, xmlsec.constants.TransformRsaSha1
)
try:
ctx.verify_binary(
querystring.encode("utf-8"),
sign_algorithm_transform,
b64decode(signature),
)
except xmlsec.Error as exc:
raise CannotHandleAssertion(ERROR_FAILED_TO_VERIFY) from exc
+26 -6
View File
@@ -4,7 +4,10 @@ from django.db.models import QuerySet
from django.http import HttpRequest
from django.utils.translation import gettext_lazy as _
from django_filters import FilterSet, ModelChoiceFilter
from drf_spectacular.utils import extend_schema_field
from guardian.shortcuts import get_objects_for_user
from rest_framework.exceptions import ValidationError
from rest_framework.fields import ReadOnlyField
from rest_framework.viewsets import ModelViewSet
from authentik.blueprints.v1.importer import SERIALIZER_CONTEXT_BLUEPRINT
@@ -22,6 +25,9 @@ from authentik.lib.utils.reflection import ConditionalInheritance
class ApplicationEntitlementSerializer(AttributesMixinSerializer, ModelSerializer):
"""ApplicationEntitlement Serializer"""
app_name = ReadOnlyField(source="app.name")
app_slug = ReadOnlyField(source="app.slug")
def validate_app(self, app: Application) -> Application:
"""Ensure user has permission to view"""
request: HttpRequest = self.context.get("request")
@@ -40,6 +46,8 @@ class ApplicationEntitlementSerializer(AttributesMixinSerializer, ModelSerialize
"pbm_uuid",
"name",
"app",
"app_name",
"app_slug",
"attributes",
]
@@ -50,15 +58,26 @@ class ApplicationEntitlementFilter(FilterSet):
for_user = ModelChoiceFilter(
queryset=User.objects.all(),
method="filter_for_user",
label=_(
"Entitlements assigned to this user, directly or through a group, "
"regardless of the user's access to the application."
),
)
@extend_schema_field(
{
"type": "integer",
"description": _(
"Entitlements assigned to this user, directly or through a group, "
"regardless of the user's access to the application."
),
}
)
def filter_for_user(
self, queryset: QuerySet[ApplicationEntitlement], name, value: User
) -> QuerySet[ApplicationEntitlement]:
if (
not get_objects_for_user(self.request.user, "authentik_core.view_user_applications")
.filter(pk=value.pk)
.exists()
):
raise ValidationError({"for_user": "User not found"})
return queryset.filter(pk__in=value.all_app_entitlements().values("pk"))
class Meta:
@@ -80,7 +99,7 @@ class ApplicationEntitlementViewSet(
):
"""ApplicationEntitlement Viewset"""
queryset = ApplicationEntitlement.objects.all()
queryset = ApplicationEntitlement.objects.select_related("app").all()
serializer_class = ApplicationEntitlementSerializer
search_fields = [
"pbm_uuid",
@@ -90,4 +109,5 @@ class ApplicationEntitlementViewSet(
"attributes",
]
filterset_class = ApplicationEntitlementFilter
ordering = ["name"]
ordering = ["app__name", "name"]
ordering_fields = ["name", "app__name"]
+10 -20
View File
@@ -12,7 +12,6 @@ from drf_spectacular.utils import (
extend_schema,
extend_schema_field,
)
from guardian.shortcuts import get_objects_for_user
from rest_framework.authentication import SessionAuthentication
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
@@ -36,6 +35,7 @@ from authentik.core.models import Group, User
from authentik.endpoints.connectors.agent.auth import AgentAuth
from authentik.rbac.api.roles import RoleSerializer
from authentik.rbac.decorators import permission_required
from authentik.rbac.filters import ObjectFilter
from authentik.rbac.models import Role
@@ -253,11 +253,9 @@ class GroupSerializer(AttributesMixinSerializer, ModelSerializer):
if not has_perm:
raise ValidationError(
_(
(
"User does not have permission to set "
"superuser status to {superuser_status}."
).format_map({"superuser_status": superuser})
)
"User does not have permission to set "
"superuser status to {superuser_status}."
).format(superuser_status=superuser)
)
return superuser
@@ -514,13 +512,9 @@ class GroupViewSet(UsedByMixin, ModelViewSet):
def add_user(self, request: Request, body: UserAccountSerializer, pk: str) -> Response:
"""Add user to group"""
group: Group = self.get_object()
user: User = (
get_objects_for_user(request.user, "authentik_core.view_user")
.filter(
pk=body.validated_data.get("pk"),
)
.first()
)
user = ObjectFilter.visible_in_list(
request, User.objects.filter(pk=body.validated_data.get("pk")), "core/users:list"
).first()
if not user:
raise Http404
if not group.users.filter(pk=user.pk).exists():
@@ -553,13 +547,9 @@ class GroupViewSet(UsedByMixin, ModelViewSet):
def remove_user(self, request: Request, body: UserAccountSerializer, pk: str) -> Response:
"""Remove user from group"""
group: Group = self.get_object()
user: User = (
get_objects_for_user(request.user, "authentik_core.view_user")
.filter(
pk=body.validated_data.get("pk"),
)
.first()
)
user = ObjectFilter.visible_in_list(
request, User.objects.filter(pk=body.validated_data.get("pk")), "core/users:list"
).first()
if not user:
raise Http404
group.users.remove(user)
+6 -2
View File
@@ -1,6 +1,7 @@
from typing import Any
from django.contrib.contenttypes.models import ContentType
from django.db.models import Model
from django.utils.translation import gettext_lazy as _
from rest_framework.exceptions import ValidationError
from rest_framework.fields import CharField, SerializerMethodField
@@ -12,7 +13,6 @@ from authentik.lib.utils.dict import get_path_from_dict
class AttributesMixinSerializer(ModelSerializer):
def validate(self, data: dict[str, Any]) -> dict[str, Any]:
model = self.Meta.model
attrs = data.get("attributes", {})
@@ -20,7 +20,12 @@ class AttributesMixinSerializer(ModelSerializer):
object_type=ContentType.objects.get_for_model(model),
enabled=True,
)
instance = self.instance if isinstance(self.instance, Model) else None
hidden = self.field_rules(instance).hidden
for attr in attributes:
path = f"attributes.{attr.key}"
if any(path == key or path.startswith(f"{key}.") for key in hidden):
continue
value = get_path_from_dict(attrs, attr.key)
attr.run_validation(value)
return data
@@ -44,7 +49,6 @@ class ContentTypeSerializer(ModelSerializer):
class ObjectAttributeSerializer(ModelSerializer):
object_type = CharField()
object_type_obj = ContentTypeSerializer(read_only=True, source="object_type")
+11 -2
View File
@@ -9,7 +9,10 @@ from rest_framework.fields import (
from rest_framework.request import Request
from rest_framework.response import Response
from authentik.core.api.utils import PassiveSerializer
from authentik.admin.files.backends.static import static_url_name
from authentik.admin.files.manager import get_file_manager
from authentik.admin.files.usage import FileUsage
from authentik.core.api.utils import PassiveSerializer, ThemedUrlsSerializer
from authentik.lib.models import DeprecatedMixin
from authentik.lib.utils.reflection import all_subclasses
@@ -23,6 +26,7 @@ class TypeCreateSerializer(PassiveSerializer):
model_name = CharField(required=True)
icon_url = CharField(required=False)
icon_themed_urls = ThemedUrlsSerializer(required=False, allow_null=True)
requires_enterprise = BooleanField(default=False)
deprecated = BooleanField(default=False)
@@ -60,12 +64,17 @@ class TypesMixin:
continue
instance = subclass()
try:
icon_url = getattr(instance, "icon_url", None)
type_signature = {
"name": subclass._meta.verbose_name,
"description": subclass.__doc__,
"component": instance.component,
"model_name": subclass._meta.model_name,
"icon_url": getattr(instance, "icon_url", None),
"icon_url": icon_url,
# Types only have their built-in default icons, from static()
"icon_themed_urls": get_file_manager(FileUsage.MEDIA).themed_urls(
static_url_name(icon_url)
),
"requires_enterprise": False,
"deprecated": isinstance(instance, DeprecatedMixin),
}
+65 -45
View File
@@ -4,7 +4,7 @@ from datetime import timedelta
from typing import Any
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.models import AnonymousUser, Permission
from django.contrib.auth.models import AnonymousUser
from django.db import models
from django.db.models import Exists, OuterRef, Prefetch, Q
from django.db.transaction import atomic
@@ -14,7 +14,7 @@ from django.urls import reverse_lazy
from django.utils.http import urlencode
from django.utils.text import slugify
from django.utils.timezone import now
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _
from django_filters.filters import (
BooleanFilter,
CharFilter,
@@ -101,14 +101,19 @@ from authentik.flows.views.executor import QS_KEY_TOKEN
from authentik.lib.avatars import get_avatar
from authentik.lib.utils.reflection import ConditionalInheritance
from authentik.lib.utils.time import timedelta_from_string, timedelta_string_validator
from authentik.lib.validators import validate_password_hash
from authentik.lib.validators import (
PasswordHashRequiresOverride,
PasswordHashValidator,
)
from authentik.rbac.api.rbac import PermissionField
from authentik.rbac.api.roles import RoleSerializer
from authentik.rbac.decorators import permission_required
from authentik.rbac.models import Role, get_permission_choices
from authentik.rbac.models import Role
from authentik.stages.email.flow import pickle_flow_token_for_email
from authentik.stages.email.models import EmailStage
from authentik.stages.email.tasks import send_mails
from authentik.stages.email.utils import TemplateEmailMessage
from authentik.stages.password.models import PasswordDevice
LOGGER = get_logger()
@@ -135,7 +140,13 @@ class PartialGroupSerializer(ModelSerializer):
]
class UserSerializer(AttributesMixinSerializer, ModelSerializer):
class UserSerializer(
ConditionalInheritance(
"authentik.enterprise.required_actions.api.RequiredActionsUserSerializerMixin"
),
AttributesMixinSerializer,
ModelSerializer,
):
"""User Serializer"""
is_superuser = SerializerMethodField()
@@ -160,6 +171,14 @@ class UserSerializer(AttributesMixinSerializer, ModelSerializer):
max_length=USERNAME_MAX_LENGTH,
validators=[UniqueValidator(queryset=User.objects.all().order_by("username"))],
)
password_change_date = DateTimeField(read_only=True)
password_locked = SerializerMethodField()
password_device = IntegerField(source="password_device.pk", read_only=True, allow_null=True)
def get_password_locked(self, user: User) -> bool:
"""Whether the user's password currently refuses authentication."""
device = getattr(user, "password_device", None)
return device is not None and device.locked
@property
def _should_include_groups(self) -> bool:
@@ -201,10 +220,7 @@ class UserSerializer(AttributesMixinSerializer, ModelSerializer):
if SERIALIZER_CONTEXT_BLUEPRINT in self.context:
self.fields["password"] = CharField(required=False, allow_null=True)
self.fields["password_hash"] = CharField(required=False, allow_null=True)
self.fields["permissions"] = ListField(
required=False,
child=ChoiceField(choices=get_permission_choices()),
)
self.fields["permissions"] = ListField(required=False, child=PermissionField())
def create(self, validated_data: dict) -> User:
"""Create a user, with blueprint-only password and permission writes."""
@@ -217,12 +233,7 @@ class UserSerializer(AttributesMixinSerializer, ModelSerializer):
instance: User = super().create(validated_data)
if is_blueprint:
self._set_password(instance, password, password_hash)
perms_qs = Permission.objects.filter(
codename__in=[permission.split(".")[1] for permission in permissions]
).values_list("content_type__app_label", "codename")
perms_list = [f"{ct}.{name}" for ct, name in perms_qs]
instance.assign_perms_to_managed_role(perms_list)
self._ensure_password_not_empty(instance)
instance.assign_perms_to_managed_role(permissions)
return instance
def update(self, instance: User, validated_data: dict) -> User:
@@ -236,28 +247,15 @@ class UserSerializer(AttributesMixinSerializer, ModelSerializer):
instance = super().update(instance, validated_data)
if is_blueprint:
self._set_password(instance, password, password_hash)
perms_qs = Permission.objects.filter(
codename__in=[permission.split(".")[1] for permission in permissions]
).values_list("content_type__app_label", "codename")
perms_list = [f"{ct}.{name}" for ct, name in perms_qs]
instance.assign_perms_to_managed_role(perms_list)
self._ensure_password_not_empty(instance)
instance.assign_perms_to_managed_role(permissions)
return instance
def _set_password(self, instance: User, password: str | None, password_hash: str | None = None):
"""Set password from plain text or hash."""
if password_hash is not None:
instance.set_password_from_hash(password_hash)
instance.save()
PasswordDevice.set_password_from_hash(instance, password_hash)
elif password:
instance.set_password(password)
instance.save()
def _ensure_password_not_empty(self, instance: User):
"""Store an explicit unusable password instead of an empty password field."""
if len(instance.password) == 0:
instance.set_unusable_password()
instance.save()
PasswordDevice.set_password(instance, password)
def get_avatar(self, user: User) -> str:
"""User's avatar, either a http/https URL or a data URI"""
@@ -353,12 +351,13 @@ class UserSerializer(AttributesMixinSerializer, ModelSerializer):
"type",
"uuid",
"password_change_date",
"password_locked",
"password_device",
"last_updated",
]
extra_kwargs = {
"name": {"allow_blank": True},
"date_joined": {"read_only": True},
"password_change_date": {"read_only": True},
}
@@ -500,7 +499,32 @@ class UserPasswordSetSerializer(PassiveSerializer):
class UserPasswordHashSetSerializer(PassiveSerializer):
"""Payload to set a users' password hash directly"""
password = CharField(required=True, validators=[validate_password_hash])
password = CharField(required=True)
override = BooleanField(
default=False,
help_text=_(
"Import a valid password hash even when its parameters do not match authentik's "
"current password hashing settings."
),
)
def validate(self, attrs: dict) -> dict:
"""Validate the password hash with the requested override."""
try:
PasswordHashValidator(strict=not attrs["override"])(attrs["password"])
except PasswordHashRequiresOverride as exc:
raise ValidationError(
{
"password": [
_('%(reason)s Set "override" to true to import it anyway.')
% {"reason": reason}
for reason in exc.detail
]
}
) from exc
except ValidationError as exc:
raise ValidationError({"password": exc.detail}) from exc
return attrs
class UserServiceAccountSerializer(PassiveSerializer):
@@ -643,7 +667,7 @@ class UserViewSet(
]
def get_queryset(self):
base_qs = User.objects.all().exclude_anonymous()
base_qs = User.objects.all().exclude_anonymous().select_related("password_device")
# Always prefetch groups since group PKs are always serialized.
# Use full prefetch when include_groups=true (for groups_obj), ID-only otherwise.
if self.serializer_class(context={"request": self.request})._should_include_groups:
@@ -797,9 +821,6 @@ class UserViewSet(
attributes={USER_ATTRIBUTE_TOKEN_EXPIRING: expiring},
path=USER_PATH_SERVICE_ACCOUNT,
)
user.set_unusable_password()
user.save()
response = {
"username": user.username,
"user_uid": user.uid,
@@ -910,8 +931,7 @@ class UserViewSet(
"""Set password for user"""
user: User = self.get_object()
try:
user.set_password(body.validated_data["password"], request=request)
user.save()
PasswordDevice.set_password(user, body.validated_data["password"], request=request)
except (ValidationError, IntegrityError) as exc:
LOGGER.debug("Failed to set password", exc=exc)
return Response(status=400)
@@ -944,12 +964,12 @@ class UserViewSet(
is available from the request payload.
"""
user: User = self.get_object()
try:
user.set_password_from_hash(body.validated_data["password"], request=request)
user.save()
except (ValidationError, IntegrityError) as exc:
LOGGER.debug("Failed to set password hash", exc=exc)
return Response(status=400)
PasswordDevice.set_password_from_hash(
user,
body.validated_data["password"],
request=request,
hasher_defaults_overridden=body.validated_data["override"],
)
self._update_session_hash_after_password_change(request, user)
return Response(status=204)
+33 -8
View File
@@ -20,8 +20,13 @@ from rest_framework.serializers import (
model_meta,
raise_errors_on_nested_writes,
)
from structlog.stdlib import get_logger
from authentik.lib.models import SimpleThroughModel
from authentik.rbac.endpoint_checks import EndpointChecks
from authentik.rbac.field_rules import FieldRules
LOGGER = get_logger()
def is_dict(value: Any):
@@ -47,7 +52,6 @@ class JSONExtension(OpenApiSerializerFieldExtension):
class ModelSerializer(BaseModelSerializer):
# By default, JSON fields we have are used to store dictionaries
serializer_field_mapping = BaseModelSerializer.serializer_field_mapping.copy()
serializer_field_mapping[models.JSONField] = JSONDictField
@@ -57,15 +61,36 @@ class ModelSerializer(BaseModelSerializer):
# `secret_fields` are visible for users which are allowed to change the object
secret_fields = getattr(self.Meta, "secret_fields", [])
request = self.context.get("request")
if not secret_fields or not request:
return data
permission = f"{instance._meta.app_label}.change_{instance._meta.model_name}"
if request.user.has_perm(permission, instance):
return data
for field_name in secret_fields:
data.pop(field_name, None)
if secret_fields and request:
permission = f"{instance._meta.app_label}.change_{instance._meta.model_name}"
if not request.user.has_perm(permission, instance):
for field_name in secret_fields:
data.pop(field_name, None)
if rules := self.field_rules(instance):
data = rules.hide(data, self.fields)
return data
def to_internal_value(self, data):
# Strip updates to fields not visible to the user
instance = self.instance if isinstance(self.instance, Model) else None
if rules := self.field_rules(instance):
data = rules.restrict_input(data, instance, self.fields)
return super().to_internal_value(data)
def field_rules(self, instance: Model | None) -> FieldRules:
request = self.context.get("request")
view = self.context.get("view")
model = getattr(getattr(self, "Meta", None), "model", None)
if request is None or model is None:
return FieldRules()
if model is not getattr(getattr(view, "queryset", None), "model", None):
return FieldRules()
checks = EndpointChecks.for_request(request)
rules = checks.field_rules(instance)
if unknown := rules.unknown_fields(self.fields):
checks.report_unknown_fields(unknown)
return rules
def update(self, instance: Model, validated_data):
raise_errors_on_nested_writes("update", self, validated_data)
info = model_meta.get_field_info(instance)
+2 -2
View File
@@ -36,8 +36,8 @@ class AuthentikCoreConfig(ManagedAppConfig):
def ready(self) -> None:
if CONFIG.get_bool("error_reporting.enabled", False):
setup_pre_fork()
# The server preloads the app before forking, some backends must finish
# initializing after the fork instead (see lifecycle/server.py's post_fork)
# Under gunicorn's preload_app, some backends must finish initializing after
# the fork instead (see lifecycle/gunicorn.conf.py's post_fork hook)
if not os.environ.get(TRACER_DEFER_POSTFORK_ENV_VAR):
setup_post_fork()
return super().ready()
+15 -8
View File
@@ -2,7 +2,9 @@
from typing import Any
from asgiref.sync import sync_to_async
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import make_password
from django.http.request import HttpRequest
from authentik.core.models import Token, TokenIntents, User
@@ -38,8 +40,15 @@ class InbuiltBackend(ModelBackendNoAuthz):
def authenticate(
self, request: HttpRequest, username: str | None, password: str | None, **kwargs: Any
) -> User | None:
user = super().authenticate(request, username=username, password=password, **kwargs)
if not user:
if username is None or password is None:
return None
user = User.objects.select_related("password_device").filter(username=username).first()
device = getattr(user, "password_device", None)
if device is None:
# Hash once, so a missing user or password takes as long as a wrong password.
make_password(password)
return None
if not device.check_password(password) or not self.user_can_authenticate(user):
return None
self.set_method("password", request)
return user
@@ -47,11 +56,9 @@ class InbuiltBackend(ModelBackendNoAuthz):
async def aauthenticate(
self, request: HttpRequest, username: str | None, password: str | None, **kwargs: Any
) -> User | None:
user = await super().aauthenticate(request, username=username, password=password, **kwargs)
if not user:
return None
self.set_method("password", request)
return user
return await sync_to_async(self.authenticate)(
request, username=username, password=password, **kwargs
)
def set_method(self, method: str, request: HttpRequest | None, **kwargs):
"""Set method data on current flow, if possbiel"""
@@ -78,7 +85,7 @@ class TokenBackend(InbuiltBackend):
except User.DoesNotExist:
# Run the default password hasher once to reduce the timing
# difference between an existing and a nonexistent user (#20760).
User().set_password(password, request=request)
make_password(password)
return None
tokens = Token.objects.filter(
@@ -0,0 +1,42 @@
# Generated by Django 5.2.17 on 2026-10-10 16:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("authentik_core", "0066_user_authentik_core_user_email_idx"),
("authentik_stages_password", "0011_password_devices"),
]
operations = [
migrations.RemoveIndex(
model_name="user",
name="authentik_c_passwor_eec915_idx",
),
# Passwords moved to password devices. Keep the legacy columns, nullable,
# until a later release drops them.
migrations.AlterField(
model_name="user",
name="password",
field=models.CharField(max_length=128, null=True, verbose_name="password"),
),
migrations.AlterField(
model_name="user",
name="password_change_date",
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.RemoveField(
model_name="user",
name="password",
),
migrations.RemoveField(
model_name="user",
name="password_change_date",
),
],
),
]
@@ -0,0 +1,74 @@
# Generated by Django 5.2.17 on 2026-10-30 04:07
from django.apps.registry import Apps
from django.db import migrations
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
PREFIX = "/static/authentik/sources/"
# Built-in source icons moved from a single file to a folder with a variant per theme
MOVED_ICONS = {
f"{PREFIX}{name}.svg": f"{PREFIX}{name}/%(theme)s.svg"
for name in (
"apple",
"azuread",
"discord",
"dropbox",
"entraid",
"facebook",
"github",
"gitlab",
"google",
"mailcow",
"okta",
"openidconnect",
"patreon",
"plex",
"proxy",
"rac",
"radius",
"reddit",
"slack",
"ssf",
"telegram",
"twitch",
"twitter",
"wechat",
"wsfed",
)
} | {
f"{PREFIX}kerberos.png": f"{PREFIX}kerberos/%(theme)s.png",
f"{PREFIX}ldap.png": f"{PREFIX}ldap/%(theme)s.svg",
f"{PREFIX}saml.png": f"{PREFIX}saml/%(theme)s.png",
f"{PREFIX}scim.png": f"{PREFIX}scim/%(theme)s.svg",
}
# Fields set through the file picker, where admins could pick a built-in icon
FILE_FIELDS = (
("authentik_core", "source", "icon"),
("authentik_core", "application", "meta_icon"),
("authentik_brands", "brand", "branding_logo"),
("authentik_brands", "brand", "branding_favicon"),
("authentik_brands", "brand", "branding_default_flow_background"),
("authentik_flows", "flow", "background"),
)
def move_source_icons(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
db_alias = schema_editor.connection.alias
for app_label, model_name, field in FILE_FIELDS:
model = apps.get_model(app_label, model_name)
for old, new in MOVED_ICONS.items():
model.objects.using(db_alias).filter(**{field: old}).update(**{field: new})
class Migration(migrations.Migration):
dependencies = [
("authentik_core", "0067_password_devices"),
("authentik_brands", "0016_brand_branding_map_tiles"),
("authentik_flows", "0031_alter_flow_layout"),
]
operations = [
migrations.RunPython(move_source_icons, migrations.RunPython.noop),
]
+45 -47
View File
@@ -9,8 +9,9 @@ from typing import Any, Self
from uuid import uuid4
import pgtrigger
from asgiref.sync import sync_to_async
from deepmerge import always_merger
from django.contrib.auth.hashers import check_password
from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX
from django.contrib.auth.models import AbstractUser, Permission
from django.contrib.auth.models import UserManager as DjangoUserManager
from django.contrib.contenttypes.models import ContentType
@@ -33,6 +34,7 @@ from rest_framework.fields import BooleanField, CharField, IntegerField, ListFie
from rest_framework.serializers import Serializer
from structlog.stdlib import get_logger
from authentik.admin.files.backends.static import static_url_name
from authentik.admin.files.fields import FileField
from authentik.admin.files.manager import get_file_manager
from authentik.admin.files.usage import FileUsage
@@ -133,6 +135,9 @@ class UserTypes(models.TextChoices):
INTERNAL_SERVICE_ACCOUNT = "internal_service_account"
SERVICE_ACCOUNT_TYPES = (UserTypes.SERVICE_ACCOUNT, UserTypes.INTERNAL_SERVICE_ACCOUNT)
class AttributesMixin(models.Model):
"""Adds an attributes property to a model"""
@@ -365,7 +370,12 @@ class UserManager(DjangoUserManager.from_queryset(UserQuerySet)):
def create_user(self, username, email=None, password=None, **extra_fields):
"""User manager that doesn't assign is_superuser and is_staff"""
return self._create_user(username, email, password, **extra_fields)
from authentik.stages.password.models import PasswordDevice
user = self.create(username=username, email=self.normalize_email(email), **extra_fields)
if password is not None:
PasswordDevice.set_password(user, password, signal=False)
return user
def exclude_anonymous(self) -> QuerySet:
"""Exclude anonymous user"""
@@ -389,7 +399,6 @@ class User(SerializerModel, AttributesMixin, AbstractUser):
roles = models.ManyToManyField(
"authentik_rbac.Role", related_name="users", blank=True, through="UserRole"
)
password_change_date = models.DateTimeField(auto_now_add=True)
last_updated = models.DateTimeField(auto_now=True)
@@ -406,7 +415,6 @@ class User(SerializerModel, AttributesMixin, AbstractUser):
]
indexes = [
models.Index(fields=["last_login"]),
models.Index(fields=["password_change_date"]),
models.Index(fields=["uuid"]),
models.Index(fields=["path"]),
models.Index(fields=["type"]),
@@ -495,7 +503,7 @@ class User(SerializerModel, AttributesMixin, AbstractUser):
def app_entitlements(self, app: Application | None) -> QuerySet[ApplicationEntitlement]:
"""Get all entitlements this user has for `app`."""
if not app:
return []
return ApplicationEntitlement.objects.none()
return self.all_app_entitlements().filter(app=app)
def all_app_entitlements(self) -> QuerySet[ApplicationEntitlement]:
@@ -573,49 +581,33 @@ class User(SerializerModel, AttributesMixin, AbstractUser):
)
return self.groups
def set_password(self, raw_password, signal=True, sender=None, request=None):
if self.pk and signal:
from authentik.core.signals import password_changed
# Passwords are written through authentik.stages.password.models.PasswordDevice.
# These read-only properties keep `user.password` and `user.password_change_date`
# working in expressions, Django's session hash and the user API.
@property
def password(self) -> str:
device = getattr(self, "password_device", None)
return device.password if device else UNUSABLE_PASSWORD_PREFIX
if not sender:
sender = self
password_changed.send(sender=sender, user=self, password=raw_password, request=request)
self.password_change_date = now()
return super().set_password(raw_password)
def set_password_from_hash(self, password_hash: str, signal=True, sender=None, request=None):
"""Set password directly from a pre-hashed value.
Unlike set_password(), this does not hash the input again. The provided value
must already be validated by the caller, and it is stored directly on the user.
Because no raw password is available, downstream password sync integrations
such as LDAP and Kerberos cannot be updated from this code path.
"""
if self.pk and signal:
from authentik.core.signals import password_hash_changed
if not sender:
sender = self
password_hash_changed.send(sender=sender, user=self, request=request)
self.password = password_hash
self.password_change_date = now()
@property
def password_change_date(self) -> datetime:
device = getattr(self, "password_device", None)
return device.password_change_date if device else self.date_joined
def check_password(self, raw_password: str) -> bool:
"""
Return a boolean of whether the raw_password was correct. Handles
hashing formats behind the scenes.
# Django's version writes `password` when it upgrades an outdated hash.
device = getattr(self, "password_device", None)
return device.check_password(raw_password) if device else False
Slightly changed version which doesn't send a signal for such internal hash upgrades
"""
async def acheck_password(self, raw_password: str) -> bool:
return await sync_to_async(self.check_password)(raw_password)
def setter(raw_password):
self.set_password(raw_password, signal=False)
# Password hash upgrades shouldn't be considered password changes.
self._password = None
self.save(update_fields=["password"])
# Django's password writes would assign the read-only `password`; fail loudly instead.
def set_password(self, raw_password):
raise NotImplementedError("Use PasswordDevice.set_password()")
return check_password(raw_password, self.password, setter)
def set_unusable_password(self):
raise NotImplementedError("Use PasswordDevice.set_unusable_password()")
@property
def uid(self) -> str:
@@ -640,6 +632,13 @@ class User(SerializerModel, AttributesMixin, AbstractUser):
return get_avatar(self)
def get_init_anonymous_user(user_model: type[User]) -> User:
"""Build guardian's anonymous user, which has no password device and so no password.
guardian's default calls `set_unusable_password()`, which needs a writable `password`."""
return user_model(username=settings.ANONYMOUS_USER_NAME)
class Provider(SerializerModel):
"""Application-independent Provider instance. For example SAML2 Remote, OAuth2 Application"""
@@ -802,7 +801,7 @@ class Application(RequestableModel, SerializerModel, PolicyBindingModel):
@property
def get_meta_icon_themed_urls(self) -> dict[str, str] | None:
"""Get themed URLs for meta_icon if it contains %(theme)s"""
"""Get themed URLs for meta_icon if it contains %(theme)s or is a built-in source icon"""
if not self.meta_icon:
return None
@@ -1037,9 +1036,10 @@ class Source(ManagedModel, SerializerModel, PolicyBindingModel):
request=None,
use_cache: bool = True,
) -> dict[str, str] | None:
"""Get themed URLs for icon if it contains %(theme)s."""
"""Get themed URLs for the icon if it contains %(theme)s or is a built-in source icon."""
if not self.icon:
return None
# Subclasses fall back to a built-in default icon, relative like their icon_url
return get_file_manager(FileUsage.MEDIA).themed_urls(static_url_name(self.icon_url))
return get_file_manager(FileUsage.MEDIA).themed_urls(
self.icon,
request,
@@ -1692,6 +1692,4 @@ class Actor(ExpiringModel, User):
type=UserTypes.SERVICE_ACCOUNT,
**kwargs,
)
actor.set_unusable_password()
actor.save()
return actor
+10 -2
View File
@@ -2,13 +2,14 @@ from os import getenv
from django.core.exceptions import ImproperlyConfigured
from django.dispatch import receiver
from rest_framework.exceptions import ValidationError
from structlog.stdlib import get_logger
from authentik.admin.utils import get_system_settings
from authentik.blueprints.models import BlueprintInstance
from authentik.blueprints.v1.importer import Importer
from authentik.core.apps import Setup
from authentik.lib.validators import validate_password_hash
from authentik.lib.validators import PasswordHashValidator
from authentik.root.signals import post_startup
BOOTSTRAP_BLUEPRINT = "system/bootstrap.yaml"
@@ -38,7 +39,14 @@ def post_startup_setup_bootstrap(sender, **_):
LOGGER.info("Instance is already setup, skipping")
return
if password_hash := getenv("AUTHENTIK_BOOTSTRAP_PASSWORD_HASH"):
validate_password_hash(password_hash)
try:
PasswordHashValidator()(password_hash)
except ValidationError as exc:
raise ImproperlyConfigured(
"AUTHENTIK_BOOTSTRAP_PASSWORD_HASH does not match authentik's current "
"password hashing settings. Generate a new hash with authentik's current "
"settings. See https://docs.goauthentik.io/core/password-hashes/."
) from exc
importer = Importer.from_string(content)
valid, logs = importer.validate()
if not valid:
+2 -2
View File
@@ -11,7 +11,6 @@ from structlog.stdlib import get_logger
from authentik.admin.models import SystemSettings
from authentik.admin.utils import (
clear_system_settings_cache,
get_system_settings,
normalize_base_url,
)
@@ -20,6 +19,7 @@ from authentik.core.apps import Setup
from authentik.flows.models import Flow, FlowAuthenticationRequirement, in_memory_stage
from authentik.flows.planner import FlowPlanner
from authentik.flows.stage import StageView
from authentik.outposts.apps import set_outpost_host
from authentik.stages.prompt.stage import PLAN_CONTEXT_PROMPT
LOGGER = get_logger()
@@ -80,7 +80,7 @@ class PostSetupStageView(StageView):
)
if base_url:
SystemSettings.objects.filter(pk=get_system_settings().pk).update(base_url=base_url)
clear_system_settings_cache()
set_outpost_host(base_url)
# Remember we're setup
Setup.set(True)
# Disable OOBE Blueprints
+7 -13
View File
@@ -244,10 +244,8 @@ class SourceFlowManager:
error = Exception(
_(
"Request to authenticate with {source} has been denied. Please authenticate "
"with the source you've previously signed up with.".format_map(
{"source": self.source.name}
)
),
"with the source you've previously signed up with."
).format(source=self.source.name),
)
return self.error_handler(error)
@@ -385,10 +383,8 @@ class SourceFlowManager:
stages=[
in_memory_stage(
MessageStage,
message=_(
"Successfully authenticated with {source}!".format_map(
{"source": self.source.name}
)
message=_("Successfully authenticated with {source}!").format(
source=self.source.name
),
)
],
@@ -420,7 +416,7 @@ class SourceFlowManager:
).from_http(self.request)
messages.success(
self.request,
_("Successfully linked {source}!".format_map({"source": self.source.name})),
_("Successfully linked {source}!").format(source=self.source.name),
)
return redirect(
reverse(
@@ -447,10 +443,8 @@ class SourceFlowManager:
stages=[
in_memory_stage(
MessageStage,
message=_(
"Successfully authenticated with {source}!".format_map(
{"source": self.source.name}
)
message=_("Successfully authenticated with {source}!").format(
source=self.source.name
),
)
],
@@ -1,13 +1,5 @@
{% load i18n %}
<div class="ak-c-placeholder" id="ak-placeholder" slot="placeholder">
<span
class="pf-c-spinner"
role="progressbar"
aria-valuetext="Loading..."
>
<span class="pf-c-spinner__clipper"></span>
<span class="pf-c-spinner__lead-ball"></span>
<span class="pf-c-spinner__tail-ball"></span>
</span>
{% include "./spinner.html" %}
</div>
@@ -0,0 +1,7 @@
{% load i18n %}
<span class="pf-c-spinner" role="progressbar" aria-valuetext="{% trans "Loading..." %}">
<span class="pf-c-spinner__clipper"></span>
<span class="pf-c-spinner__lead-ball"></span>
<span class="pf-c-spinner__tail-ball"></span>
</span>
@@ -14,6 +14,13 @@
:root {
--ak-global--background-image: url("{{ request.brand.branding_default_flow_background_url|iriencode|safe }}");
}
{% with themed=request.brand.branding_default_flow_background_themed_urls %}
{% if themed %}
:root[data-theme="dark"] {
--ak-global--background-image: url("{{ themed.dark|iriencode|safe }}");
}
{% endif %}
{% endwith %}
:root[data-theme="dark"] .branding-logo--light,
:root:not([data-theme="dark"]) .branding-logo--dark {
display: none;
@@ -135,6 +135,112 @@ class TestApplicationEntitlements(APITestCase):
{"non_field_errors": ["One of 'group', 'user' must be set."]},
)
def test_api_for_user(self):
"""Test listing all entitlements a user has via for_user"""
other_app = Application.objects.create(name=generate_id(), slug=generate_id())
ent_direct = ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
PolicyBinding.objects.create(target=ent_direct, user=self.user, order=0)
group = Group.objects.create(name=generate_id())
self.user.groups.add(group)
ent_group = ApplicationEntitlement.objects.create(app=other_app, name=generate_id())
PolicyBinding.objects.create(target=ent_group, group=group, order=0)
# Entitlement the user does not have
ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
self.client.force_login(create_test_admin_user())
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": self.user.pk},
)
self.assertEqual(res.status_code, 200)
body = res.json()
self.assertEqual(body["pagination"]["count"], 2)
self.assertCountEqual(
[ent["name"] for ent in body["results"]],
[ent_direct.name, ent_group.name],
)
self.assertCountEqual(
[ent["app_name"] for ent in body["results"]],
[self.app.name, other_app.name],
)
def test_api_for_user_ordering(self):
"""Test that for_user results can be ordered by application name"""
app_a = Application.objects.create(name=f"aaa-{generate_id()}", slug=generate_id())
app_b = Application.objects.create(name=f"bbb-{generate_id()}", slug=generate_id())
ent_a = ApplicationEntitlement.objects.create(app=app_a, name=generate_id())
ent_b = ApplicationEntitlement.objects.create(app=app_b, name=generate_id())
PolicyBinding.objects.create(target=ent_a, user=self.user, order=0)
PolicyBinding.objects.create(target=ent_b, user=self.user, order=0)
self.client.force_login(create_test_admin_user())
for ordering, expected in [
("app__name", [ent_a.name, ent_b.name]),
("-app__name", [ent_b.name, ent_a.name]),
]:
with self.subTest(ordering=ordering):
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": self.user.pk, "ordering": ordering, "search": ""},
)
self.assertEqual(res.status_code, 200)
self.assertEqual(
[ent["name"] for ent in res.json()["results"]],
expected,
)
def test_api_for_user_deduplicated(self):
"""Test that an entitlement matched by multiple bindings is only returned once"""
ent = ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
PolicyBinding.objects.create(target=ent, user=self.user, order=0)
group = Group.objects.create(name=generate_id())
self.user.groups.add(group)
PolicyBinding.objects.create(target=ent, group=group, order=1)
self.client.force_login(create_test_admin_user())
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": self.user.pk},
)
self.assertEqual(res.status_code, 200)
self.assertEqual(res.json()["pagination"]["count"], 1)
def test_api_for_user_with_permission(self):
"""Test for_user with explicitly granted permissions (non-superuser)"""
ent = ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
PolicyBinding.objects.create(target=ent, user=self.user, order=0)
self.other_user.assign_perms_to_managed_role("authentik_core.view_applicationentitlement")
self.other_user.assign_perms_to_managed_role("authentik_core.view_user_applications")
self.client.force_login(self.other_user)
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": self.user.pk},
)
self.assertEqual(res.status_code, 200)
body = res.json()
self.assertEqual(body["pagination"]["count"], 1)
self.assertEqual(body["results"][0]["name"], ent.name)
def test_api_for_user_denied(self):
"""Test that for_user requires view_user_applications on the target user"""
ent = ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
PolicyBinding.objects.create(target=ent, user=self.user, order=0)
self.other_user.assign_perms_to_managed_role("authentik_core.view_applicationentitlement")
self.client.force_login(self.other_user)
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": self.user.pk},
)
self.assertEqual(res.status_code, 400)
self.assertJSONEqual(res.content, {"for_user": "User not found"})
def test_api_for_user_invalid(self):
"""Test for_user with a non-numerical value"""
self.client.force_login(create_test_admin_user())
res = self.client.get(
reverse("authentik_api:applicationentitlement-list"),
{"for_user": "foo"},
)
self.assertEqual(res.status_code, 400)
self.assertIn("for_user", res.json())
def test_api_bindings_group(self):
"""Test that API doesn't allow policies to be bound to this"""
ent = ApplicationEntitlement.objects.create(app=self.app, name=generate_id())
+29
View File
@@ -67,3 +67,32 @@ class TestErrorViewsRouting(TestCase):
response = getattr(self.client, method)(url)
self.assertEqual(response.status_code, 404)
self.assertTemplateUsed(response, "if/error.html")
class TestErrorViewsThemedBackground(TestCase):
"""The error page renders without the UI, so it resolves a themed default flow
background itself instead of sending the browser a %(theme)s placeholder."""
def test_themed_background(self):
"""The light variant is the default and the dark variant follows data-theme"""
create_test_brand(
branding_default_flow_background="/static/authentik/sources/kerberos/%(theme)s.png"
)
response = self.client.get("/this-path-does-not-exist/")
self.assertEqual(response.status_code, 404)
self.assertTemplateUsed(response, "if/error.html")
content = response.content.decode()
self.assertNotIn("%(theme)s", content)
self.assertIn(
'<link rel="prefetch" href="/static/authentik/sources/kerberos/light.png"', content
)
self.assertRegex(
content,
r":root \{\s*--ak-global--background-image: "
r'url\("/static/authentik/sources/kerberos/light.png"\);',
)
self.assertRegex(
content,
r':root\[data-theme="dark"\] \{\s*--ak-global--background-image: '
r'url\("/static/authentik/sources/kerberos/dark.png"\);',
)
@@ -0,0 +1,50 @@
"""Test moving stored built-in source icons to their themed folders"""
from importlib import import_module
from django.apps import apps
from django.db import connection
from django.test import TestCase
from authentik.core.models import Application
from authentik.flows.models import Flow, FlowDesignation
from authentik.lib.generators import generate_id
from authentik.sources.oauth.models import OAuthSource
move_source_icons = import_module(
"authentik.core.migrations.0068_move_source_icons"
).move_source_icons
class TestMoveSourceIcons(TestCase):
"""Test moving stored built-in source icons to their themed folders"""
def test_move(self):
"""Test built-in icons are moved, other values are kept"""
github = OAuthSource.objects.create(
name=generate_id(), slug=generate_id(), icon="/static/authentik/sources/github.svg"
)
custom = OAuthSource.objects.create(
name=generate_id(), slug=generate_id(), icon="sources/github.svg"
)
app = Application.objects.create(
name=generate_id(), slug=generate_id(), meta_icon="/static/authentik/sources/ldap.png"
)
flow = Flow.objects.create(
name=generate_id(),
slug=generate_id(),
designation=FlowDesignation.AUTHENTICATION,
background="/static/authentik/sources/kerberos.png",
)
with connection.schema_editor() as schema_editor:
move_source_icons(apps, schema_editor)
github.refresh_from_db()
custom.refresh_from_db()
app.refresh_from_db()
flow.refresh_from_db()
self.assertEqual(github.icon, "/static/authentik/sources/github/%(theme)s.svg")
self.assertEqual(custom.icon, "sources/github.svg")
self.assertEqual(app.meta_icon, "/static/authentik/sources/ldap/%(theme)s.svg")
self.assertEqual(flow.background, "/static/authentik/sources/kerberos/%(theme)s.png")
@@ -0,0 +1,49 @@
"""Existing passwords move to password devices."""
from datetime import timedelta
from importlib import import_module
from django.contrib.auth.hashers import make_password
from django.db import connection
from django.db.migrations.loader import MigrationLoader
from django.test import TestCase
from django.utils.timezone import now
from authentik.core.models import User
from authentik.lib.generators import generate_id
from authentik.stages.password.models import PasswordDevice
MIGRATION = ("authentik_stages_password", "0011_password_devices")
class TestPasswordMigration(TestCase):
"""Run the data copy against the historical models and the retained columns."""
def test_create_password_devices(self):
usable, unusable, empty = (User.objects.create(username=generate_id()) for _ in range(3))
password = make_password(generate_id())
changed_at = now() - timedelta(days=3)
with connection.cursor() as cursor:
# Before the migration, every user row has a password.
cursor.execute("UPDATE authentik_core_user SET password = '' WHERE password IS NULL")
cursor.executemany(
"UPDATE authentik_core_user SET password = %s, password_change_date = %s "
"WHERE id = %s",
[
(password, changed_at, usable.pk),
(make_password(None), changed_at, unusable.pk),
("", changed_at, empty.pk),
],
)
apps = MigrationLoader(connection).project_state(MIGRATION).apps
migration = import_module(f"authentik.stages.password.migrations.{MIGRATION[1]}")
with connection.schema_editor() as schema_editor:
migration.create_password_devices(apps, schema_editor)
device = PasswordDevice.objects.get(user=usable)
self.assertEqual(device.password, password)
self.assertEqual(device.password_change_date, changed_at)
self.assertEqual(device.failed_attempts, 0)
self.assertIsNone(device.locked_at)
self.assertFalse(PasswordDevice.objects.filter(user__in=[unusable, empty]).exists())
@@ -0,0 +1,51 @@
"""Nested user data must not load a password device for every row."""
from django.test import TestCase
from django.utils.timezone import now
from authentik.core.api.users import UserSerializer
from authentik.core.models import Application, User
from authentik.core.tests.utils import create_test_flow, create_test_user
from authentik.lib.generators import generate_id
from authentik.providers.oauth2.api.tokens import (
AccessTokenViewSet,
AuthorizationCodeViewSet,
RefreshTokenViewSet,
)
from authentik.providers.oauth2.models import OAuth2Provider
from authentik.stages.consent.api import UserConsentViewSet
from authentik.stages.consent.models import UserConsent
class TestPasswordQueries(TestCase):
"""Cover both users with a password and users without a device."""
def test_nested_password_dates(self):
users = [create_test_user(), User.objects.create(username=generate_id())]
provider = OAuth2Provider.objects.create(
name=generate_id(), authorization_flow=create_test_flow()
)
application = Application.objects.create(name=generate_id(), slug=generate_id())
field = UserSerializer().fields["password_change_date"]
expected = [field.to_representation(user.password_change_date) for user in users]
for viewset in (
AuthorizationCodeViewSet,
RefreshTokenViewSet,
AccessTokenViewSet,
UserConsentViewSet,
):
with self.subTest(viewset=viewset):
model = viewset.queryset.model
for user in users:
extra = {"code": generate_id()} if viewset is AuthorizationCodeViewSet else {}
if model is UserConsent:
model.objects.create(user=user, application=application)
else:
model.objects.create(user=user, provider=provider, auth_time=now(), **extra)
with self.assertNumQueries(1):
dates = [
field.to_representation(field.get_attribute(record.user))
for record in viewset.queryset.filter(user__in=users).order_by("user_id")
]
self.assertEqual(dates, expected)
@@ -1,5 +1,7 @@
"""Test providers API"""
from json import loads
from django.urls import reverse
from rest_framework.test import APITestCase
@@ -24,3 +26,18 @@ class TestProvidersAPI(APITestCase):
reverse("authentik_api:provider-types"),
)
self.assertEqual(response.status_code, 200)
def test_types_icon_themed_urls(self):
"""Test themed icon URLs of provider types"""
response = self.client.get(reverse("authentik_api:provider-types"))
types = {
provider_type["model_name"]: provider_type for provider_type in loads(response.content)
}
self.assertEqual(
types["proxyprovider"]["icon_themed_urls"],
{
"light": "/static/authentik/sources/proxy/light.svg",
"dark": "/static/authentik/sources/proxy/dark.svg",
},
)
+28 -5
View File
@@ -2,19 +2,20 @@ from http import HTTPStatus
from os import environ
from unittest.mock import patch
from django.contrib.auth.hashers import make_password
from django.contrib.auth.hashers import PBKDF2PasswordHasher, make_password
from django.core.exceptions import ImproperlyConfigured
from django.urls import reverse
from rest_framework.exceptions import ValidationError
from authentik.admin.flags import patch_flag
from authentik.admin.utils import get_system_settings
from authentik.blueprints.tests import apply_blueprint
from authentik.blueprints.tests import apply_blueprint, reconcile_app
from authentik.core.apps import Setup
from authentik.core.models import Token, TokenIntents, User
from authentik.flows.models import Flow
from authentik.flows.tests import APIFlowTestCase
from authentik.lib.generators import generate_id
from authentik.outposts.apps import MANAGED_OUTPOST
from authentik.outposts.models import Outpost, OutpostConfig
from authentik.root.signals import post_startup, pre_startup
@@ -80,9 +81,13 @@ class TestSetup(APIFlowTestCase):
@apply_blueprint("default/flow-oobe.yaml")
@apply_blueprint("system/bootstrap.yaml")
@reconcile_app("authentik_outposts")
def test_setup_flow_full(self):
"""Test full setup flow"""
Setup.set(False)
outpost = Outpost.objects.get(managed=MANAGED_OUTPOST)
outpost.config = OutpostConfig(authentik_host="")
outpost.save()
res = self.client.get(reverse("authentik_core:setup"))
self.assertEqual(res.status_code, HTTPStatus.FOUND)
@@ -131,6 +136,8 @@ class TestSetup(APIFlowTestCase):
self.assertTrue(user.check_password(pw))
self.assertEqual(get_system_settings().base_url, "https://authentik.company")
outpost.refresh_from_db()
self.assertEqual(outpost.config.authentik_host, "https://authentik.company")
@patch_flag(Setup, False)
@apply_blueprint("default/flow-oobe.yaml")
@@ -252,15 +259,31 @@ class TestSetup(APIFlowTestCase):
self.assertEqual(user.password, password_hash)
self.assertTrue(user.check_password(password))
@patch_flag(Setup, False)
def test_setup_bootstrap_env_noncurrent_password_hash(self):
"""Test setup rejects a noncurrent password hash from the environment."""
User.objects.filter(username="akadmin").delete()
environ.pop("AUTHENTIK_BOOTSTRAP_PASSWORD", None)
hasher = PBKDF2PasswordHasher()
hasher.iterations -= 1
environ["AUTHENTIK_BOOTSTRAP_PASSWORD_HASH"] = hasher.encode(generate_id(), hasher.salt())
pre_startup.send(sender=self)
with self.assertRaises(ImproperlyConfigured):
post_startup.send(sender=self)
self.assertFalse(Setup.get())
self.assertFalse(User.objects.filter(username="akadmin").exists())
@patch_flag(Setup, False)
def test_setup_bootstrap_env_malformed_password_hash(self):
"""Test setup rejects a malformed password hash from the environment."""
User.objects.filter(username="akadmin").delete()
environ.pop("AUTHENTIK_BOOTSTRAP_PASSWORD", None)
environ["AUTHENTIK_BOOTSTRAP_PASSWORD_HASH"] = "pbkdf2_sha256$1000000/K4wGpWYKfJPSCcNM="
environ["AUTHENTIK_BOOTSTRAP_PASSWORD_HASH"] = "not-a-valid-hash"
pre_startup.send(sender=self)
with self.assertRaises(ValidationError):
with self.assertRaises(ImproperlyConfigured):
post_startup.send(sender=self)
self.assertFalse(Setup.get())
+33
View File
@@ -1,8 +1,17 @@
from json import loads
from django.apps import apps
from django.urls import reverse
from rest_framework.test import APITestCase
from authentik.core.tests.utils import create_test_admin_user
from authentik.lib.generators import generate_id
from authentik.sources.oauth.models import OAuthSource
GITHUB_ICON_THEMED_URLS = {
"light": "/static/authentik/sources/github/light.svg",
"dark": "/static/authentik/sources/github/dark.svg",
}
class TestSourceAPI(APITestCase):
@@ -17,3 +26,27 @@ class TestSourceAPI(APITestCase):
reverse("authentik_api:source-used-by", kwargs={"slug": "authentik-built-in"}),
)
self.assertEqual(response.status_code, 200)
def test_user_settings_icon_themed_urls(self):
"""Test themed icon URLs of user settings"""
github = OAuthSource.objects.create(
name=generate_id(), slug=generate_id(), provider_type="github"
)
custom = OAuthSource.objects.create(
name=generate_id(), slug=generate_id(), icon="https://example.com/logo.png"
)
response = self.client.get(reverse("authentik_api:source-user-settings"))
self.assertEqual(response.status_code, 200)
settings = {setting["object_uid"]: setting for setting in loads(response.content)}
self.assertEqual(settings[github.slug]["icon_themed_urls"], GITHUB_ICON_THEMED_URLS)
self.assertIsNone(settings[custom.slug]["icon_themed_urls"])
def test_types_icon_themed_urls(self):
"""Test themed icon URLs of source types"""
response = self.client.get(reverse("authentik_api:source-types"))
self.assertEqual(response.status_code, 200)
types = {source_type["model_name"]: source_type for source_type in loads(response.content)}
self.assertEqual(types["githuboauthsource"]["icon_themed_urls"], GITHUB_ICON_THEMED_URLS)
+3 -2
View File
@@ -12,6 +12,7 @@ from authentik.core.models import User
from authentik.core.signals import password_changed, password_hash_changed
from authentik.events.models import Event
from authentik.lib.generators import generate_id
from authentik.stages.password.models import PasswordDevice
class TestUsers(TestCase):
@@ -112,14 +113,14 @@ class TestUsers(TestCase):
"UserKerberosSourceConnection.objects.select_related"
) as kerberos_connections_select,
):
user.set_password_from_hash(make_password("new-password")) # nosec
user.save()
PasswordDevice.set_password_from_hash(user, make_password("new-password")) # nosec
finally:
password_changed.disconnect(dispatch_uid=dispatch_uid)
password_hash_changed.disconnect(dispatch_uid=hash_dispatch_uid)
self.assertEqual(password_changed_captured, [])
self.assertEqual(len(password_hash_changed_captured), 1)
self.assertFalse(password_hash_changed_captured[0]["hasher_defaults_overridden"])
ldap_sources_filter.assert_not_called()
kerberos_connections_select.assert_not_called()
+89 -19
View File
@@ -3,10 +3,16 @@
from datetime import datetime, timedelta
from json import loads
from django.contrib.auth.hashers import make_password
from django.conf import settings
from django.contrib.auth.hashers import (
PBKDF2PasswordHasher,
check_password,
make_password,
)
from django.db import connection
from django.test.utils import CaptureQueriesContext
from django.urls.base import reverse
from django.utils.module_loading import import_string
from django.utils.timezone import now
from rest_framework.test import APITestCase
@@ -27,13 +33,19 @@ from authentik.core.tests.utils import (
create_test_session,
create_test_user,
)
from authentik.events.models import Event, EventAction
from authentik.flows.models import FlowAuthenticationRequirement, FlowDesignation
from authentik.lib.generators import generate_id, generate_key
from authentik.rbac.models import Role
from authentik.stages.email.models import EmailStage
INVALID_PASSWORD_HASH = "not-a-valid-hash"
INVALID_PASSWORD_HASH_ERROR = "Invalid password hash format. Must be a valid Django password hash."
ALLOWED_ALGORITHMS = ", ".join(
import_string(path)().algorithm for path in settings.PASSWORD_HASHERS_IMPORT_ALLOWED
)
INVALID_PASSWORD_HASH_ERROR = (
f"Cannot identify hash function. Password hash must use one of: {ALLOWED_ALGORITHMS}."
)
class TestUsersAPI(APITestCase):
@@ -43,10 +55,15 @@ class TestUsersAPI(APITestCase):
self.admin = create_test_admin_user()
self.user = create_test_user()
def _set_password_hash(self, user: User, password_hash: str, client=None):
def _set_password_hash(
self, user: User, password_hash: str, client=None, override: bool | None = None
):
data: dict[str, str | bool] = {"password": password_hash}
if override is not None:
data["override"] = override
return (client or self.client).post(
reverse("authentik_api:user-set-password-hash", kwargs={"pk": user.pk}),
data={"password": password_hash},
data=data,
)
def _assert_password_hash_set(
@@ -55,16 +72,20 @@ class TestUsersAPI(APITestCase):
self.assertEqual(response.status_code, 204, response.data)
user.refresh_from_db()
self.assertEqual(user.password, password_hash)
self.assertTrue(user.check_password(password))
self.assertTrue(check_password(password, user.password))
def _assert_password_hash_rejected(
self, user: User, original_password_hash: str, response
self,
user: User,
original_password_hash: str,
response,
errors: str | list[str] | None = INVALID_PASSWORD_HASH_ERROR,
) -> None:
self.assertEqual(response.status_code, 400)
self.assertJSONEqual(
response.content,
{"password": [INVALID_PASSWORD_HASH_ERROR]},
)
if errors is not None:
if isinstance(errors, str):
errors = [errors]
self.assertJSONEqual(response.content, {"password": errors})
user.refresh_from_db()
self.assertEqual(user.password, original_password_hash)
@@ -92,6 +113,30 @@ class TestUsersAPI(APITestCase):
)
self.assertEqual(body["pagination"]["count"], len(expected))
def test_password_dates_do_not_add_queries_per_user(self):
"""Listing more password dates does not query each user's device separately."""
self.client.force_login(self.admin)
path = generate_id()
url = reverse("authentik_api:user-list")
counts = []
for size in (1, 5):
for _ in range(size):
create_test_user(path=path)
self.client.get(url, data={"path": path})
with CaptureQueriesContext(connection) as queries:
response = self.client.get(url, data={"path": path})
self.assertEqual(response.status_code, 200)
self.assertTrue(
all(user["password_change_date"] for user in response.json()["results"])
)
counts.append(
sum(
'FROM "authentik_stages_password_passworddevice"' in query["sql"]
for query in queries
)
)
self.assertEqual(*counts)
def test_filter_type_no_distinct(self):
"""Test that filtering by type doesn't make the list and count queries DISTINCT"""
self.client.force_login(self.admin)
@@ -275,7 +320,7 @@ class TestUsersAPI(APITestCase):
self.assertJSONEqual(response.content, {"password": ["This field may not be blank."]})
def test_set_password_hash(self):
"""Test setting a user's password from a hash."""
"""Test setting a user's password from a current hash."""
self.client.force_login(self.admin)
password = generate_key()
password_hash = make_password(password)
@@ -286,15 +331,40 @@ class TestUsersAPI(APITestCase):
def test_set_password_hash_invalid(self):
"""Test invalid password hashes are rejected."""
self.client.force_login(self.admin)
original_password = self.user.password
for password_hash in (
INVALID_PASSWORD_HASH,
"pbkdf2_sha256$1000000/K4wGpWYKfJPSCcNM=",
):
with self.subTest(password_hash=password_hash):
response = self._set_password_hash(self.user, password_hash)
response = self._set_password_hash(self.user, INVALID_PASSWORD_HASH)
self._assert_password_hash_rejected(self.user, original_password, response)
self._assert_password_hash_rejected(self.user, self.user.password, response)
def _noncurrent_pbkdf2_hash(self, password: str, salt: str | None = None) -> str:
hasher = PBKDF2PasswordHasher()
hasher.iterations -= 1
return hasher.encode(password, salt or hasher.salt())
def test_set_password_hash_override(self):
"""Test override imports a non-current hash, but not an invalid one."""
self.client.force_login(self.admin)
original_password = self.user.password
password = generate_key()
password_hash = self._noncurrent_pbkdf2_hash(password, "salt")
response = self._set_password_hash(self.user, password_hash)
errors = response.json()["password"]
self._assert_password_hash_rejected(self.user, original_password, response, errors=errors)
self.assertEqual(len(errors), 2)
self.assertTrue(all("override" in error for error in errors))
response = self._set_password_hash(self.user, password_hash, override=True)
self._assert_password_hash_set(self.user, password, password_hash, response)
self.assertTrue(
Event.objects.filter(
action=EventAction.PASSWORD_SET,
user__pk=self.user.pk,
context__hasher_defaults_overridden=True,
).exists()
)
response = self._set_password_hash(self.user, INVALID_PASSWORD_HASH, override=True)
self._assert_password_hash_rejected(self.user, password_hash, response)
def test_recovery(self):
"""Test user recovery link"""
+2 -2
View File
@@ -23,6 +23,7 @@ from authentik.crypto.builder import CertificateBuilder, PrivateKeyAlg
from authentik.crypto.models import CertificateKeyPair
from authentik.flows.models import Flow, FlowDesignation
from authentik.lib.generators import generate_id
from authentik.stages.password.models import PasswordDevice
def create_test_flow(
@@ -44,8 +45,7 @@ def create_test_user(name: str | None = None, **kwargs) -> User:
name=uid,
**kwargs,
)
user.set_password(uid)
user.save()
PasswordDevice.set_password(user, uid)
return user
+5 -1
View File
@@ -4,7 +4,7 @@ from dataclasses import dataclass
from rest_framework.fields import CharField
from authentik.core.api.utils import PassiveSerializer
from authentik.core.api.utils import PassiveSerializer, ThemedUrlsSerializer
from authentik.flows.challenge import Challenge
@@ -21,6 +21,9 @@ class UILoginButton:
# Icon URL, used as-is
icon_url: str | None = None
# Icon URLs per theme, preferred over icon_url when set
icon_themed_urls: dict[str, str] | None = None
# Whether this source should be displayed as a prominent button
promoted: bool = False
@@ -33,3 +36,4 @@ class UserSettingSerializer(PassiveSerializer):
title = CharField(required=True)
configure_url = CharField(required=False)
icon_url = CharField(required=False)
icon_themed_urls = ThemedUrlsSerializer(required=False, allow_null=True)
+5
View File
@@ -4,9 +4,11 @@ from json import loads
from os import makedirs
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest import skipIf
from unittest.mock import patch
from cryptography.exceptions import InternalError
from cryptography.hazmat.backends.openssl.backend import backend
from cryptography.hazmat.primitives.serialization import (
load_pem_private_key as cryptography_load_pem_private_key,
)
@@ -195,6 +197,7 @@ class TestCrypto(APITestCase):
)
self.assertEqual(response.status_code, 400)
@skipIf(backend._fips_enabled, "The FIPS provider has no ML-DSA")
def test_builder_mldsa(self):
"""Test Builder with the ML-DSA (FIPS 204) parameter sets"""
for alg, key_type in (
@@ -218,6 +221,7 @@ class TestCrypto(APITestCase):
instance.certificate.public_key().public_bytes_raw(),
)
@skipIf(backend._fips_enabled, "The FIPS provider has no ML-DSA")
def test_builder_api_mldsa(self):
"""Test Builder (via API) with ML-DSA"""
self.client.force_login(create_test_admin_user())
@@ -264,6 +268,7 @@ class TestCrypto(APITestCase):
self.assertEqual(response.status_code, 400)
self.assertIn("key_data", loads(response.content))
@skipIf(backend._fips_enabled, "The FIPS provider has no ML-DSA")
def test_mldsa_key_type_validation(self):
"""ML-DSA keypairs are accepted for TLS, and rejected where nothing can sign with them"""
builder = CertificateBuilder(generate_id())
-2
View File
@@ -65,8 +65,6 @@ class Agent(Actor):
expiring=expiring,
expires=expires,
)
agent.set_unusable_password()
agent.save()
if policy_behavior == ActorPolicyInheritance.COPY:
agent.copy_parent_policy_bindings()
return agent
+9 -22
View File
@@ -1,7 +1,6 @@
"""Enterprise audit middleware"""
from copy import deepcopy
from functools import partial
from typing import Any
from django.apps.registry import apps
@@ -10,7 +9,7 @@ from django.db import connection
from django.db.models import ManyToManyRel, Model
from django.db.models.expressions import BaseExpression, Combinable
from django.db.models.signals import post_init
from django.http import HttpRequest
from django.http import HttpRequest, HttpResponse
from authentik.enterprise.audit.apps import AuditIncludeExpandedDiff
from authentik.events.middleware import AuditMiddleware, should_log_model
@@ -25,23 +24,11 @@ class EnterpriseAuditMiddleware(AuditMiddleware):
"""Check if audit logging is enabled"""
return apps.get_app_config("authentik_enterprise").enabled()
def connect(self, request: HttpRequest):
super().connect(request)
if not self.enabled:
return
if not hasattr(request, "request_id"):
return
post_init.connect(
partial(self.post_init_handler, request=request),
dispatch_uid=request.request_id,
weak=False,
)
def disconnect(self, request: HttpRequest):
super().disconnect(request)
if not hasattr(request, "request_id"):
return
post_init.disconnect(dispatch_uid=request.request_id)
def __call__(self, request: HttpRequest) -> HttpResponse:
# post_init fires for every model instance, so only connect it once enterprise is in use
if self.enabled:
self.connect(post_init, "post_init_handler")
return super().__call__(request)
def serialize_simple(self, model: Model) -> dict:
"""Serialize a model in a very simple way. No ForeignKeys or other relationships are
@@ -104,11 +91,11 @@ class EnterpriseAuditMiddleware(AuditMiddleware):
**_,
):
if not self.is_current_request(request):
return
if not self.enabled:
return super().post_save_handler(request, sender, instance, created, thread_kwargs, **_)
return None
if not should_log_model(instance):
return None
if not self.enabled:
return super().post_save_handler(request, sender, instance, created, thread_kwargs, **_)
thread_kwargs = {}
if hasattr(instance, "_previous_state") or created:
prev_state = getattr(instance, "_previous_state", {})
+17 -26
View File
@@ -12,7 +12,7 @@ from authentik.core.models import Group, User
from authentik.core.tests.utils import create_test_admin_user
from authentik.enterprise.audit.apps import AuditIncludeExpandedDiff
from authentik.enterprise.audit.middleware import EnterpriseAuditMiddleware
from authentik.events.middleware import _CTX_REQUEST
from authentik.events.middleware import AuditMiddleware
from authentik.events.models import Event, EventAction
from authentik.events.utils import sanitize_item
from authentik.lib.generators import generate_id
@@ -88,11 +88,6 @@ class TestEnterpriseAudit(APITestCase):
"first_name": {"new_value": "", "previous_value": None},
"id": {"new_value": user.pk, "previous_value": None},
"last_name": {"new_value": "", "previous_value": None},
"password": {"new_value": "********************", "previous_value": None},
"password_change_date": {
"new_value": sanitize_item(user.password_change_date),
"previous_value": None,
},
},
)
@@ -229,8 +224,6 @@ class TestEnterpriseAudit(APITestCase):
"last_name": "",
"last_updated": sanitize_item(user.last_updated),
"name": user.name,
"password": "********************",
"password_change_date": sanitize_item(user.password_change_date),
"path": "users",
"type": "internal",
"username": user.username,
@@ -296,24 +289,22 @@ class TestEnterpriseAudit(APITestCase):
class TestEnterpriseAuditLifecycle(SimpleTestCase):
"""Enterprise audit callbacks stay scoped to their request."""
def test_disconnect_without_license_lookup(self):
"""Disconnect even if licensing is unavailable after connecting."""
def test_post_init_connected_lazily(self):
"""post_init fires for every model instance, so only connect it once licensed"""
middleware = EnterpriseAuditMiddleware(Mock())
request = RequestFactory().get("/")
request.request_id = generate_id()
middleware = EnterpriseAuditMiddleware(Mock())
baseline = len(post_init.receivers)
with patch.object(
EnterpriseAuditMiddleware, "enabled", new_callable=PropertyMock, return_value=True
) as enabled:
middleware.connect(request)
self.assertEqual(len(post_init.receivers), baseline + 1)
try:
enabled.side_effect = AssertionError("cleanup must not query licensing")
middleware.disconnect(request)
self.assertEqual(len(post_init.receivers), baseline)
finally:
enabled.side_effect = None
middleware.disconnect(request)
with (
patch.object(EnterpriseAuditMiddleware, "connect") as connect,
patch.object(
EnterpriseAuditMiddleware, "enabled", new_callable=PropertyMock, return_value=False
) as enabled,
):
middleware(request)
connect.assert_not_called()
enabled.return_value = True
middleware(request)
connect.assert_called_once_with(post_init, "post_init_handler")
def test_foreign_request_handlers(self):
"""Another request's callbacks must not query licensing or serialize models."""
@@ -324,7 +315,7 @@ class TestEnterpriseAuditLifecycle(SimpleTestCase):
other.request_id = generate_id()
for current in (None, other):
with self.subTest(current=current):
token = _CTX_REQUEST.set(current)
token = AuditMiddleware._current.set((middleware, current) if current else None)
try:
with (
patch.object(
@@ -342,4 +333,4 @@ class TestEnterpriseAuditLifecycle(SimpleTestCase):
enabled.assert_not_called()
serialize.assert_not_called()
finally:
_CTX_REQUEST.reset(token)
AuditMiddleware._current.reset(token)
@@ -110,3 +110,91 @@ class TestAppleRegister(APITestCase):
binding.refresh_from_db()
self.assertEqual(binding.apple_secure_enclave_key, new_enclave_key)
self.assertEqual(binding.apple_enclave_key_id, new_enclave_key_id)
@enterprise_test()
@reconcile_app("authentik_crypto")
def test_registration_state(self):
self.connection.apple_signing_key = generate_id()
self.connection.apple_sign_key_id = generate_id()
self.connection.apple_enc_key_id = generate_id()
self.connection.save()
binding = AgentDeviceUserBinding.objects.create(
target=self.device,
user=self.user,
connector=self.connector,
order=0,
apple_enclave_key_id=generate_id(),
)
response = self.client.get(
reverse("authentik_api:psso-register-device"),
HTTP_AUTHORIZATION=f"Bearer+agent {self.device_token.key}",
)
self.assertEqual(response.status_code, 200)
self.assertJSONEqual(
response.content,
{
"device_registered": True,
"sign_key_id": self.connection.apple_sign_key_id,
"enc_key_id": self.connection.apple_enc_key_id,
"users": [
{
"username": self.user.username,
"enclave_key_id": binding.apple_enclave_key_id,
}
],
},
)
@enterprise_test()
@reconcile_app("authentik_crypto")
def test_registration_state_unregistered(self):
response = self.client.get(
reverse("authentik_api:psso-register-device"),
HTTP_AUTHORIZATION=f"Bearer+agent {self.device_token.key}",
)
self.assertEqual(response.status_code, 200)
body = loads(response.content)
self.assertFalse(body["device_registered"])
self.assertEqual(body["users"], [])
@enterprise_test()
@reconcile_app("authentik_crypto")
def test_unregister_device(self):
self.connection.apple_signing_key = generate_id()
self.connection.apple_encryption_key = generate_id()
self.connection.apple_key_exchange_key = generate_id()
self.connection.apple_sign_key_id = generate_id()
self.connection.apple_enc_key_id = generate_id()
self.connection.save()
binding = AgentDeviceUserBinding.objects.create(
target=self.device,
user=self.user,
connector=self.connector,
order=0,
apple_secure_enclave_key=generate_id(),
apple_enclave_key_id=generate_id(),
)
DeviceAuthenticationToken.objects.create(
device=self.device,
device_token=self.device_token,
connector=self.connector,
user=self.user,
token=generate_id(),
)
response = self.client.delete(
reverse("authentik_api:psso-register-device"),
HTTP_AUTHORIZATION=f"Bearer+agent {self.device_token.key}",
)
self.assertEqual(response.status_code, 204)
self.connection.refresh_from_db()
self.assertEqual(self.connection.apple_signing_key, "")
self.assertEqual(self.connection.apple_encryption_key, "")
self.assertEqual(self.connection.apple_key_exchange_key, "")
self.assertEqual(self.connection.apple_sign_key_id, "")
self.assertEqual(self.connection.apple_enc_key_id, "")
binding.refresh_from_db()
self.assertEqual(binding.apple_secure_enclave_key, "")
self.assertEqual(binding.apple_enclave_key_id, "")
self.assertFalse(DeviceAuthenticationToken.objects.filter(device=self.device).exists())
# The device itself stays enrolled, only Platform SSO state is cleared
self.assertTrue(DeviceToken.objects.filter(pk=self.device_token.pk).exists())
@@ -1,11 +1,13 @@
from django.db import transaction
from django.urls import reverse
from drf_spectacular.utils import extend_schema
from rest_framework.exceptions import ValidationError
from rest_framework.fields import CharField
from rest_framework.fields import BooleanField, CharField
from rest_framework.permissions import IsAuthenticated
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.views import APIView
from structlog.stdlib import get_logger
from authentik.api.validation import validate
from authentik.core.api.users import UserSelfSerializer
@@ -14,10 +16,22 @@ from authentik.endpoints.connectors.agent.auth import AgentAuth
from authentik.endpoints.connectors.agent.models import (
AgentDeviceConnection,
AgentDeviceUserBinding,
AppleUnlockKey,
DeviceAuthenticationToken,
DeviceToken,
)
from authentik.enterprise.api import EnterpriseRequiredMixin
from authentik.events.models import Event, EventAction
from authentik.events.utils import model_to_dict
LOGGER = get_logger()
class AgentPSSODeviceStateUser(PassiveSerializer):
"""A user currently registered for Platform SSO on this device"""
username = CharField()
enclave_key_id = CharField()
class RegisterDeviceView(APIView):
@@ -41,12 +55,75 @@ class RegisterDeviceView(APIView):
nonce_endpoint = CharField()
authorization_endpoint = CharField()
class AgentPSSODeviceState(PassiveSerializer):
"""What authentik currently has stored for this device's Platform SSO
registration, so the client can detect drift and repair it"""
device_registered = BooleanField()
sign_key_id = CharField(allow_blank=True)
enc_key_id = CharField(allow_blank=True)
users = AgentPSSODeviceStateUser(many=True)
permission_classes = [IsAuthenticated]
pagination_class = None
filter_backends = []
serializer_class = AgentPSSODeviceRegistration
authentication_classes = [AgentAuth]
@extend_schema(
responses={
200: AgentPSSODeviceState(),
}
)
def get(self, request: Request) -> Response:
device_token: DeviceToken = request.auth
conn: AgentDeviceConnection = device_token.device
users = AgentDeviceUserBinding.objects.filter(
target=conn.device, connector=conn.connector
).select_related("user")
return Response(
data={
"device_registered": bool(conn.apple_signing_key),
"sign_key_id": conn.apple_sign_key_id,
"enc_key_id": conn.apple_enc_key_id,
"users": [
{
"username": binding.user.username,
"enclave_key_id": binding.apple_enclave_key_id,
}
for binding in users
],
}
)
@extend_schema(responses={204: None})
@transaction.atomic()
def delete(self, request: Request) -> Response:
"""Clear this device's Platform SSO registration, used when the configuration
profile is removed from the device. The device stays enrolled otherwise."""
device_token: DeviceToken = request.auth
conn: AgentDeviceConnection = device_token.device
conn.apple_signing_key = ""
conn.apple_encryption_key = ""
conn.apple_key_exchange_key = ""
conn.apple_sign_key_id = ""
conn.apple_enc_key_id = ""
conn.save()
bindings = AgentDeviceUserBinding.objects.filter(
target=conn.device, connector=conn.connector
)
# Unlock keys hang off the bindings and are useless without the enclave key
AppleUnlockKey.objects.filter(device_user__in=bindings).delete()
bindings.update(apple_secure_enclave_key="", apple_enclave_key_id="")
DeviceAuthenticationToken.objects.filter(device=conn.device).delete()
LOGGER.info("Cleared Platform SSO registration", device=conn.device.name)
Event.new(
EventAction.MODEL_UPDATED,
model=model_to_dict(conn),
message="Platform SSO registration removed",
).from_http(request)
return Response(status=204)
@extend_schema(
responses={
200: AgentPSSODeviceRegistrationResponse(),
@@ -2,7 +2,6 @@ from json import dumps, loads
from django.http import HttpRequest, HttpResponseRedirect
from django.urls import reverse
from googleapiclient.discovery import build
from authentik.endpoints.controller import BaseController, Capabilities
from authentik.endpoints.facts import DeviceFacts, OSFamily
@@ -28,6 +27,8 @@ class GoogleChromeController(BaseController[GoogleChromeConnector]):
def __init__(self, connector):
super().__init__(connector)
from googleapiclient.discovery import build
self.google_client = build(
"verifiedaccess",
"v2",
@@ -5,8 +5,6 @@ from typing import TYPE_CHECKING
from django.db import models
from django.templatetags.static import static
from django.utils.translation import gettext_lazy as _
from google.auth.exceptions import GoogleAuthError
from google.oauth2.service_account import Credentials
from rest_framework.serializers import BaseSerializer
from authentik.endpoints.controller import ConnectorSyncException
@@ -25,6 +23,9 @@ class GoogleChromeConnector(Connector):
credentials = models.JSONField()
def google_credentials(self):
from google.auth.exceptions import GoogleAuthError
from google.oauth2.service_account import Credentials
try:
return {
"credentials": Credentials.from_service_account_info(
@@ -36,7 +37,7 @@ class GoogleChromeConnector(Connector):
@property
def icon_url(self):
return static("authentik/sources/google.svg")
return static("authentik/sources/google/light.svg")
@property
def serializer(self) -> type[BaseSerializer]:
+3
View File
@@ -35,6 +35,7 @@ from authentik.enterprise.models import (
LicenseUsage,
LicenseUsageStatus,
)
from authentik.root.cache import in_memory_cache
from authentik.root.install_id import get_install_id
CACHE_KEY_ENTERPRISE_LICENSE = "goauthentik.io/enterprise/license"
@@ -240,6 +241,8 @@ class LicenseKey:
return summary
@staticmethod
# Checked on every request and audited model save, so don't go to the cache each time
@in_memory_cache(key=lambda: None, timeout=30)
def cached_summary() -> LicenseSummary:
"""Helper method which looks up the last summary"""
summary = cache.get(CACHE_KEY_ENTERPRISE_LICENSE)
@@ -4,7 +4,7 @@ from django.db import models, transaction
from django.db.models import Q
from django.http import HttpRequest
from django.utils import timezone
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _
from rest_framework.serializers import BaseSerializer
from authentik.lib.models import SerializerModel
@@ -412,7 +412,10 @@ class TestOffboardingAPI(APITestCase):
},
)
self.assertEqual(response.status_code, 400)
self.assertIn("user", response.data)
self.assertJSONEqual(
response.content,
{"non_field_errors": ["The fields user must make a unique set."]},
)
def test_duplicate_pending_race_returns_400(self):
"""If two requests race past validation, the DB constraint yields a 400, not a 500."""
@@ -433,8 +436,10 @@ class TestOffboardingAPI(APITestCase):
},
)
self.assertEqual(response.status_code, 400)
self.assertIn("user", response.data)
# The losing insert did not create a second pending row.
self.assertJSONEqual(
response.content,
{"non_field_errors": ["The fields user must make a unique set."]},
) # The losing insert did not create a second pending row.
self.assertEqual(
UserOffboarding.objects.filter(
user=self.user, status=OffboardingStatus.PENDING
@@ -30,4 +30,4 @@ class ReviewViewSet(EnterpriseRequiredMixin, CreateModelMixin, GenericViewSet):
def perform_create(self, serializer: ReviewSerializer) -> None:
review = serializer.save(reviewer=self.request.user)
review.iteration.on_review(self.request)
review.iteration.on_review(review, self.request)
@@ -9,7 +9,7 @@ from django.db.models.fields import Field
from django.db.models.functions import Cast
from django.http import HttpRequest
from django.utils import timezone
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _
from rest_framework.serializers import BaseSerializer
from authentik.blueprints.models import ManagedModel
@@ -270,7 +270,7 @@ class LifecycleIteration(SerializerModel, ManagedModel):
return {
"target": self.object,
"hyperlink": link_for_model(self.object),
"hyperlink_label": _(f"Go to {self._get_model_name()}"),
"hyperlink_label": _("Go to {model_name}").format(model_name=self._get_model_name()),
"lifecycle_iteration": self.id,
}
@@ -283,7 +283,9 @@ class LifecycleIteration(SerializerModel, ManagedModel):
object_label = str(self.object)
event = Event.new(
EventAction.REVIEW_INITIATED,
message=_(f"Access review is due for {self.content_type.name.lower()} {object_label}"),
message=_("Access review is due for {model_name} {object_label}").format(
model_name=self.content_type.name.lower(), object_label=object_label
),
**self._get_event_args(),
)
event.save()
@@ -294,7 +296,9 @@ class LifecycleIteration(SerializerModel, ManagedModel):
event = Event.new(
EventAction.REVIEW_OVERDUE,
message=_(f"Access review is overdue for {self.content_type.name} {str(self.object)}"),
message=_("Access review is overdue for {model_name} {object_label}").format(
model_name=self.content_type.name, object_label=str(self.object)
),
**self._get_event_args(),
)
event.save()
@@ -313,16 +317,26 @@ class LifecycleIteration(SerializerModel, ManagedModel):
self.state = ReviewState.REVIEWED
event = Event.new(
EventAction.REVIEW_COMPLETED,
message=_(f"Access review completed for {self.content_type.name} {str(self.object)}"),
message=_("Access review completed for {model_name} {object_label}").format(
model_name=self.content_type.name, object_label=str(self.object)
),
**self._get_event_args(),
).from_http(request)
event.save()
self.rule.notify_reviewers(event, NotificationSeverity.NOTICE)
self.save()
def on_review(self, request: HttpRequest):
def on_review(self, review: Review, request: HttpRequest):
if self.state not in (ReviewState.PENDING, ReviewState.OVERDUE):
raise AssertionError("Review is not pending or overdue")
Event.new(
EventAction.REVIEW_ATTESTED,
message=_("Access review attested for {model_name} {object_label}").format(
model_name=self.content_type.name, object_label=str(self.object)
),
note=review.note,
**self._get_event_args(),
).from_http(request, review.reviewer)
if self.rule.is_satisfied_for_iteration(self):
self.make_reviewed(request)
@@ -11,6 +11,7 @@ from authentik.enterprise.lifecycle.review.models import (
ReviewState,
)
from authentik.enterprise.tests import enterprise_test
from authentik.events.models import Event, EventAction
from authentik.lib.generators import generate_id
@@ -325,6 +326,13 @@ class TestReviewAPI(APITestCase):
self.assertEqual(response.data["iteration"], iteration.pk)
self.assertEqual(response.data["note"], "Reviewed and approved")
self.assertEqual(response.data["reviewer"]["pk"], self.user.pk)
event = Event.objects.get(
action=EventAction.REVIEW_ATTESTED,
context__lifecycle_iteration=iteration.pk.hex,
)
self.assertEqual(event.user["pk"], self.user.pk)
self.assertEqual(event.context["note"], "Reviewed and approved")
self.assertEqual(event.context["target"]["pk"], self.app.pk.hex)
def test_create_review_completes_iteration(self):
rule = LifecycleRule.objects.create(
@@ -102,16 +102,25 @@ class TestLifecycleModels(TestCase):
)
request = self._get_request()
Review.objects.create(iteration=iteration, reviewer=reviewer_one)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=reviewer_one)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.PENDING)
Review.objects.create(iteration=iteration, reviewer=reviewer_two)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=reviewer_two)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
self.assertTrue(Event.objects.filter(action=EventAction.REVIEW_COMPLETED).exists())
self.assertEqual(
set(
Event.objects.filter(
action=EventAction.REVIEW_ATTESTED,
context__lifecycle_iteration=iteration.pk.hex,
).values_list("user__pk", flat=True)
),
{reviewer_one.pk, reviewer_two.pk},
)
def test_review_min_reviewers_from_groups(self):
"""Group-based reviews complete once the minimum number of reviewers review."""
@@ -131,13 +140,13 @@ class TestLifecycleModels(TestCase):
)
request = self._get_request()
Review.objects.create(iteration=iteration, reviewer=reviewer_one)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=reviewer_one)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.PENDING)
Review.objects.create(iteration=iteration, reviewer=reviewer_two)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=reviewer_two)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
@@ -162,14 +171,14 @@ class TestLifecycleModels(TestCase):
request = self._get_request()
# Only group member reviews - not satisfied (explicit reviewer missing)
Review.objects.create(iteration=iteration, reviewer=group_member)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=group_member)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.PENDING)
# Explicit reviewer reviews - now satisfied
Review.objects.create(iteration=iteration, reviewer=explicit_reviewer)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=explicit_reviewer)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
@@ -193,14 +202,14 @@ class TestLifecycleModels(TestCase):
request = self._get_request()
# Only member from group_one reviews - not satisfied (need member from each group)
Review.objects.create(iteration=iteration, reviewer=member_group_one)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=member_group_one)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.PENDING)
# Member from group_two reviews - now satisfied
Review.objects.create(iteration=iteration, reviewer=member_group_two)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=member_group_two)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
@@ -227,8 +236,8 @@ class TestLifecycleModels(TestCase):
# Child group member should be able to review
self.assertTrue(iteration.user_can_review(child_member))
Review.objects.create(iteration=iteration, reviewer=child_member)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=child_member)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
@@ -260,13 +269,13 @@ class TestLifecycleModels(TestCase):
self.assertTrue(iteration.user_can_review(parent_member))
self.assertTrue(iteration.user_can_review(child_member))
Review.objects.create(iteration=iteration, reviewer=parent_member)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=parent_member)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.PENDING)
Review.objects.create(iteration=iteration, reviewer=child_member)
iteration.on_review(request)
review = Review.objects.create(iteration=iteration, reviewer=child_member)
iteration.on_review(review, request)
iteration.refresh_from_db()
self.assertEqual(iteration.state, ReviewState.REVIEWED)
@@ -694,8 +703,8 @@ class TestLifecycleModels(TestCase):
request = self._get_request()
# Review only rule_one's iteration
Review.objects.create(iteration=iter_one, reviewer=reviewer)
iter_one.on_review(request)
review = Review.objects.create(iteration=iter_one, reviewer=reviewer)
iter_one.on_review(review, request)
iter_one.refresh_from_db()
iter_two.refresh_from_db()
Loaded 100 of 1508 files, more files were not shown because too many files have changed in this diff. Show more