Skip to content

blueprints: Add support for generating flat and unique sequences in blueprint enumeration tags#20785

Open
astro-stan wants to merge 18 commits intogoauthentik:mainfrom
astro-stan:add-support-for-generating-flat-and-uniq-sequences-in-blueprints
Open

blueprints: Add support for generating flat and unique sequences in blueprint enumeration tags#20785
astro-stan wants to merge 18 commits intogoauthentik:mainfrom
astro-stan:add-support-for-generating-flat-and-uniq-sequences-in-blueprints

Conversation

@astro-stan
Copy link
Contributor

@astro-stan astro-stan commented Mar 8, 2026

Details

I would like to be able to generate flattened and possibly unique sequences during blueprint templating.

The specific use case I have is something like this:

...
context:
  authentication.backends: # Used for all password stages
    - authentik.core.auth.InbuiltBackend
entries:
 ...
  - model: authentik_stages_password.passwordstage
    identifiers:
      name:  ldap-password-stage
    attrs:
      backends:
       - !Enumerate
         - !Enumerate 
           # Use all configured backends as for the other password stages but ensure the token backend is included too
           - [!Context authentication.backends, authentik.core.auth.TokenBackend]
           - FLAT_SEQ
           - !Value 0
         - UNIQ_SEQ
         - !Value 0

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@astro-stan astro-stan requested a review from a team as a code owner March 8, 2026 17:50
@netlify
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 8563353
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69b0881a563cf30008273b43
😎 Deploy Preview https://deploy-preview-20785--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
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 8563353
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69b0881a7f82c50008e9b3d2
😎 Deploy Preview https://deploy-preview-20785--authentik-storybook.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
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 8563353
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69b0881a58128e000703e9c1
😎 Deploy Preview https://deploy-preview-20785--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.00%. Comparing base (949d1ea) to head (8563353).
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (949d1ea) and HEAD (8563353). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (949d1ea) HEAD (8563353)
unit 10 8
unit-migrate 10 8
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20785      +/-   ##
==========================================
- Coverage   93.45%   84.00%   -9.45%     
==========================================
  Files         993      993              
  Lines       55968    55969       +1     
==========================================
- Hits        52305    47019    -5286     
- Misses       3663     8950    +5287     
Flag Coverage Δ
conformance 37.54% <33.33%> (+<0.01%) ⬆️
e2e 43.06% <33.33%> (+<0.01%) ⬆️
integration 22.24% <33.33%> (-0.05%) ⬇️
unit 81.52% <33.33%> (-10.10%) ⬇️
unit-migrate 81.89% <100.00%> (-9.82%) ⬇️

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

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

@astro-stan astro-stan requested a review from a team as a code owner March 8, 2026 18:23
@astro-stan astro-stan marked this pull request as draft March 8, 2026 18:48
@astro-stan astro-stan marked this pull request as ready for review March 9, 2026 05:07
@astro-stan
Copy link
Contributor Author

astro-stan commented Mar 9, 2026

Remaining errors on CI seem unrelated as far as I can tell. I get the same errors when I apply the tags.yaml blueprint on main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant