Compare commits

...

31 commits

Author SHA1 Message Date
Christian Fraß c8d4e4756e [int] 2025-10-08 09:30:29 +02:00
Christian Fraß cdeedc7ac3 [int] 2025-10-07 18:27:51 +02:00
Christian Fraß b356e6c1af [int] 2025-10-07 17:26:16 +02:00
Christian Fraß cbfde41f55 [int] 2025-10-07 17:18:25 +02:00
Christian Fraß 7c6ad2cef6 [int] 2025-10-07 17:17:01 +02:00
Christian Fraß ccfcc4ab79 [int] 2025-10-07 17:09:03 +02:00
Christian Fraß 3ebae9194a [int] 2025-10-07 17:07:08 +02:00
Christian Fraß 29d3d26dfc [int] 2025-10-07 17:06:19 +02:00
Christian Fraß d5ae0ac074 [int] 2025-10-07 17:04:47 +02:00
Christian Fraß 01a3fa5fb7 [int] 2025-10-07 17:01:45 +02:00
Christian Fraß beb8bb2c51 [int] 2025-10-07 16:59:40 +02:00
Christian Fraß 639917512a [int] 2025-10-07 16:55:26 +02:00
Christian Fraß 2d7a0abd5d [int] 2025-10-07 16:54:04 +02:00
Christian Fraß d9c266aafb [int] 2025-10-07 16:51:48 +02:00
Christian Fraß 8eed714d88 [int] 2025-10-07 16:47:45 +02:00
Christian Fraß 8dac3eef4f [int] 2025-10-07 16:41:57 +02:00
Christian Fraß a2f22c3b70 [int] 2025-10-07 16:41:07 +02:00
Christian Fraß f3b8a3c4ec [int] 2025-10-07 16:30:10 +02:00
Christian Fraß 1c50d0223f [int] 2025-10-07 16:28:52 +02:00
Christian Fraß 2da64d257f [int] 2025-10-07 16:26:49 +02:00
Christian Fraß 0002ae76af [int] 2025-10-07 16:26:01 +02:00
Christian Fraß 326296d6ce [int] 2025-10-07 16:24:43 +02:00
Christian Fraß 52e14d8f8d [int] 2025-10-07 16:22:00 +02:00
Christian Fraß 71aea3040a [int] 2025-10-07 16:15:58 +02:00
Christian Fraß da1e27459f [int] 2025-10-07 16:12:13 +02:00
Christian Fraß c4db57b83a [int] 2025-10-07 16:07:09 +02:00
Christian Fraß 4a7a75651c [int] 2025-10-07 16:04:07 +02:00
Christian Fraß 4a439cf375 [int] 2025-10-07 15:58:18 +02:00
Christian Fraß 50aa1eabaa [res] 2025-10-07 14:38:35 +02:00
Christian Fraß 8953d1ee99 [mod] galaxy definition [mod] readme 2025-09-22 21:50:54 +02:00
Christian Fraß b31e9f1e57 [task-377] [int] 2025-09-17 23:43:22 +02:00
22 changed files with 964 additions and 612 deletions

View file

@ -1,89 +1,93 @@
[ [
{ {
"name": "configuration | client | web", "name": "show vars",
"when": "cfg_authelia_for_owncloud.web != None", "when": "switch_show_vars",
"block": [ "ansible.builtin.debug": {
{ "var": "vars.cfg_authelia_for_owncloud"
"name": "compute client secret hash", }
"become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.web.client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_owncloud_web_client_secret_hashed"
},
{
"name": "emplace",
"become": true,
"ansible.builtin.template": {
"src": "authelia-client-conf-web.json.j2",
"dest": "/etc/authelia/conf.d/clients/owncloud-web.json"
}
}
]
}, },
{ {
"name": "configuration | client | desktop", "name": "configuration | client",
"when": "cfg_authelia_for_ownloud.desktop != None",
"block": [ "block": [
{ {
"name": "compute client secret hash", "name": "configuration | client | web",
"become": true, "when": "cfg_authelia_for_owncloud.web != None",
"ansible.builtin.shell": { "block": [
"cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.desktop.client_secret}} | cut --delimiter=' ' --fields='2-'" {
}, "name": "emplace",
"register": "temp_authelia_for_owncloud_desktop_client_secret_hashed" "become": true,
"ansible.builtin.template": {
"src": "authelia-client-conf-web.json.j2",
"dest": "/etc/authelia/conf.d/clients/owncloud-web.json"
}
}
]
}, },
{ {
"name": "emplace", "name": "configuration | client | desktop",
"become": true, "when": "cfg_authelia_for_owncloud.desktop != None",
"ansible.builtin.template": { "block": [
"src": "authelia-client-conf-desktop.json.j2", {
"dest": "/etc/authelia/conf.d/clients/owncloud-desktop.json" "name": "compute client secret hash",
} "become": true,
} "ansible.builtin.shell": {
] "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.desktop.client_secret}} | cut --delimiter=' ' --fields='2-'"
}, },
{ "register": "temp_authelia_for_owncloud_desktop_client_secret_hashed"
"name": "configuration | client | android", },
"when": "cfg_authelia_for_ownloud.android != None", {
"block": [ "name": "emplace",
{ "become": true,
"name": "compute client secret hash", "ansible.builtin.template": {
"become": true, "src": "authelia-client-conf-desktop.json.j2",
"ansible.builtin.shell": { "dest": "/etc/authelia/conf.d/clients/owncloud-desktop.json"
"cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.android.client_secret}} | cut --delimiter=' ' --fields='2-'" }
}, }
"register": "temp_authelia_for_owncloud_android_client_secret_hashed" ]
}, },
{ {
"name": "emplace", "name": "configuration | client | android",
"become": true, "when": "cfg_authelia_for_owncloud.android != None",
"ansible.builtin.template": { "block": [
"src": "authelia-client-conf-android.json.j2", {
"dest": "/etc/authelia/conf.d/clients/owncloud-android.json" "name": "compute client secret hash",
} "become": true,
} "ansible.builtin.shell": {
] "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.android.client_secret}} | cut --delimiter=' ' --fields='2-'"
}, },
{ "register": "temp_authelia_for_owncloud_android_client_secret_hashed"
"name": "configuration | client | ios", },
"when": "cfg_authelia_for_ownloud.ios != None", {
"block": [ "name": "emplace",
{ "become": true,
"name": "compute client secret hash", "ansible.builtin.template": {
"become": true, "src": "authelia-client-conf-android.json.j2",
"ansible.builtin.shell": { "dest": "/etc/authelia/conf.d/clients/owncloud-android.json"
"cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.ios.client_secret}} | cut --delimiter=' ' --fields='2-'" }
}, }
"register": "temp_authelia_for_owncloud_ios_client_secret_hashed" ]
}, },
{ {
"name": "emplace", "name": "configuration | client | ios",
"become": true, "when": "cfg_authelia_for_owncloud.ios != None",
"ansible.builtin.template": { "block": [
"src": "authelia-client-conf-ios.json.j2", {
"dest": "/etc/authelia/conf.d/clients/owncloud-ios.json" "name": "compute client secret hash",
} "become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.ios.client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_owncloud_ios_client_secret_hashed"
},
{
"name": "emplace",
"become": true,
"ansible.builtin.template": {
"src": "authelia-client-conf-ios.json.j2",
"dest": "/etc/authelia/conf.d/clients/owncloud-ios.json"
}
}
]
} }
] ]
}, },

View file

@ -26,7 +26,7 @@
"grant_types": [ "grant_types": [
"authorization_code", "authorization_code",
"refresh_token" "refresh_token"
] ],
"access_token_signed_response_alg": "none", "access_token_signed_response_alg": "none",
"userinfo_signed_response_alg": "none", "userinfo_signed_response_alg": "none",
"token_endpoint_auth_method": "client_secret_basic" "token_endpoint_auth_method": "client_secret_basic"

View file

@ -26,7 +26,7 @@
"grant_types": [ "grant_types": [
"authorization_code", "authorization_code",
"refresh_token" "refresh_token"
] ],
"access_token_signed_response_alg": "none", "access_token_signed_response_alg": "none",
"userinfo_signed_response_alg": "none", "userinfo_signed_response_alg": "none",
"token_endpoint_auth_method": "client_secret_basic" "token_endpoint_auth_method": "client_secret_basic"

View file

@ -26,7 +26,7 @@
"grant_types": [ "grant_types": [
"authorization_code", "authorization_code",
"refresh_token" "refresh_token"
] ],
"access_token_signed_response_alg": "none", "access_token_signed_response_alg": "none",
"userinfo_signed_response_alg": "none", "userinfo_signed_response_alg": "none",
"token_endpoint_auth_method": "client_secret_basic" "token_endpoint_auth_method": "client_secret_basic"

View file

@ -2,7 +2,7 @@
"client_id": "{{cfg_authelia_for_owncloud.web.client_id}}", "client_id": "{{cfg_authelia_for_owncloud.web.client_id}}",
"client_name": "ownCloud | Web Client", "client_name": "ownCloud | Web Client",
"lifespan": "ocis", "lifespan": "long",
"public": true, "public": true,
"authorization_policy": "one_factor", "authorization_policy": "one_factor",
"require_pkce": true, "require_pkce": true,
@ -15,10 +15,10 @@
"email" "email"
], ],
"redirect_uris": [ "redirect_uris": [
"{{var_authelia_for_owncloud_owncloud_url_base}}", "https://{{cfg_authelia_for_owncloud.owncloud_url_base}}",
"{{var_authelia_for_owncloud_owncloud_url_base}}/oidc-callback.html", "https://{{cfg_authelia_for_owncloud.owncloud_url_base}}/oidc-callback.html",
"{{var_authelia_for_owncloud_owncloud_url_base}}/oidc-silent-redirect.html", "https://{{cfg_authelia_for_owncloud.owncloud_url_base}}/oidc-silent-redirect.html",
"{{var_authelia_for_owncloud_owncloud_url_base}}/apps/openidconnect/redirect" "https://{{cfg_authelia_for_owncloud.owncloud_url_base}}/apps/openidconnect/redirect"
], ],
"response_types": [ "response_types": [
"code" "code"
@ -26,7 +26,7 @@
"grant_types": [ "grant_types": [
"authorization_code", "authorization_code",
"refresh_token" "refresh_token"
] ],
"access_token_signed_response_alg": "none", "access_token_signed_response_alg": "none",
"userinfo_signed_response_alg": "none", "userinfo_signed_response_alg": "none",
"token_endpoint_auth_method": "none" "token_endpoint_auth_method": "none"

View file

@ -0,0 +1,398 @@
{
"nullable": false,
"type": "object",
"properties": {
"listen_address": {
"nullable": false,
"type": "string",
"default": "0.0.0.0"
},
"jwt_secret": {
"nullable": false,
"type": "string"
},
"users_file_path": {
"nullable": false,
"type": "string",
"default": "/var/authelia/users.yml"
},
"log_file_path": {
"nullable": false,
"type": "string",
"default": "/var/authelia/log.jsonl"
},
"domain": {
"nullable": false,
"type": "string",
"default": "authelia.example.org"
},
"redirect_url": {
"nullable": false,
"type": "string",
"default": "https://example.org"
},
"session_domain": {
"nullable": false,
"type": "string",
"default": "example.org"
},
"session_secret": {
"nullable": false,
"type": "string"
},
"storage_encryption_key": {
"nullable": false,
"type": "string"
},
"storage": {
"anyOf": [
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"nullable": false,
"type": "string",
"enum": ["sqlite"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
"path": {
"nullable": false,
"type": "string",
"default": "/var/authelia/state.db"
}
},
"additionalProperties": false,
"required": [
],
"default": {
}
}
},
"additionalProperties": false,
"required": [
"kind"
]
},
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"nullable": false,
"type": "string",
"enum": ["postgresql"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
"host": {
"nullable": false,
"type": "string",
"ddefault": "localhost"
},
"port": {
"nullable": false,
"type": "integer",
"default": 5432
},
"username": {
"nullable": false,
"type": "string",
"default": "authelia_user"
},
"password": {
"nullable": false,
"type": "string"
},
"schema": {
"nullable": false,
"type": "string",
"default": "authelia"
}
},
"additionalProperties": false,
"required": [
"password"
]
}
},
"additionalProperties": false,
"required": [
"kind",
"data"
]
},
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"nullable": false,
"type": "string",
"enum": ["mariadb"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
"host": {
"nullable": false,
"type": "string",
"ddefault": "localhost"
},
"port": {
"nullable": false,
"type": "integer",
"default": 3306
},
"username": {
"nullable": false,
"type": "string",
"default": "authelia_user"
},
"password": {
"nullable": false,
"type": "string"
},
"schema": {
"nullable": false,
"type": "string",
"default": "authelia"
}
},
"additionalProperties": false,
"required": [
"password"
]
}
},
"additionalProperties": false,
"required": [
"kind",
"data"
]
}
]
},
"ntp_server": {
"nullable": false,
"type": "string",
"mandatory": false
},
"password_reset": {
"nullable": false,
"type": "object",
"properties": {
"enabled": {
"nullable": false,
"type": "boolean",
"default": false
},
"custom_url": {
"nullable": true,
"type": "string",
"default": null
}
},
"additionalProperties": false,
"required": [
],
"default": {
}
},
"notification": {
"anyOf": [
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"nullable": false,
"type": "string",
"enum": ["file"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
},
"additionalProperties": false,
"required": [
],
"default": {
}
}
},
"additionalProperties": false,
"required": [
"kind"
]
},
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"nullable": false,
"type": "string",
"enum": ["smtp"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
"host": {
"nullable": false,
"type": "string",
"default": "smtp.example.org"
},
"port": {
"nullable": false,
"type": "integer",
"default": 465
},
"username": {
"nullable": false,
"type": "string",
"default": "authelia"
},
"password": {
"nullable": false,
"type": "string"
},
"sender": {
"nullable": false,
"type": "string",
"default": "authelia@example.org"
}
},
"additionalProperties": false,
"required": [
"password"
]
}
},
"additionalProperties": false,
"required": [
"kind",
"data"
]
}
]
},
"oidc": {
"nullable": false,
"type": "object",
"properties": {
"hmac_secret": {
"nullable": false,
"type": "string"
},
"lifespan": {
"nullable": false,
"type": "object",
"properties": {
"default": {
"nullable": false,
"type": "object",
"properties": {
"access_token": {
"nullable": false,
"type": "string",
"default": "1h"
},
"refresh_token": {
"nullable": false,
"type": "string",
"default": "1m"
}
},
"additionalProperties": false,
"required": [
],
"default": {
}
},
"custom": {
"nullable": false,
"type": "object",
"properties": {
},
"additionalProperties": {
"nullable": false,
"type": "object",
"properties": {
"access_token": {
"nullable": false,
"type": "string"
},
"refresh_token": {
"nullable": false,
"type": "string"
}
},
"additionalProperties": false,
"required": [
"acces_token",
"refresh_token"
]
},
"required": [
],
"default": {
"long": {
"access_token": "2d",
"refresh_token": "3d"
}
}
}
},
"additionalProperties": false,
"required": [
],
"default": {
}
},
"cors_endpoints": {
"nullable": true,
"type": "array",
"items": {
"nullable": false,
"type": "string",
"enum": [
"authorization",
"pushed-authorization-request",
"token",
"revocation",
"introspection",
"userinfo"
]
},
"default": [
"authorization",
"token",
"revocation",
"introspection",
"userinfo"
]
}
},
"additionalProperties": false,
"required": [
"hmac_secret"
]
}
},
"additionalProperties": false,
"required": [
"jwt_secret",
"session_secret",
"storage_encryption_key",
"oidc"
]
}

View file

@ -1,39 +1,48 @@
{ {
"var_authelia_version": "4.37.5", "cfg_authelia_defaults": {
"var_authelia_architecture": "amd64", "listen_address": "0.0.0.0",
"var_authelia_listen_address": "0.0.0.0", "users_file_path": "/var/authelia/users.yml",
"var_authelia_jwt_secret": "REPLACE_ME", "log_file_path": "/var/authelia/log.jsonl",
"var_authelia_users_file_path": "/var/authelia/users.yml", "domain": "authelia.example.org",
"var_authelia_log_file_path": "/var/authelia/log.jsonl", "redirect_url": "https://example.org",
"var_authelia_domain": "authelia.example.org", "session_domain": "example.org",
"var_authelia_redirect_url": "https://example.org", "storage": {
"var_authelia_session_domain": "example.org", "kind": "sqlite",
"var_authelia_session_secret": "REPLACE_ME", "data": {
"var_authelia_storage_encryption_key": "REPLACE_ME", "path": "/var/authelia/state.db"
"var_authelia_storage_kind": "sqlite", }
"var_authelia_storage_data_sqlite_path": "/var/authelia/state.db", },
"var_authelia_storage_data_postgresql_host": "localhost", "ntp_server": "time.cloudflare.com:123",
"var_authelia_storage_data_postgresql_port": 5432, "password_reset": {
"var_authelia_storage_data_postgresql_username": "authelia_user", "enabled": false,
"var_authelia_storage_data_postgresql_password": "REPLACE_ME", "custom_url": null
"var_authelia_storage_data_postgresql_schema": "authelia", },
"var_authelia_storage_data_mariadb_host": "localhost", "notification": {
"var_authelia_storage_data_mariadb_port": 3306, "kind": "file",
"var_authelia_storage_data_mariadb_username": "authelia_user", "data": {
"var_authelia_storage_data_mariadb_password": "REPLACE_ME", "path": "/var/authelia/notifications"
"var_authelia_storage_data_mariadb_schema": "authelia", }
"var_authelia_ntp_server": "time.cloudflare.com:123", },
"var_authelia_password_reset_enabled": false, "oidc": {
"var_authelia_password_reset_custom_url": null, "lifespan": {
"var_authelia_notification_mode": "smtp", "default": {
"var_authelia_notification_file_path": "/var/authelia/notifications", "access_token": "1d",
"var_authelia_notification_smtp_host": "smtp.example.org", "refresh_token": "1h"
"var_authelia_notification_smtp_port": 465, },
"var_authelia_notification_smtp_username": "authelia", "custom": {
"var_authelia_notification_smtp_password": "REPLACE_ME", "long": {
"var_authelia_notification_smtp_sender": "authelia@example.org", "access_token": "2d",
"var_authelia_oidc_hmac_secret": "REPLACE_ME", "refresh_token": "3d"
"var_authelia_oidc_lifespan_access_token": "1h", }
"var_authelia_oidc_lifespan_refresh_token": "1m", }
"var_authelia_oidc_cors_endpoints": null },
"cors_endpoints": [
"authorization",
"token",
"revocation",
"introspection",
"userinfo"
]
}
}
} }

View file

@ -1,45 +1,57 @@
[ [
{ {
"name": "packages | prerequisites", "name": "show vars",
"become": true, "when": "switch_show_vars",
"ansible.builtin.apt": { "ansible.builtin.debug": {
"update_cache": true, "var": "vars.cfg_authelia"
"pkg": [
"apt-transport-https",
"ca-certificates",
"gpg"
]
} }
}, },
{ {
"name": "packages | keys", "name": "packages",
"become": true, "block": [
"ansible.builtin.get_url": { {
"url": "https://www.authelia.com/keys/authelia-security.gpg", "name": "prerequisites",
"dest": "/usr/share/keyrings/authelia-security.gpg" "become": true,
} "ansible.builtin.apt": {
}, "update_cache": true,
{ "pkg": [
"name": "packages | repository", "apt-transport-https",
"become": true, "ca-certificates",
"ansible.builtin.shell": { "gpg"
"cmd": "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/authelia-security.gpg] https://apt.authelia.com stable main\" > /etc/apt/sources.list.d/authelia.list", ]
"creates": "/etc/apt/sources.list.d/authelia.list" }
} },
{
"name": "keys",
"become": true,
"ansible.builtin.get_url": {
"url": "https://www.authelia.com/keys/authelia-security.gpg",
"dest": "/usr/share/keyrings/authelia-security.gpg"
}
},
{
"name": "repository",
"become": true,
"ansible.builtin.shell": {
"cmd": "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/authelia-security.gpg] https://apt.authelia.com stable main\" > /etc/apt/sources.list.d/authelia.list",
"creates": "/etc/apt/sources.list.d/authelia.list"
}
}, },
{ {
"name": "packages | installation", "name": "installation",
"become": true, "become": true,
"ansible.builtin.apt": { "ansible.builtin.apt": {
"update_cache": true, "update_cache": true,
"pkg": [ "pkg": [
"openssl", "openssl",
"python3-cryptography", "python3-cryptography",
"python3-yaml", "python3-yaml",
"authelia" "authelia"
] ]
} }
}
]
}, },
{ {
"name": "generate private key for signing OIDC JWTs", "name": "generate private key for signing OIDC JWTs",
@ -53,74 +65,88 @@
"register": "temp_tls_result" "register": "temp_tls_result"
}, },
{ {
"name": "configuration | compose script", "name": "configuration",
"become": true, "block": [
"ansible.builtin.copy": { {
"src": "conf-compose.py", "name": "configuration | compose script",
"dest": "/usr/bin/authelia-conf-compose", "become": true,
"mode": "0700" "ansible.builtin.copy": {
} "src": "conf-compose.py",
}, "dest": "/usr/bin/authelia-conf-compose",
{ "mode": "0700"
"name": "configuration | directories", }
"become": true, },
"loop": [ {
"/etc/authelia/conf.d", "name": "configuration | directories",
"/etc/authelia/conf.d/clients" "become": true,
], "loop": [
"ansible.builtin.file": { "/etc/authelia/conf.d",
"state": "directory", "/etc/authelia/conf.d/clients"
"path": "{{item}}" ],
} "ansible.builtin.file": {
}, "state": "directory",
{ "path": "{{item}}"
"name": "configuration | main", }
"become": true, },
"ansible.builtin.template": { {
"src": "conf-main.json.j2", "name": "configuration | main",
"dest": "/etc/authelia/conf.d/main.json" "become": true,
} "ansible.builtin.template": {
}, "src": "conf-main.json.j2",
{ "dest": "/etc/authelia/conf.d/main.json"
"name": "configuration | compose", }
"become": true, },
"ansible.builtin.command": { {
"cmd": "/usr/bin/authelia-conf-compose --main-file-path=/etc/authelia/conf.d/main.json --clients-directory-path=/etc/authelia/conf.d/clients --output-format=yaml --output-path=/etc/authelia/configuration.yml" "name": "configuration | compose",
} "become": true,
"ansible.builtin.command": {
"cmd": "/usr/bin/authelia-conf-compose --main-file-path=/etc/authelia/conf.d/main.json --clients-directory-path=/etc/authelia/conf.d/clients --output-format=yaml --output-path=/etc/authelia/configuration.yml"
}
}
]
}, },
{ {
"name": "setup log directory", "name": "setup log directory",
"become": true, "become": true,
"ansible.builtin.file": { "ansible.builtin.file": {
"state": "directory", "state": "directory",
"path": "{{var_authelia_log_file_path | dirname}}" "owner": "authelia",
"group": "authelia",
"path": "{{cfg_authelia.log_file_path | dirname}}"
} }
}, },
{ {
"name": "users | directory", "name": "users",
"become": true, "block": [
"ansible.builtin.file": { {
"state": "directory", "name": "directory",
"path": "{{var_authelia_users_file_path | dirname}}" "become": true,
} "ansible.builtin.file": {
}, "state": "directory",
{ "owner": "authelia",
"name": "users | initial file", "group": "authelia",
"become": true, "path": "{{cfg_authelia.users_file_path | dirname}}"
"ansible.builtin.template": { }
"src": "users.yml.j2", },
"dest": "{{var_authelia_users_file_path}}", {
"force": false "name": "initial file",
} "become": true,
}, "ansible.builtin.template": {
{ "src": "users.yml.j2",
"name": "users | management script", "dest": "{{cfg_authelia.users_file_path}}",
"become": true, "force": false
"ansible.builtin.copy": { }
"src": "user-manage.py", },
"dest": "/usr/bin/authelia-user-manage", {
"mode": "0700" "name": "management script",
} "become": true,
"ansible.builtin.copy": {
"src": "user-manage.py",
"dest": "/usr/bin/authelia-user-manage",
"mode": "0700"
}
}
]
}, },
{ {
"name": "apply", "name": "apply",

View file

@ -2,12 +2,12 @@
"theme": "auto", "theme": "auto",
"identity_validation": { "identity_validation": {
"reset_password": { "reset_password": {
"jwt_secret": "{{var_authelia_jwt_secret}}" "jwt_secret": "{{cfg_authelia.jwt_secret}}"
} }
}, },
"default_2fa_method": "totp", "default_2fa_method": "totp",
"server": { "server": {
"address": "{{var_authelia_listen_address}}:9091", "address": "{{cfg_authelia.listen_address}}:9091",
"endpoints": { "endpoints": {
"enable_pprof": false, "enable_pprof": false,
"enable_expvars": false "enable_expvars": false
@ -17,7 +17,7 @@
"log": { "log": {
"level": "info", "level": "info",
"format": "json", "format": "json",
"file_path": "{{var_authelia_log_file_path}}", "file_path": "{{cfg_authelia.log_file_path}}",
"keep_stdout": false "keep_stdout": false
}, },
"telemetry": { "telemetry": {
@ -43,7 +43,7 @@
"user_verification": "preferred" "user_verification": "preferred"
}, },
"ntp": { "ntp": {
"address": "{{var_authelia_ntp_server}}", "address": "{{cfg_authelia.ntp_server}}",
"version": 4, "version": 4,
"max_desync": "3s", "max_desync": "3s",
"disable_startup_check": false, "disable_startup_check": false,
@ -51,16 +51,16 @@
}, },
"authentication_backend": { "authentication_backend": {
"password_reset": { "password_reset": {
{% if var_authelia_password_reset_enabled %} {% if cfg_authelia.password_reset.enabled %}
"disable": false, "disable": false,
{% else %} {% else %}
"disable": true, "disable": true,
{% endif %} {% endif %}
"custom_url": "{{var_authelia_password_reset_custom_url}}" "custom_url": {{cfg_authelia.password_reset.custom_url | to_json}}
}, },
"refresh_interval": "5m", "refresh_interval": "5m",
"file": { "file": {
"path": "{{var_authelia_users_file_path}}", "path": "{{cfg_authelia.users_file_path}}",
"watch": true, "watch": true,
"search": { "search": {
"email": false, "email": false,
@ -121,15 +121,15 @@
"session": { "session": {
"name": "authelia_session", "name": "authelia_session",
"same_site": "lax", "same_site": "lax",
"secret": "{{var_authelia_session_secret}}", "secret": "{{cfg_authelia.session_secret}}",
"expiration": "1h", "expiration": "1h",
"inactivity": "5m", "inactivity": "5m",
"remember_me": "1M", "remember_me": "1M",
"cookies": [ "cookies": [
{ {
"domain": "{{var_authelia_session_domain}}", "domain": "{{cfg_authelia.session_domain}}",
"authelia_url": "https://{{var_authelia_domain}}/", "authelia_url": "https://{{cfg_authelia.domain}}/",
"default_redirection_url": "{{var_authelia_redirect_url}}" "default_redirection_url": "{{cfg_authelia.redirect_url}}"
} }
] ]
}, },
@ -139,44 +139,44 @@
"ban_time": "5m" "ban_time": "5m"
}, },
"storage": { "storage": {
"encryption_key": "{{var_authelia_storage_encryption_key}}", "encryption_key": "{{cfg_authelia.storage_encryption_key}}",
{% if var_authelia_storage_kind == "sqlite" %} {% if cfg_authelia.storage.kind == "sqlite" %}
"local": { "local": {
"path": "{{var_authelia_storage_data_sqlite_path}}" "path": "{{cfg_authelia.storage.data.path}}"
} }
{% endif %} {% endif %}
{% if var_authelia_storage_kind == "postgresql" %} {% if cfg_authelia.storage.kind == "postgresql" %}
"postgres": { "postgres": {
"address": "{{var_authelia_storage_data_postgresql_host}}:{{var_authelia_storage_data_postgresql_port | string}}", "address": "{{cfg_authelia.storage.data.host}}:{{cfg_authelia.storage.data.port | string}}",
"schema": "public", "schema": "public",
"username": "{{var_authelia_storage_data_postgresql_username}}", "username": "{{cfg_authelia.storage.data.username}}",
"password": "{{var_authelia_storage_data_postgresql_password}}", "password": "{{cfg_authelia.storage.data.password}}",
"database": "{{var_authelia_storage_data_postgresql_schema}}" "database": "{{cfg_authelia.storage.data.schema}}"
} }
{% endif %} {% endif %}
{% if var_authelia_storage_kind == "mariadb" %} {% if cfg_authelia.storage.kind == "mariadb" %}
"mysql": { "mysql": {
"host": "{{var_authelia_storage_data_mariadb_host}}", "host": "{{cfg_authelia.storage.data.host}}",
"port": {{var_authelia_storage_data_mariadb_port | string}}, "port": {{cfg_authelia.storage.data.port | string}},
"username": "{{var_authelia_storage_data_mariadb_username}}", "username": "{{cfg_authelia.storage.data.username}}",
"password": "{{var_authelia_storage_data_mariadb_password}}", "password": "{{cfg_authelia.storage.data.password}}",
"database": "{{var_authelia_storage_data_mariadb_schema}}" "database": "{{cfg_authelia.storage.data.schema}}"
} }
{% endif %} {% endif %}
}, },
"notifier": { "notifier": {
"disable_startup_check": true, "disable_startup_check": true,
{% if var_authelia_notification_mode == "file" %} {% if cfg_authelia.notification.kind == "file" %}
"filesystem": { "filesystem": {
"filename": "{{var_authelia_notification_file_path}}" "filename": "{{cfg_authelia.notification.data.path}}"
} }
{% endif %} {% endif %}
{% if var_authelia_notification_mode == "smtp" %} {% if cfg_authelia.notification.kind == "smtp" %}
"smtp": { "smtp": {
"address": "{{var_authelia_notification_smtp_host}}:{{var_authelia_notification_smtp_port | string}}", "address": "{{cfg_authelia.notification.data.host}}:{{cfg_authelia.notification.data.port | string}}",
"username": "{{var_authelia_notification_smtp_username}}", "username": "{{cfg_authelia.notification.data.username}}",
"password": "{{var_authelia_notification_smtp_password}}", "password": "{{cfg_authelia.notification.data.password}}",
"sender": "{{var_authelia_notification_smtp_sender}}", "sender": "{{cfg_authelia.notification.data.sender}}",
"disable_require_tls": false, "disable_require_tls": false,
"disable_html_emails": false, "disable_html_emails": false,
"tls": { "tls": {
@ -187,7 +187,7 @@
}, },
"identity_providers": { "identity_providers": {
"oidc": { "oidc": {
"hmac_secret": "{{var_authelia_oidc_hmac_secret}}", "hmac_secret": "{{cfg_authelia.oidc.hmac_secret}}",
"jwks": [ "jwks": [
{ {
"algorithm": "RS256", "algorithm": "RS256",
@ -195,20 +195,15 @@
} }
], ],
"lifespans": { "lifespans": {
"access_token": "{{var_authelia_oidc_lifespan_access_token}}", "access_token": "{{cfg_authelia.oidc.lifespan.default.access_token}}",
"refresh_token": "{{var_authelia_oidc_lifespan_refresh_token}}", "refresh_token": "{{cfg_authelia.oidc.lifespan.default.refresh_token}}",
"custom": { "custom": {{cfg_authelia.oidc.lifespan.custom | to_json}}
"ocis": {
"access_token": "2d",
"refresh_token": "3d"
}
}
}, },
"cors": { "cors": {
"allowed_origins_from_client_redirect_uris": true "allowed_origins_from_client_redirect_uris": true
{% if var_authelia_oidc_cors_endpoints == None %} {% if cfg_authelia.oidc.cors_endpoints == None %}
{% else %} {% else %}
,"endpoints": {{var_authelia_oidc_cors_endpoints | to_json}} ,"endpoints": {{cfg_authelia.oidc.cors_endpoints | to_json}}
{% endif %} {% endif %}
}, },
"clients": [ "clients": [

View file

@ -1,169 +0,0 @@
{
"version": {
"type": "string",
"mandatory": false
},
"architecture": {
"type": "string",
"mandatory": false
},
"listen_address": {
"type": "string",
"mandatory": false
},
"jwt_secret": {
"type": "string",
"mandatory": true
},
"users_file_path": {
"type": "string",
"mandatory": false
},
"log_file_path": {
"type": "string",
"mandatory": false
},
"domain": {
"type": "string",
"mandatory": false
},
"redirect_url": {
"type": "string",
"mandatory": false
},
"session_domain": {
"type": "string",
"mandatory": false
},
"session_secret": {
"type": "string",
"mandatory": true
},
"storage_encryption_key": {
"type": "string",
"mandatory": true
},
"storage_kind": {
"type": "string",
"mandatory": false
},
"storage_data_sqlite_path": {
"type": "string",
"mandatory": false
},
"storage_data_postgresql_host": {
"type": "string",
"mandatory": false
},
"storage_data_postgresql_port": {
"type": "integer",
"mandatory": false
},
"storage_data_postgresql_username": {
"type": "string",
"mandatory": false
},
"storage_data_postgresql_password": {
"type": "string",
"mandatory": false
},
"storage_data_postgresql_schema": {
"type": "string",
"mandatory": false
},
"storage_data_mariadb_host": {
"type": "string",
"mandatory": false
},
"storage_data_mariadb_port": {
"type": "integer",
"mandatory": false
},
"storage_data_mariadb_username": {
"type": "string",
"mandatory": false
},
"storage_data_mariadb_password": {
"type": "string",
"mandatory": false
},
"storage_data_mariadb_schema": {
"type": "string",
"mandatory": false
},
"ntp_server": {
"type": "string",
"mandatory": false
},
"password_reset_enabled": {
"type": "boolean",
"mandatory": false
},
"password_reset_custom_url": {
"nullable": true,
"type": "string",
"mandatory": false
},
"notification_mode": {
"type": "string",
"mandatory": false,
"options": [
"file",
"smtp"
]
},
"notification_file_path": {
"type": "string",
"mandatory": false
},
"notification_smtp_host": {
"type": "string",
"mandatory": false
},
"notification_smtp_port": {
"type": "integer",
"mandatory": false
},
"notification_smtp_username": {
"type": "string",
"mandatory": false
},
"notification_smtp_password": {
"type": "string",
"mandatory": false
},
"notification_smtp_sender": {
"type": "string",
"mandatory": false
},
"oidc_hmac_secret": {
"type": "string",
"mandatory": true
},
"oidc_lifespan_access_token": {
"nullable": true,
"type": "string",
"mandatory": false
},
"oidc_lifespan_refresh_token": {
"nullable": true,
"type": "string",
"mandatory": false
},
"oidc_cors_endpoints": {
"nullable": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"authorization",
"pushed-authorization-request",
"token",
"revocation",
"introspection",
"userinfo"
]
},
"mandatory": false
}
}

View file

@ -0,0 +1,25 @@
{
"nullable": false,
"type": "object",
"properties": {
"auto_reload_interval": {
"nullable": true,
"type": "integer",
"description": "in hours",
"default": null
},
"dhparam_size": {
"nullable": false,
"type": "integer",
"default": null
},
"improved_security": {
"nullable": false,
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"required": [
]
}

View file

@ -1,3 +1,6 @@
{ {
"var_nginx_auto_reload_interval": null "cfg_nginx_defaults": {
"auto_reload_interval": null,
"dhparam_size": 2048
}
} }

View file

@ -1,4 +1,11 @@
[ [
{
"name": "show vars",
"when": "switch_show_vars",
"ansible.builtin.debug": {
"var": "vars.cfg_nginx"
}
},
{ {
"name": "install packages", "name": "install packages",
"become": true, "become": true,
@ -12,9 +19,10 @@
}, },
{ {
"name": "generate dhparams file", "name": "generate dhparams file",
"when": "cfg_nginx.dhparam_size != None",
"become": true, "become": true,
"ansible.builtin.command": { "ansible.builtin.command": {
"cmd": "openssl dhparam -out /etc/nginx/dhparam 4096" "cmd": "openssl dhparam -out /etc/nginx/dhparam {{cfg_nginx.dhparam_size | string}}"
}, },
"args": { "args": {
"creates": "/etc/nginx/dhparam" "creates": "/etc/nginx/dhparam"
@ -23,49 +31,54 @@
{ {
"name": "place hardening config", "name": "place hardening config",
"become": true, "become": true,
"ansible.builtin.copy": { "ansible.builtin.template": {
"src": "ssl-hardening.conf", "src": "ssl-hardening.conf.j2",
"dest": "/etc/nginx/ssl-hardening.conf" "dest": "/etc/nginx/ssl-hardening.conf"
} }
}, },
{ {
"name": "ufw | check", "name": "ufw",
"become": true, "block": [
"check_mode": true, {
"community.general.ufw": { "name": "check",
"state": "enabled" "become": true,
}, "check_mode": true,
"register": "ufw_enable_check" "community.general.ufw": {
}, "state": "enabled"
{ },
"name": "ufw | allow port 80", "register": "ufw_enable_check"
"when": "not ufw_enable_check.changed", },
"become": true, {
"community.general.ufw": { "name": "allow port 80",
"rule": "allow", "when": "not ufw_enable_check.changed",
"port": "80", "become": true,
"proto": "tcp" "community.general.ufw": {
} "rule": "allow",
}, "port": "80",
{ "proto": "tcp"
"name": "ufw | allow port 443", }
"when": "not ufw_enable_check.changed", },
"become": true, {
"community.general.ufw": { "name": "allow port 443",
"rule": "allow", "when": "not ufw_enable_check.changed",
"port": "443", "become": true,
"proto": "tcp" "community.general.ufw": {
} "rule": "allow",
"port": "443",
"proto": "tcp"
}
}
]
}, },
{ {
"name": "auto reload", "name": "auto reload",
"when": "var_nginx_auto_reload_interval == None", "when": "cfg_nginx.auto_reload_interval == None",
"become": true, "become": true,
"ansible.builtin.cron": { "ansible.builtin.cron": {
"name": "nginx_auto_reload", "name": "nginx_auto_reload",
"disabled": true, "disabled": true,
"minute": "0", "minute": "0",
"hour": "*/{{var_nginx_auto_reload_interval | string}}", "hour": "*/{{cfg_nginx.auto_reload_interval | string}}",
"day": "*", "day": "*",
"month": "*", "month": "*",
"weekday": "*", "weekday": "*",
@ -74,13 +87,13 @@
}, },
{ {
"name": "auto reload", "name": "auto reload",
"when": "var_nginx_auto_reload_interval != None", "when": "cfg_nginx.auto_reload_interval != None",
"become": true, "become": true,
"ansible.builtin.cron": { "ansible.builtin.cron": {
"name": "nginx_auto_reload", "name": "nginx_auto_reload",
"disabled": false, "disabled": false,
"minute": "0", "minute": "0",
"hour": "*/{{var_nginx_auto_reload_interval | string}}", "hour": "*/{{cfg_nginx.auto_reload_interval | string}}",
"day": "*", "day": "*",
"month": "*", "month": "*",
"weekday": "*", "weekday": "*",

View file

@ -3,7 +3,9 @@ ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off; ssl_session_tickets off;
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
{% if cfg_nginx.dhparam_size != None %}
ssl_dhparam /etc/nginx/dhparam; ssl_dhparam /etc/nginx/dhparam;
{% endif %}
# intermediate configuration # intermediate configuration
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;

View file

@ -1,8 +0,0 @@
{
"auto_reload_interval": {
"description": "in hours",
"nullable": true,
"type": "integer",
"mandatory": false
}
}

View file

@ -32,67 +32,78 @@
"type": "string" "type": "string"
}, },
"authentication": { "authentication": {
"nullable": false, "anyOf": [
"type": "object", {
"properties": { "nullable": false,
"kind": { "type": "object",
"type": "string", "properties": {
"enum": [ "kind": {
"internal", "type": "string",
"authelia" "enum": ["internal"]
], },
"default": "internal" "data": {
},
"data": {
"anyOf": [
{
"nullable": false, "nullable": false,
"type": "object", "type": "object",
"properties": { "properties": {
"authelia": { },
"additionalProperties": false,
"required": [
],
"default": {
}
}
},
"additionalProperties": false,
"required": [
"kind"
]
},
{
"nullable": false,
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": ["authelia"]
},
"data": {
"nullable": false,
"type": "object",
"properties": {
"url_base": {
"nullable": false, "nullable": false,
"type": "string"
},
"web": {
"nullable": true,
"type": "object", "type": "object",
"properties": { "properties": {
"url_base": { "client_id": {
"nullable": false, "type": "string",
"type": "string" "mandatory": false,
}, "default": "owncloud_web"
"web": {
"nullable": true,
"type": "object",
"properties": {
"client_id": {
"type": "string",
"mandatory": false,
"default": "owncloud_web"
}
},
"additionalProperties": false,
"required": [
],
"default": {
}
} }
}, },
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"url_base" ],
] "default": {
}
} }
}, },
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"authelia" "url_base"
] ]
} }
},
"additionalProperties": false,
"required": [
"kind",
"data"
] ]
} }
}, ]
"additionalProperties": false,
"required": [
],
"default": {
}
}, },
"public_share": { "public_share": {
"nullable": false, "nullable": false,

View file

@ -1,24 +1,18 @@
{ {
"cfg_owncloud_defaults": { "var_owncloud_user": "owncloud",
"user": "owncloud", "var_owncloud_directory": "/opt/owncloud",
"directory": "/opt/owncloud", "var_owncloud_version": "5.0.0",
"version": "7.2.0", "var_owncloud_platform": "linux-amd64",
"platform": "linux-amd64", "var_owncloud_domain": "owncloud.example.org",
"domain": "owncloud.example.org", "var_owncloud_admin_password": "REPLACE_ME",
"authentication": { "var_owncloud_authentication_kind": "internal",
"kind": "internal", "var_owncloud_authentication_data_authelia_url_base": "https://authelia.example.org",
"data": { "var_owncloud_authentication_data_authelia_web_client_id": "owncloud_web",
"authelia": { "var_owncloud_authentication_data_authelia_web_client_secret": "REPLACE_ME",
"url_base": "https://authelia.example.org", "var_owncloud_authentication_data_authelia_android_client_id": "owncloud_android",
"web": { "var_owncloud_authentication_data_authelia_android_client_secret": "REPLACE_ME",
"client_id": "owncloud_web" "var_owncloud_authentication_data_authelia_ios_client_id": "owncloud_ios",
} "var_owncloud_authentication_data_authelia_ios_client_secret": "REPLACE_ME",
} "var_owncloud_public_share_password_necessity": "writable",
} "var_owncloud_public_share_password_policy_active": true
},
"public_share": {
"password_necessity": "writable",
"password_policy_active": true
}
}
} }

View file

@ -7,7 +7,6 @@ Cloud-Plattform [ownCloud](https://owncloud.com/) (the rewrite in Go named "Infi
- [ownCloud-Dokumentation | How to install ownCloud Infinite Scale Tech Preview in three easy steps](https://owncloud.com/news/howto-install-owncloud-infinite-scale-tech-preview/) - [ownCloud-Dokumentation | How to install ownCloud Infinite Scale Tech Preview in three easy steps](https://owncloud.com/news/howto-install-owncloud-infinite-scale-tech-preview/)
- [ownCloud-Dokumentation | oCIS](https://owncloud.dev/ocis/) - [ownCloud-Dokumentation | oCIS](https://owncloud.dev/ocis/)
- [ownCloud-Dokumentation | env var types](https://doc.owncloud.com/ocis/next/deployment/services/envvar-types-description.html)
- [ownCloud-Dokumentation | Service | Proxy](https://doc.owncloud.com/ocis/next/deployment/services/s-list/proxy.html) - [ownCloud-Dokumentation | Service | Proxy](https://doc.owncloud.com/ocis/next/deployment/services/s-list/proxy.html)
- [ownCloud-Dokumentation | Service | Web](https://doc.owncloud.com/ocis/next/deployment/services/s-list/web.html) - [ownCloud-Dokumentation | Service | Web](https://doc.owncloud.com/ocis/next/deployment/services/s-list/web.html)
- [ownCloud-Dokumentation | Service | Sharing](https://doc.owncloud.com/ocis/next/deployment/services/s-list/sharing.html) - [ownCloud-Dokumentation | Service | Sharing](https://doc.owncloud.com/ocis/next/deployment/services/s-list/sharing.html)
@ -15,11 +14,6 @@ Cloud-Plattform [ownCloud](https://owncloud.com/) (the rewrite in Go named "Infi
- [ownCloud-Foren | OCIS + Authelia](https://central.owncloud.org/t/ocis-authelia/44222) - [ownCloud-Foren | OCIS + Authelia](https://central.owncloud.org/t/ocis-authelia/44222)
## Bermerkungen
- die Konfiguration ist zweistufig: man trägt Werte in die `.env`-Datei ein und lässt dann von owncloud auf Basis dessen eine vollwertige Konfiguration (`.ocis/config/ocis.yaml`) erstellen, welche nicht händisch angelegt oder geändert werden sollte
## ToDo ## ToDo
- Download prüfen - Download prüfen

View file

@ -3,50 +3,37 @@
"name": "user", "name": "user",
"become": true, "become": true,
"ansible.builtin.user": { "ansible.builtin.user": {
"name": "{{cfg_owncloud.user}}", "name": "{{var_owncloud_user}}",
"create_home": true, "create_home": true,
"home": "{{cfg_owncloud.directory}}" "home": "{{var_owncloud_directory}}"
} }
}, },
{ {
"name": "download", "name": "download",
"become": true, "become": true,
"become_user": "{{cfg_owncloud.user}}", "become_user": "{{var_owncloud_user}}",
"ansible.builtin.get_url": { "ansible.builtin.get_url": {
"url": "https://download.owncloud.com/ocis/ocis/stable/{{cfg_owncloud.version}}/ocis-{{cfg_owncloud.version}}-{{cfg_owncloud.platform}}", "url": "https://download.owncloud.com/ocis/ocis/stable/{{var_owncloud_version}}/ocis-{{var_owncloud_version}}-{{var_owncloud_platform}}",
"dest": "{{cfg_owncloud.directory}}/ocis", "dest": "{{var_owncloud_directory}}/ocis",
"mode": "u+rx" "mode": "u+rx"
} }
}, },
{
"name": "directories",
"become": true,
"become_user": "{{cfg_owncloud.user}}",
"loop": [
"log"
],
"ansible.builtin.file": {
"state": "directory",
"recurse": true,
"path": "{{cfg_owncloud.directory}}/{{item}}"
}
},
{ {
"name": "setup", "name": "setup",
"become": true, "become": true,
"become_user": "{{cfg_owncloud.user}}", "become_user": "{{var_owncloud_user}}",
"ansible.builtin.shell": { "ansible.builtin.shell": {
"chdir": "{{cfg_owncloud.directory}}", "chdir": "{{var_owncloud_directory}}",
"cmd": "rm -f {{cfg_owncloud.directory}}/.ocis/config/ocis.yaml && ./ocis init --insecure no --admin-password={{cfg_owncloud.admin_password}}" "cmd": "rm -f {{var_owncloud_directory}}/.ocis/config/ocis.yaml && ./ocis init --insecure no --admin-password={{var_owncloud_admin_password}}"
} }
}, },
{ {
"name": "configuration", "name": "configuration",
"become": true, "become": true,
"become_user": "{{cfg_owncloud.user}}", "become_user": "{{var_owncloud_user}}",
"ansible.builtin.template": { "ansible.builtin.template": {
"src": "env.j2", "src": "env.j2",
"dest": "{{cfg_owncloud.directory}}/.env" "dest": "{{var_owncloud_directory}}/.env"
} }
}, },
{ {

View file

@ -0,0 +1,6 @@
directives:
connect-src:
- '''self'''
{% if cfg_owncloud.authentication.kind == 'authelia' %}
- '{{cfg_owncloud.authentication.data.url_base}}'
{% endif %}

View file

@ -1,57 +1,44 @@
## web client OCIS_URL="https://{{var_owncloud_domain}}"
WEB_LOG_LEVEL=info OCIS_INSECURE="false"
WEB_LOG_FILE={{cfg_owncloud.directory}}/log/web
WEB_LOG_PRETTY=true PROXY_TLS="false"
WEB_LOG_COLOR=true
{% if cfg_owncloud.authentication_kind == 'internal' %} {% if var_owncloud_authentication_kind == 'internal' %}
{% endif %} PROXY_AUTOPROVISION_ACCOUNTS="false"
{% if cfg_owncloud.authentication_kind == 'authelia' %}
WEB_OIDC_AUTHORITY={{cfg_owncloud.authentication.data.authelia.url_base}}
WEB_OIDC_CLIENT_ID={{cfg_owncloud.authentication.data.authelia.web.client_id}}
WEB_OIDC_RESPONSE_TYPE=code
WEB_OIDC_SCOPE=openid profile email groups
WEB_OPTION_LOGIN_URL={{cfg_owncloud.authentication.data.authelia.url_base}}
WEB_OPTION_LOGOUT_URL={{cfg_owncloud.authentication.data.authelia.url_base}}
{% endif %} {% endif %}
## other clients {% if var_owncloud_authentication_kind == 'authelia' %}
PROXY_LOG_LEVEL=info OCIS_OIDC_CLIENT_ID="{{var_owncloud_authentication_data_authelia_web_client_id}}"
PROXY_LOG_FILE={{cfg_owncloud.directory}}/log/proxy OCIS_OIDC_ISSUER="{{var_owncloud_authentication_data_authelia_url_base}}"
PROXY_LOG_PRETTY=true
PROXY_LOG_COLOR=true PROXY_AUTOPROVISION_ACCOUNTS="true"
PROXY_TLS=false PROXY_OIDC_REWRITE_WELLKNOWN="true"
{% if cfg_owncloud.authentication_kind == 'internal' %} PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD="none"
PROXY_AUTOPROVISION_ACCOUNTS=false PROXY_OIDC_INSECURE="false"
{% endif %} PROXY_USER_OIDC_CLAIM="name"
{% if cfg_owncloud.authentication_kind == 'authelia' %} PROXY_USER_CS3_CLAIM="username"
PROXY_OIDC_ISSUER={{cfg_owncloud.authentication.data.authelia.url_base}}
PROXY_OIDC_REWRITE_WELLKNOWN=true WEB_OIDC_AUTHORITY="{{var_owncloud_authentication_data_authelia_url_base}}"
PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD=none WEB_OIDC_METADATA_URL="{{var_owncloud_authentication_data_authelia_url_base}}/.well-known/openid-configuration"
PROXY_OIDC_SKIP_USER_INFO=false WEB_OIDC_CLIENT_ID="{{var_owncloud_authentication_data_authelia_web_client_id}}"
PROXY_AUTOPROVISION_ACCOUNTS=true WEB_OIDC_SCOPE="openid profile email groups"
PROXY_AUTOPROVISION_CLAIM_USERNAME=preferred_username
PROXY_AUTOPROVISION_CLAIM_EMAIL=email
PROXY_AUTOPROVISION_CLAIM_DISPLAYNAME=name
PROXY_AUTOPROVISION_CLAIM_GROUPS=groups
PROXY_USER_OIDC_CLAIM=preferred_username
PROXY_USER_CS3_CLAIM=username
{% endif %} {% endif %}
## sharing {% if var_owncloud_public_share_password_necessity == 'nothing' %}
{% if cfg_owncloud.public_share.password_necessity == 'nothing' %} OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD="false"
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=false OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD="false"
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=false
{% endif %} {% endif %}
{% if cfg_owncloud.public_share.password_necessity == 'writable' %} {% if var_owncloud_public_share_password_necessity == 'writable' %}
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=false OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD="false"
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=true OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD="true"
{% endif %} {% endif %}
{% if cfg_owncloud.public_share.password_necessity == 'all' %} {% if var_owncloud_public_share_password_necessity == 'all' %}
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=true OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD="true"
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=true OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD="true"
{% endif %} {% endif %}
{% if cfg_owncloud.public_share.password_policy_active %}
OCIS_SHARING_PASSWORD_POLICY_DISABLED=false {% if var_owncloud_public_share_password_policy_active %}
OCIS_SHARING_PASSWORD_POLICY_DISABLED="false"
{% else %} {% else %}
OCIS_SHARING_PASSWORD_POLICY_DISABLED=true OCIS_SHARING_PASSWORD_POLICY_DISABLED="true"
{% endif %} {% endif %}

View file

@ -0,0 +1,75 @@
{
"user": {
"type": "string",
"mandatory": false
},
"directory": {
"type": "string",
"mandatory": false
},
"version": {
"type": "string",
"mandatory": false
},
"platform": {
"type": "string",
"mandatory": false
},
"domain": {
"type": "string",
"mandatory": false
},
"admin_password": {
"type": "string",
"mandatory": true
},
"authentication_kind": {
"type": "string",
"mandatory": false,
"options": [
"internal",
"authelia"
]
},
"authentication_data_authelia_url_base": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_web_client_id": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_web_client_secret": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_android_client_id": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_android_client_secret": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_ios_client_id": {
"type": "string",
"mandatory": false
},
"authentication_data_authelia_ios_client_secret": {
"type": "string",
"mandatory": false
},
"public_share_password_necessity": {
"type": "string",
"mandatory": false,
"options": [
"nothing",
"writable",
"all"
]
},
"public_share_password_policy_active": {
"type": "boolean",
"mandatory": false
}
}