From 4cf8c5c7d41f21766e50ec31f39d5499e6280d07 Mon Sep 17 00:00:00 2001 From: rfl Date: Wed, 2 Oct 2024 13:02:56 +0200 Subject: [PATCH] WIP: Use keycloak for sso --- paperless/init.sls | 3 +++ pillar.example | 3 +++ 2 files changed, 6 insertions(+) diff --git a/paperless/init.sls b/paperless/init.sls index 3c193e7..6d9b64a 100644 --- a/paperless/init.sls +++ b/paperless/init.sls @@ -67,6 +67,9 @@ paperless-docker-container-running: # - PAPERLESS_ENABLE_HTTP_REMOTE_USER_API={{ salt['pillar.get']('', 'false') }} # - PAPERLESS_SECRET_KEY={{ salt['pillar.get']('paperless:webserver:environment:secret_key', 'change-me') }} # - PAPERLESS_URL={{ salt['pillar.get']('paperless:webserver:environment:url', 'https://paperless.flipdot.org') }} + + - PAPERLESS_APPS="allauth.socialaccount.providers.openid_connect" + - PAPERLESS_SOCIALACCOUNT_PROVIDERS='{"openid_connect": {"APPS": [{"provider_id": "keycloak", "name": "Keycloak", "client_id": "paperless", "secret": {{ salt['pillar.get']('paperless:webserver:keycloak:client_secret', '') }}, "settings": {"server_url": {{ salt['pillar.get']('paperless:webserver:keycloak:server_url', 'https:///realms//.well-known/openid-configuration') }} }}]}}' - restart: always - networks: - paperless-network diff --git a/pillar.example b/pillar.example index ea278a4..16311d4 100644 --- a/pillar.example +++ b/pillar.example @@ -36,6 +36,9 @@ paperless: # (if doing so please consider security measures such as reverse proxy) # url=https://paperless.flipdot.org + keycloak: + client_secret: + server_url: https:///realms//.well-known/openid-configuration gotenberg: image: path: docker.io/gotenberg/gotenberg