[add] role:authelia-for-gitea
This commit is contained in:
parent
3008acbee4
commit
e4dc72b02d
5
roles/authelia-for-gitea/defaults/main.json
Normal file
5
roles/authelia-for-gitea/defaults/main.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var_authelia_for_gitea_gitea_url_base": "https://gitea.example.org",
|
||||||
|
"var_authelia_for_gitea_client_id": "gitea",
|
||||||
|
"var_authelia_for_gitea_client_secret": "REPLACE_ME"
|
||||||
|
}
|
||||||
9
roles/authelia-for-gitea/info.md
Normal file
9
roles/authelia-for-gitea/info.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
## Beschreibung
|
||||||
|
|
||||||
|
Um [Gitea](../gitea) gegen [Authelia](../authelia) authentifizieren zu lassen
|
||||||
|
|
||||||
|
|
||||||
|
## Verweise
|
||||||
|
|
||||||
|
- [Gitea-Dokumentation | Configuration | OpenID](https://docs.gitea.com/administration/config-cheat-sheet#openid-openid)
|
||||||
|
- [Authelia-Dokumentation | Gitea Integration](https://www.authelia.com/integration/openid-connect/gitea/)
|
||||||
25
roles/authelia-for-gitea/tasks/main.json
Normal file
25
roles/authelia-for-gitea/tasks/main.json
Normal 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/gitea.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"client_id": "{{var_authelia_for_gitea_client_id}}",
|
||||||
|
"client_secret": "{{var_authelia_for_gitea_client_secret}}",
|
||||||
|
"client_name": "Gitea",
|
||||||
|
"public": false,
|
||||||
|
"authorization_policy": "one_factor",
|
||||||
|
"redirect_uris": [
|
||||||
|
"{{var_authelia_for_gitea_gitea_url_base}}/auth/openid/authelia"
|
||||||
|
],
|
||||||
|
"scopes": [
|
||||||
|
"openid",
|
||||||
|
"email",
|
||||||
|
"profile"
|
||||||
|
],
|
||||||
|
"userinfo_signed_response_alg": "none",
|
||||||
|
"token_endpoint_auth_method": "client_secret_basic"
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue