Skip to content

blueprints: emit draft-07 definitions instead of $defs (cherry-pick #24981 to version-2026.8) - #24985

Merged
BeryJu merged 1 commit into
version-2026.8from
cherry-pick/24981-to-version-2026.8
Aug 11, 2026
Merged

blueprints: emit draft-07 definitions instead of $defs (cherry-pick #24981 to version-2026.8)#24985
BeryJu merged 1 commit into
version-2026.8from
cherry-pick/24981-to-version-2026.8

Conversation

@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

Cherry-pick of #24981 to version-2026.8 branch.

Original PR: #24981
Original Author: @abhisheksharma2411
Cherry-picked commit: da1d219

* blueprints: emit draft-07 `definitions` instead of `$defs`

The generated blueprint schema declares draft-07:

    "$schema": "http://json-schema.org/draft-07/schema"

but stored every model definition under `$defs` and referenced them as
`#/$defs/...`. `$defs` is 2020-12 vocabulary; draft-07 spells it `definitions`.

A validator honouring the declared dialect therefore cannot resolve any of
those references, so nothing consuming the published schema.json can validate
a blueprint at all — which is what #24248 reports.

Switching the declared dialect to 2020-12 instead is not a drop-in: the schema
also uses draft-07-style plain-fragment `$id` values (`#/properties/version`),
which 2020-12 does not permit — it uses `$anchor` for that. Renaming the
keyword keeps the schema internally consistent with what it already claims to
be, and is the smaller change.

Adds a regression test that validates the schema the way a consumer does:
serialized through `json_default`, exactly as `build_schema` writes it, since
the in-memory dict still holds gettext_lazy proxies. It asserts the schema
passes `Draft7Validator.check_schema` and that every `$ref` resolves to a real
definition.

Verified:
  manage.py test authentik.blueprints.tests.test_schema.TestSchema -> 5 passed
  reverting schema.py                                              -> 3 failed
  ruff check / ruff format                                         -> clean

Note: authentik.blueprints.tests.test_v1.TestBlueprintsV1.test_import_yaml_tags
fails identically with and without this change on current main.

closes #24248

* re-gen

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 1726b1c
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a7afded31a0aa0008da8080
😎 Deploy Preview https://deploy-preview-24985--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 1726b1c
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a7afded79a52d0008046c0f
😎 Deploy Preview https://deploy-preview-24985--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@BeryJu
BeryJu enabled auto-merge (squash) August 11, 2026 10:51
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.47%. Comparing base (1697d68) to head (1726b1c).
⚠️ Report is 1 commits behind head on version-2026.8.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff               @@
##           version-2026.8   #24985   +/-   ##
===============================================
  Coverage           91.46%   91.47%           
===============================================
  Files                1148     1149    +1     
  Lines               72268    72307   +39     
  Branches             3875     3875           
===============================================
+ Hits                66100    66140   +40     
+ Misses               6133     6132    -1     
  Partials               35       35           
Flag Coverage Δ
conformance 34.81% <0.00%> (-0.03%) ⬇️
e2e 39.49% <0.00%> (-0.03%) ⬇️
integration 31.36% <0.00%> (-0.02%) ⬇️
rust 38.89% <ø> (ø)
unit 93.12% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.14% <100.00%> (+<0.01%) ⬆️

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

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

@BeryJu
BeryJu merged commit f329717 into version-2026.8 Aug 11, 2026
133 checks passed
@BeryJu
BeryJu deleted the cherry-pick/24981-to-version-2026.8 branch August 11, 2026 11:18
@github-actions

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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

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

Instructions for Kubernetes

Add the following block to your values.yml file:

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants