working sso

This commit is contained in:
notplants
2026-02-28 21:01:52 -05:00
parent 61b41e2866
commit bd2488ffea
3 changed files with 25 additions and 19 deletions

View File

@ -17,12 +17,12 @@ SANDBOX_DOMAIN=sandbox.cryptpad.example.com
#EXTRA_DOMAINS=', `www.cryptpad.example.com`'
LETS_ENCRYPT_ENV=production
## SSO / OIDC (optional — requires SSO_ENABLED=true)
SSO_ENABLED=false
SSO_ENFORCED=false
SSO_PROVIDER_NAME=Authentik
SSO_OIDC_URL=https://authentik.example.com/application/o/cryptpad
SSO_CLIENT_ID=cryptpad
SSO_CLIENT_SECRET=
SSO_JWT_ALG=RS256
SSO_PLUGIN_VERSION=0.4.0
## SSO / OIDC (optional — defaults to false)
#SSO_ENABLED=true
#SSO_ENFORCED=false
#SSO_PROVIDER_NAME=Authentik
#SSO_OIDC_URL=https://authentik.example.com/application/o/cryptpad
#SSO_CLIENT_ID=cryptpad
#SSO_CLIENT_SECRET=
#SSO_JWT_ALG=RS256
#SSO_PLUGIN_VERSION=0.4.0

View File

@ -1,5 +1,5 @@
export CONFIG_VERSION=v2
export CONFIG_JS_VERSION=v2
export NGINX_CONF_VERSION=v1
export SSO_ENTRYPOINT_VERSION=v2
export SSO_JS_VERSION=v1
export SSO_ENTRYPOINT_VERSION=v4
export SSO_JS_VERSION=v2

View File

@ -4,12 +4,18 @@
module.exports = {
enabled: "{{ env "SSO_ENABLED" }}" === "true",
enforced: "{{ env "SSO_ENFORCED" }}" === "true",
protocol: "oidc",
providerName: "{{ env "SSO_PROVIDER_NAME" }}",
oidcConfig: {
url: "{{ env "SSO_OIDC_URL" }}",
clientID: "{{ env "SSO_CLIENT_ID" }}",
clientSecret: "{{ env "SSO_CLIENT_SECRET" }}",
algorithm: "{{ env "SSO_JWT_ALG" }}"
}
cpPassword: true,
forceCpPassword: false,
list: [
{
name: "{{ env "SSO_PROVIDER_NAME" }}",
type: "oidc",
url: "{{ env "SSO_OIDC_URL" }}",
client_id: "{{ env "SSO_CLIENT_ID" }}",
client_secret: "{{ env "SSO_CLIENT_SECRET" }}",
id_token_alg: "{{ env "SSO_JWT_ALG" }}",
use_pkce: true,
use_nonce: true
}
]
};