blueprints: docs (#3376)
* further blueprint cleanup Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * more Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * make group users and parent optional Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix api client usage Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
9
website/developer-docs/blueprints/index.md
Normal file
9
website/developer-docs/blueprints/index.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
title: Blueprints
|
||||
---
|
||||
|
||||
:::info
|
||||
Requires authentik 2022.8
|
||||
:::
|
||||
|
||||
Blueprints offer a new way to template, automate and distribute authentik configuration. Blueprints can be used to automatically configure instances, manage config as code without any external tools, and to distribute application configs.
|
||||
61
website/developer-docs/blueprints/v1/structure.md
Normal file
61
website/developer-docs/blueprints/v1/structure.md
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
title: 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.
|
||||
|
||||
## Structure
|
||||
|
||||
```yaml
|
||||
# The version of this blueprint, currently 1
|
||||
version: 1
|
||||
# Optional block of metadata, name is required if metadata is set
|
||||
metadata:
|
||||
# Arbitrary key=value store, special labels are listed below
|
||||
labels:
|
||||
foo: bar
|
||||
name: example-blueprint
|
||||
# List of entries (required)
|
||||
entries:
|
||||
- # Model in app.model notation, possibilities are listed in the schema (required)
|
||||
model: authentik_flows.flow
|
||||
# Key:value filters to uniquely identify this object (required)
|
||||
identifiers:
|
||||
slug: initial-setup
|
||||
# Optional ID for use with !KeyOf
|
||||
id: flow
|
||||
# Attributes to set on the object. Only explicitly required settings should be stated
|
||||
# as these values will override existing attributes
|
||||
attrs:
|
||||
denied_action: message_continue
|
||||
designation: stage_configuration
|
||||
name: default-oobe-setup
|
||||
title: Welcome to authentik!
|
||||
```
|
||||
|
||||
## Special Labels
|
||||
|
||||
#### `blueprints.goauthentik.io/system`:
|
||||
|
||||
Used by authentik's packaged blueprints to keep globals up-to-date. Should only be removed in special cases.
|
||||
|
||||
#### `blueprints.goauthentik.io/example`:
|
||||
|
||||
Blueprints with this label are not automatically imported. They are still available when creating a new instance.
|
||||
Reference in New Issue
Block a user