fix(authentik): always render outpost config so blueprints validate #14

Open
Simon wants to merge 1 commit from fix/outpost-config into main
Owner

Summary

  • config is mandatory on the authentik_outposts.outpost model, but both outpost templates rendered the block only behind {% if ... is defined %}. A proxy outpost declared without a config produced an invalid blueprint.
  • Symptom: the blueprint instance stays on status=error, the outpost is never created, and Wait for custom blueprints to be applied retries until it gives up. blueprints_discovery only runs 24 * * * *, so the retry window never covers a second attempt.
  • Exact validation error: Serializer errors {'config': [ErrorDetail(string='This field is required.', code='required')]}.
  • Both templates now render config unconditionally and default authentik_host to https://{{ authentik_domains[0] }}/; an explicitly supplied authentik_host still wins and is not duplicated.

Test plan

  • Jinja render check over four shapes (proxy with/without config, ldap with/without config): config block always present, authentik_host exactly once, supplied values preserved
  • Rendered blueprint applied against a live authentik 2026.2.2 via ak apply_blueprint: passes validation, logs "New outpost saved", outpost appears in the database
  • Full role run on a demo inventory reaches the end of the blueprint wait task
## Summary - `config` is mandatory on the `authentik_outposts.outpost` model, but both outpost templates rendered the block only behind `{% if ... is defined %}`. A proxy outpost declared without a config produced an invalid blueprint. - Symptom: the blueprint instance stays on `status=error`, the outpost is never created, and `Wait for custom blueprints to be applied` retries until it gives up. `blueprints_discovery` only runs `24 * * * *`, so the retry window never covers a second attempt. - Exact validation error: `Serializer errors {'config': [ErrorDetail(string='This field is required.', code='required')]}`. - Both templates now render `config` unconditionally and default `authentik_host` to `https://{{ authentik_domains[0] }}/`; an explicitly supplied `authentik_host` still wins and is not duplicated. ## Test plan - [x] Jinja render check over four shapes (proxy with/without config, ldap with/without config): config block always present, `authentik_host` exactly once, supplied values preserved - [x] Rendered blueprint applied against a live authentik 2026.2.2 via `ak apply_blueprint`: passes validation, logs "New outpost saved", outpost appears in the database - [ ] Full role run on a demo inventory reaches the end of the blueprint wait task
`config` is mandatory on the authentik_outposts.outpost model, but both
outpost templates rendered the block only when the caller supplied one. A
proxy outpost declared without config produced a blueprint that failed
validation with "config: This field is required", left the instance on
status=error and never created the outpost — which in turn hung the
"Wait for custom blueprints to be applied" task until it ran out of
retries. The block is now unconditional and defaults authentik_host to the
canonical FQDN from authentik_domains.

Signed-off-by: Simon Bärlocher <simon@whatwedo.ch>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/outpost-config:fix/outpost-config
git switch fix/outpost-config

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff fix/outpost-config
git switch fix/outpost-config
git rebase main
git switch main
git merge --ff-only fix/outpost-config
git switch fix/outpost-config
git rebase main
git switch main
git merge --no-ff fix/outpost-config
git switch main
git merge --squash fix/outpost-config
git switch main
git merge --ff-only fix/outpost-config
git switch main
git merge fix/outpost-config
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
souveredu/digitalboard.core!14
No description provided.