-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitOps Support Docs #127
Comments
an example for an LDAP Provider, app and outpost: entries:
- model: authentik_blueprints.metaapplyblueprint
attrs:
identifiers:
name: Default - Authentication flow
required: true
- attrs:
authorization_flow: !Find [authentik_flows.flow, [slug, default-authentication-flow]]
base_dn: DC=ldap,DC=goauthentik,DC=io
bind_mode: cached
gid_start_number: 4000
search_group: !Find [authentik_core.group, [name, "authentik Admins"]]
search_mode: cached
uid_start_number: 2000
id: provider
identifiers:
name: test
model: authentik_providers_ldap.ldapprovider
- attrs:
name: ldap
policy_engine_mode: any
provider: !KeyOf provider
id: app
identifiers:
slug: ldap
model: authentik_core.application
- attrs:
config:
authentik_host: http://localhost:9000/
providers:
- !KeyOf provider
type: ldap
id: outpost
identifiers:
name: ldap
model: authentik_outposts.outpost
metadata:
labels:
blueprints.goauthentik.io/generated: 'true'
name: authentik Export - 2022-08-31 21:14:20.484928+00:00
version: 1 There aren't examples for every object, but in general the JSON schema should help (https://goauthentik.io/blueprints/schema.json) the fields under you can also use |
Actually that is quite helpful thanks for that. Also thanks for getting back to me so quickly. It took me a second to break it down from the schema, but after I converted it into more comfortable (for me atleast) YAML, I could see a good number of the One liner for anyone else who likes YAML: curl https://goauthentik.io/blueprints/schema.json | yq --yaml-output I also see what you mean by there are examples for every object. At first I thought you meant blueprint entry examples but you actually mean properties of the schema aren't fully populated in the schema.json (correct me if I am wrong). E.G shema.json does not list sub-properties of Is there a way I can go any deeper and find even more of these properties somewhere? Maybe in the specific models? As I want to get a more complete picture so that I can generate these blueprints without the use of the GUI since really I want to generate this decoratively in helm / operator (I am building an authentik operator). I can always reverse engineer from clicked together bits and export_blueprint as you mentioned. So like |
You can use these settings in vscode to load the schema for yaml files: "yaml.schemas": {
"https://goauthentik.io/blueprints/schema.json": "blueprints/**/*.yaml"
}, Yes, the schema doesn't list all properties of all possible objects, as much as I want to do that it's not that easy. All the field names in I'm actually also thinking about building a (very simple) kubernetes operator into authentik, with a single Blueprint CRD that is automatically recreated/reconcilled in authentik |
Yeah funnily enough that is exactly what I am doing among other CRDs. I am currently making AkBlueprint, AkOutpost, AkProvider, and AkApplication CRDs and the managing operator. I feel it would be extremely convenient to be able to configure authentik in a kube native manner and have it dynamically load configuration in this way which is why I started adding it. In particular my end goal is that you can configure an application in a given namespace and have the controller automatically configure its ingress resource with forward auth and or any providers it needs for integration. Thanks for the help, I appreciate it. I think I have most of what I need now anyway. If I have any specific issues with blueprints I may drop them in here if that is amiable. |
@DreamingRaven thanks for your input on Gitops and Authentik CRDs, i am highly interested in a Authentik Operator. For blueprints i just tried a sidecar approach which collects configmaps (#146) and supplies those as blueprints to authentik. However your Operator looks more promising from a GitOps perspective, thank you for your work on this! |
@benedikt-bartscher No problem, its nowhere near complete, but the basic infrastructure is there (SDK, basic controller, CICD builds, deployment etc), along with the basic authentik management (deploy, destroy, and apply some but not all CRDs). I would not recommend that you use it quite yet (even if a good chunk of the functionality is there) but I should be returning to the operator (https://gitlab.com/GeorgeRaven/authentik-manager) shortly once a few of my other deadlines are met as I have a very strong need for this myself for personal, commercial, and educational reasons. If you have anything you want in particular from the operator I would drop an issue there. |
Here are a list of Operator that i find. But yes a official Operator with an stabil API whould be nice. so i believe as an first step #146 with declararive blueprints (goauthentik/authentik#5300) could be fast implemented and would solve the most problems |
I have been working on this the last few days, the blueprint functionality should be in place very soon! Currently:
I will drop a message here when its done. Once the last 3 tasks are complete it should be fully functional, after that it will be just keeping everything compatible in case the db structure changes / migrates, and adding new higher level CRDs to automate larger tasks. The ak CRD is already complete and manages the stack of authentik already although I want to add more automation to this going forward like rolling updates etc. But yeah I get you, an official operator would have been nicer but its a lot to ask, they are such complex beasts and adds a lot more headaches for the authentik guys. The broad steps for mine will look like so, so hopefully that will be sufficient when it is ready:
Having to play around a bit to reverse what exactly is expected in a few different fields though: |
Hey Authentik team.
I just wanted to say thank you for all your hard work, I am loving Authentik, and I am keen to see it grow!
In my particular case I want to declaritively define an outpost, application, and provider. The former has a documented example for manual creation in kubernetes. However the latter two do not nor do they have any blueprint examples or breakdowns (if this is possible).
I believe blueprints are the key to this in Authentik and allowing for GitOps for persistent and consistent spin up and spin down of clusters in testing and production. If possible I would also like to create a GitOps documentation page for Kubernetes specifically as it is preferable in k8s (in my opinion) to spin up with all the desired flows configuration theming etc out of the gate without any clicks. Environment variables (they work well) and sealed-secrets (of my own addition) seem to cover half this GitOps use case and I believe blueprints is the final hurdle for me.
The text was updated successfully, but these errors were encountered: