[mod] role:authelia

This commit is contained in:
Christian Fraß 2023-12-11 02:43:58 +01:00
parent 99f4bb1d98
commit a947c4900e
5 changed files with 93 additions and 17 deletions

View file

@ -1,18 +1,20 @@
{ {
"var_authelia_listen_address": "0.0.0.0", "var_authelia_listen_address": "0.0.0.0",
"var_authelia_jwt_secret": "authelia_jwt_secret", "var_authelia_jwt_secret": "authelia_jwt_secret",
"var_authelia_users_file_path": "/var/authelia/users.json", "var_authelia_users_file_path": "/var/authelia/users.yml",
"var_authelia_log_file_path": "/var/log/authelia.log",
"var_authelia_session_domain": "example.org", "var_authelia_session_domain": "example.org",
"var_authelia_session_secret": "session_secret", "var_authelia_session_secret": "session_secret",
"var_authelia_storage_path": "/var/authelia/state.db", "var_authelia_storage_path": "/var/authelia/state.db",
"var_authelia_storage_encryption_key": "storage_encryption_key", "var_authelia_storage_encryption_key": "storage_encryption_key",
"var_authelia_ntp_server": "time.cloudflare.com:123", "var_authelia_ntp_server": "time.cloudflare.com:123",
"var_authelia_notification_mode": "email", "var_authelia_notification_mode": "smtp",
"var_authelia_notification_file_path": "/var/authelia/notifications",
"var_authelia_notification_smtp_host": "smtp.example.org", "var_authelia_notification_smtp_host": "smtp.example.org",
"var_authelia_notification_smtp_port": "465", "var_authelia_notification_smtp_port": "465",
"var_authelia_notification_smtp_username": "authelia", "var_authelia_notification_smtp_username": "authelia",
"var_authelia_notification_smtp_username": "smtp_password", "var_authelia_notification_smtp_username": "smtp_password",
"var_authelia_notification_smtp_sender": "Authelia", "var_authelia_notification_smtp_sender": "Authelia",
"var_authelia_notification_smtp_sender": "Authelia", "var_authelia_notification_smtp_sender": "Authelia",
"var_authelia_oidc_hmac_secret": "oidc_hmac_secret", "var_authelia_oidc_hmac_secret": "oidc_hmac_secret"
} }

View file

@ -4,3 +4,10 @@
- [GitHub-Seite](https://github.com/authelia/authelia) - [GitHub-Seite](https://github.com/authelia/authelia)
- [Installations-Anleitung](https://www.authelia.com/integration/deployment/bare-metal/) - [Installations-Anleitung](https://www.authelia.com/integration/deployment/bare-metal/)
- [Dokumentation | Konfiguration](https://www.authelia.com/configuration/) - [Dokumentation | Konfiguration](https://www.authelia.com/configuration/)
## ToDo
- Dummy-Client los werden
- Dummy-Nutzer los werden

View file

@ -1,36 +1,86 @@
[ [
{ {
"name": "invoke package repository", "when": false,
"name": "prepare package installation 1",
"become": true,
"ansible.builtin.apt": {
"pkg": [
"apt-transport-https",
"gpg"
]
}
},
{
"when": false,
"name": "prepare package installation 2",
"become": true,
"ansible.builtin.apt_key": {
"url": "https://apt.authelia.com/organization/signing.asc"
}
},
{
"when": false,
"name": "prepare package installation 3",
"become": true, "become": true,
"ansible.builtin.apt_repository": { "ansible.builtin.apt_repository": {
"repo": "deb https://apt.authelia.com/stable/debian/debian/ all main" "repo": "deb https://apt.authelia.com/stable/debian/debian/ all main"
} }
}, },
{ {
"when": false,
"name": "install packages", "name": "install packages",
"become": true, "become": true,
"ansible.builtin.apt": { "ansible.builtin.apt": {
"pgk": [ "update_cache": true,
"pkg": [
"openssl",
"python3-cryptography",
"authelia" "authelia"
] ]
} }
}, },
{ {
"name": "generate private key for signing OIDC JWTs", "name": "generate private key for signing OIDC JWTs",
"beccome": true, "become": true,
"community.crypto.openssl_privatekey": { "community.crypto.openssl_privatekey": {
"type": "RSA", "type": "RSA",
"size": 4096, "size": 4096,
"path": "/dev/null", "path": "/etc/ssl/private/authelia-key.pem",
"return_content": true "return_content": true
} },
"register": "temp_tls_result"
}, },
{ {
"name": "emplace configuration", "name": "emplace configuration",
"become": true, "become": true,
"ansible.builtin.template": { "ansible.builtin.template": {
"src": "config.yml.j2", "src": "configuration.yml.j2",
"dest": "/etc/authelia/config.yml" "dest": "/etc/authelia/configuration.yml"
}
},
{
"name": "setup log directory",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{var_authelia_log_file_path | dirname}}"
}
},
{
"name": "setup users directory",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{var_authelia_users_file_path | dirname}}"
}
},
{
"name": "place dummy user file",
"become": true,
"ansible.builtin.template": {
"src": "users.yml.j2",
"path": "{{var_authelia_users_file_path}}"
} }
}, },
{ {
@ -39,6 +89,6 @@
"ansible.builtin.systemd_service": { "ansible.builtin.systemd_service": {
"state": "restarted", "state": "restarted",
"name": "authelia" "name": "authelia"
} }
} }
] ]

View file

@ -11,14 +11,14 @@ server:
log: log:
level: info level: info
format: json format: json
file_path: /var/log/authelia.log file_path: {{var_authelia_log_file_path}}
keep_stdout: false keep_stdout: false
telemetry: telemetry:
metrics: metrics:
enabled: false enabled: false
address: tcp://0.0.0.0:9959 address: tcp://0.0.0.0:9959
totp: totp:
disable: true disable: false
issuer: authelia.com issuer: authelia.com
algorithm: sha1 algorithm: sha1
digits: 6 digits: 6
@ -106,8 +106,11 @@ storage:
path: "{{var_authelia_storage_path}}" path: "{{var_authelia_storage_path}}"
notifier: notifier:
disable_startup_check: true disable_startup_check: true
# filesystem: {% if var_authelia_notification_mode == "file" %}
# filename: /config/notification.txt filesystem:
filename: {{var_authelia_notification_file_path}}
{% endif %}
{% if var_authelia_notification_mode == "smtp" %}
smtp: smtp:
host: "{{var_authelia_notification_smtp_host}}" host: "{{var_authelia_notification_smtp_host}}"
port: {{var_authelia_notification_smtp_port}} port: {{var_authelia_notification_smtp_port}}
@ -118,13 +121,21 @@ notifier:
disable_html_emails: false disable_html_emails: false
tls: tls:
skip_verify: false skip_verify: false
{% endif %}
identity_providers: identity_providers:
oidc: oidc:
hmac_secret: "{{var_authelia_oidc_hmac_secret}}" hmac_secret: "{{var_authelia_oidc_hmac_secret}}"
issuer_private_key: | issuer_private_key: |
{{privatekey}} {% filter indent(width=6) %}
{{temp_tls_result.privatekey}}
{% endfilter %}
cors: cors:
allowed_origins_from_client_redirect_uris: true allowed_origins_from_client_redirect_uris: true
clients: [] clients:
-
public: false
id: "dummy"
secret: "d1424b378e4fbbc153f330f33b74ab192525b98cc2dd58b2e8d01c2737be00c6"
redirect_uris: []
... ...

View file

@ -0,0 +1,6 @@
users:
_dummy:
displayname: "(Dummy)"
password: "$argon2id$v=19$m=65536,t=3,p=4$sHIRjFaYRz2U3F8wHnqecQ$lwnQtHNeFqgLaLSW8It7KJSHNOJoSeF+RF7lwgM7WRA"
email: "dummy@nowhere.org"
groups: []