[task-230] [add] authelia-for-tandoor

This commit is contained in:
roydfalk 2025-01-08 22:00:01 +01:00
parent f426927df1
commit 52c675f6e3
4 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{
"var_authelia_for_tandoor_tandoor_url_base": "https://tandoor.example.org",
"var_authelia_for_tandoor_client_id": "tandoor",
"var_authelia_for_tandoor_client_secret": "REPLACE_ME"
}

View file

@ -0,0 +1,9 @@
## Beschreibung
Um [Tandoor](../tandoor) gegen [Authelia](../authelia) authentifizieren zu lassen
## Verweise
- [allauth | OpenID Connect](https://docs.allauth.org/en/latest/socialaccount/providers/openid_connect.html)
- [Tandoor-Dokumentation | Configuration Example for Authelia](https://docs.tandoor.dev/features/authentication/#configuration-example-for-authelia)

View file

@ -0,0 +1,33 @@
[
{
"name": "configuration | compute client secret hash",
"become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_tandoor_client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_tandoor_client_secret_hashed"
},
{
"name": "configuration | emplace",
"become": true,
"ansible.builtin.template": {
"src": "authelia-client-conf.json.j2",
"dest": "/etc/authelia/conf.d/clients/tandoor.json"
}
},
{
"name": "configuration | apply",
"become": true,
"ansible.builtin.command": {
"cmd": "/usr/bin/authelia-conf-compose"
}
},
{
"name": "restart service",
"become": true,
"ansible.builtin.systemd_service": {
"state": "restarted",
"name": "authelia"
}
}
]

View file

@ -0,0 +1,17 @@
{
"client_id": "{{var_authelia_for_tandoor_client_id}}",
"client_secret": "{{temp_authelia_for_tandoor_client_secret_hashed.stdout}}",
"client_name": "Tandoor",
"public": false,
"authorization_policy": "one_factor",
"redirect_uris": [
"{{var_authelia_for_tandoor_tandoor_url_base}}/accounts/oidc/authelia/login/callback/"
],
"scopes": [
"openid",
"email",
"profile"
],
"userinfo_signed_response_alg": "none",
"token_endpoint_auth_method": "client_secret_basic"
}