[add] role:authelia-for-hedgedoc

This commit is contained in:
Christian Fraß 2023-12-16 15:16:45 +01:00
parent 33186a15cc
commit adda3f6677
4 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{
"var_authelia_for_hedgedoc_hedgedoc_url_base": "https://hedgedoc.example.org",
"var_authelia_for_hedgedoc_client_id": "hedgedoc",
"var_authelia_for_hedgedoc_client_secret": "REPLACE_ME"
}

View file

@ -0,0 +1,10 @@
## Beschreibung
Um [Hedgedoc](../hedgedoc) gegen [Authelia](../authelia) authentifizieren zu lassen
## Verweise
- [Authelia-Dokumentation | Configuration: OpenID Connect: Client](https://www.authelia.com/configuration/identity-providers/open-id-connect/#clients)
- [Hedgedoc-Dokumentation | Authelia](https://docs.hedgedoc.org/guides/auth/authelia/)
- [Hedgedoc-Dokumentation | Conf: OAuth2 Login](https://docs.hedgedoc.org/configuration/#oauth2-login)

View file

@ -0,0 +1,25 @@
[
{
"name": "configuration | emplace",
"become": true,
"ansible.builtin.template": {
"src": "authelia-client-conf.json.j2",
"dest": "/etc/authelia/conf.d/clients/hedgedoc.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,28 @@
{
"id": "{{var_authelia_for_hedgedoc_client_id}}",
"description": "Hedgedoc",
"secret": "{{var_authelia_for_hedgedoc_client_secret}}",
"public": false,
"authorization_policy": "one_factor",
"scopes": [
"openid",
"email",
"profile"
],
"redirect_uris": [
"{{var_authelia_for_hedgedoc_hedgedoc_url_base}}/auth/oauth2/callback"
],
"grant_types": [
"refresh_token",
"authorization_code"
],
"response_types": [
"code"
],
"response_modes": [
"form_post",
"query",
"fragment"
],
"userinfo_signing_algorithm": "none"
}