website: add more blueprint docs, 2022.8 release notes

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-08-07 19:27:17 +02:00
parent 872c18dddc
commit 1c569c79f3
6 changed files with 128 additions and 30 deletions

View File

@ -1,32 +1,7 @@
---
title: File structure
---
# File structure
Blueprints are YAML files, which can use some additional tags to ease blueprint creation.
## Additional Tags
#### `!KeyOf`
Example: `policy: !KeyOf my-policy-id`
Resolves to the primary key of the model instance defined by id _my-policy-id_.
If no matching entry can be found, an error is raised and the blueprint is invalid.
#### `!Find`
Example: `configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]`
Looks up any model and resolves to the the matches' primary key.
First argument is the model to be queried, remaining arguments are expected to be pairs of key=value pairs to query for.
#### `!Context`
Example: `configure_flow: !Context foo`
Find values from the context. Can optionally be called with a default like `!Context [foo, default-value]`.
## Structure
```yaml
@ -65,6 +40,6 @@ entries:
Used by authentik's packaged blueprints to keep globals up-to-date. Should only be removed in special cases.
#### `blueprints.goauthentik.io/example`:
#### `blueprints.goauthentik.io/instantiate`:
Blueprints with this label are not automatically imported. They are still available when creating a new instance.
Configure if this blueprint should automatically be instantiated (defaults to `"true"`). When set to `"false"`, blueprints are listed and available to be instantiated via API/Browser.

View File

@ -0,0 +1,28 @@
# YAML Tags
#### `!KeyOf`
Example: `policy: !KeyOf my-policy-id`
Resolves to the primary key of the model instance defined by id _my-policy-id_.
If no matching entry can be found, an error is raised and the blueprint is invalid.
#### `!Find`
Example: `configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]`
Looks up any model and resolves to the the matches' primary key.
First argument is the model to be queried, remaining arguments are expected to be pairs of key=value pairs to query for.
#### `!Context`
Example: `configure_flow: !Context foo`
Find values from the context. Can optionally be called with a default like `!Context [foo, default-value]`.
#### `!Format`
Example: `name: !Format [my-policy-%s, !Context instance_name]`
Format a string using python's % formatting. First argument is the format string, any remaining arguments are used for formatting.