Comments (3)
I see. In that case, I would recommend using blueprints which allow you to manage authentik objects as code directly within authentik.
The included blueprints are available at https://github.com/goauthentik/authentik/tree/main/blueprints and are copied as-is in the container at /blueprints.
For your usecase, you'll need to override https://github.com/goauthentik/authentik/blob/main/blueprints/default/flow-default-authentication-flow.yaml and add a sources attribute to the id: default-authentication-identification
item. You'll also need to create the source in another blueprint.
If your other blueprint is called Source - Social
and you have a source called social
, you can do the following:
# yaml-language-server: $schema=https://goauthentik.io/blueprints/schema.json
---
version: 1
metadata:
name: Default - Authentication flow
entries:
# Ensures your source is created before this blueprint is applied
- model: authentik_blueprints.metaapplyblueprint
attrs:
identifiers:
name: Source - Social
required: true
- id: default-authentication-identification
model: authentik_stages_identification.identificationstage
identifiers:
name: default-authentication-identification
attrs:
sources:
- !Find [authentik_core.source, [slug, "authentik-built-in"]]
- !Find [authentik_core.source, [slug, "social"]]
show_source_labels: true
# other attributes omitted for brevity
# other resources that are present in the included blueprint omitted for brevity
We currently don't publish the blueprints we use internally but we plan on creating more resources for users to know what they are, how they work, how to use them and examples based on the documentation provided in https://goauthentik.io/integrations/. Meanwhile, I can direct you to my personal blueprints which should help you as a starting point.
In any case, we won't be modifying the Terraform provider to add that functionality as attaching a source to the identification stage involves modifying the stage itself, which shouldn't be an additional resource. If you still want to go the Terraform route, I recommend you create a new flow instead of the included default one and use that one.
from terraform-provider-authentik.
You can have an authentik_stage_identification
resource, terraform import
it and then make the changes you require to it:
resource "authentik_stage_identification" "default-authentication-identification" {
name = "default-authentication-identification"
user_fields = ["username", "email"]
sources = [authentik_source_oauth.name.uuid] # this needs to exists above somehow
}
And then terraform import authentik_stage_identification.default-authentication-identification <the UUID of the stage (which you can find using the API)>
.
And finally terraform apply
to make the modifications you need
from terraform-provider-authentik.
Hi @rissson,
Sorry for the somewhat delayed reply, but I did some more trial an error. I would like to manage my whole Authentik deployment & configuration through one single Terraform apply command.
I am deploying my whole cluster, including authentik and all other application via a single command. Using an extra step in this proces to manually import a single resource in order to add an extra IDP to the login screen feels like an oversight.
from terraform-provider-authentik.
Related Issues (20)
- Sharing Outpost HOT 4
- Setting password for a user
- Include `sub_text` in `authentik_stage_prompt_field` HOT 2
- Include missing keys in `authentik_stage_authenticator_webauthn`
- Include missing properties in `authentik_stage_authenticator_validate` and `authentik_stage_user_login`
- Interface conversion error in `authentik_stage_authenticator_validate` when using `configuration_stages` HOT 1
- authentik_stage_identification sources not idempotent HOT 1
- modifying authentik_stage_authenticator_validate crashes terraform plugin HOT 1
- Create flow from blueprint HOT 1
- How to customize? HOT 2
- meta_icon in authentik_application keeps changing HOT 1
- Argument `token_length` in resource `authentik_stage_authenticator_static` has no effect HOT 1
- Missing properties in authentik_provider_scim
- Add resource and data source for OAuth Scope Mapping HOT 1
- authentik_policy_binding cannot bind expression policy to a stage HOT 1
- Inconsistent property_mappings behavior in authentik_provider_proxy
- `authentik_service_connection_kubernetes` resource is missing the verify local certificate option
- False negatives when refreshing state of resources HOT 1
- authentik_flow ignores changes to background HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-authentik.