Files
computer-playbook/roles/web-app-keycloak/config/main.yml
Kevin Veen-Birkenbach 57d5269b07 CSP (Safari-safe): merge -elem/-attr into base; respect explicit disables; no mirror-back; header only for documents/workers
- Add CSP3 support for style/script: include -elem and -attr directives
- Base (style-src, script-src) now unions elem/attr (CSP2/Safari fallback)
- Respect explicit base disables (e.g. style-src.unsafe-inline: false)
- Hashes only when 'unsafe-inline' absent in the final base tokens
- Nginx: set CSP only for HTML/worker via header_filter_by_lua_block; drop for subresources
- Remove per-location header_filter; keep body_filter only
- Update app role flags to *-attr where appropriate; extend desktop CSS sources
- Add comprehensive unit tests for union/explicit-disable/no-mirror-back

Ref: https://chatgpt.com/share/68f87a0a-cebc-800f-bb3e-8c8ab4dee8ee
2025-10-22 13:53:06 +02:00

58 lines
1.6 KiB
YAML

load_dependencies: True # When set to false the dependencies aren't loaded. Helpful for developing
actions:
import_realm: True # Import REALM
features:
matomo: true
css: true
desktop: true
ldap: true
central_database: true
recaptcha: true
# Doesn't make sense to activate logout page for keycloak, because the logout page
# anyhow should be included via iframe in keycloak.
# The JS is also messing with the keycloak config fields
# @todo optimize the JS
logout: false
server:
csp:
flags:
script-src-elem:
unsafe-inline: true
script-src-attr:
unsafe-inline: true
style-src-attr:
unsafe-inline: true
whitelist:
frame-src:
- "*" # For frontend channel logout it's necessary that iframes can be loaded
domains:
canonical:
- "auth.{{ PRIMARY_DOMAIN }}"
aliases: []
scopes:
nextcloud: nextcloud
docker:
services:
keycloak:
image: "quay.io/keycloak/keycloak"
version: "latest"
name: "keycloak"
cpus: "2.0"
mem_reservation: "2g"
mem_limit: "4g"
pids_limit: 1024
database:
enabled: true
credentials:
recaptcha:
website_key: "" # Required if you enabled recaptcha:
secret_key: "" # Required if you enabled recaptcha:
accounts:
bootstrap:
username: "administrator"
system:
username: "{{ SOFTWARE_NAME | replace('.', '_') | lower }}"