goauthentik / goauthentik/authentik

Best practices for customizing blueprints

Open
#8,548 1 comment 3 reactions 1 assignee Claimed by @dewi-tik View on GitHub
needs_documentation question
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

**Describe your question/**
The Blueprints documentation is pretty clear about how to define models with a blueprint, but what are the best practices for how to organize the files? There are a bunch of upstream blueprints, some in `system/` and some in `default/`. How should users make changes to the default flows/sources?

- Modify the files in `default/` to suit our needs?
- Create a new blueprint that uses `metaapplyblueprint` to include the default ones and then overrides only the entries that are customized?
- Create a completely separate set of entries in new blueprints, and then ignore the default blueprints and all of their flows/etc.? (If so, how should the default tenant model be overridden to point to the new flows?)

It would be great if the documentation could provide an example of "here's how to make a few changes to the default configuration with blueprints". There's `example/flows-login-2fa.yaml`, but that appears to (re)define `default-authentication-flow` and friends. Wouldn't that cause a conflict if that blueprint is loaded alongside the `Default - Authentication Flow` blueprint?

In my particular case, the first customization I want to make is to add a Google OAuth source, which requires defining the new `authentik_sources_oauth.oauthsource` and adding that source to the `sources` attribute of the `default-authentication-identification` stage.

**Version and Deployment (please complete the following information):**
Authentik 2023.10.7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.