Knowledge base / Setup

Sign-in via Authentik

Create the application and provider in Authentik and connect Kontris to it.

Kontris uses exactly one provider for single sign-on: Entra ID or Authentik. With Authentik the roles come from the user’s groups.

https://contracthub.example.com stands for your APP_BASE_URL, https://auth.example.com for Authentik.

1. Create the groups

Under Directory → Groups, three times:

Group Role in Kontris
ContractHub.Admin Full access
ContractHub.Auditor Read access to everything, including the audit log
ContractHub.User Access according to folder permissions

Other names are possible. You then enter them in OIDC_ROLE_ADMIN, OIDC_ROLE_AUDITOR and OIDC_ROLE_USER. Add the users to the groups.

2. Application and provider

  1. Applications → Applications → Create with provider.
  2. Name Kontris, slug contracthub.
  3. Provider type OAuth2/OpenID Provider, client type Confidential.
  4. Redirect URI in Strict mode: https://contracthub.example.com/auth/callback.
  5. Choose a signing key and leave the scopes openid, email and profile selected.
  6. Note the Client ID and Client Secret.

Leave the Subject mode at its default and do not change it after going live. Kontris recognizes users by this value.

The issuer URL is shown in the provider’s overview, for example https://auth.example.com/application/o/contracthub/, with the trailing slash.

3. Prevent email changes

Kontris links users created in advance by their email address. Users should therefore not be allowed to change it themselves in Authentik (System → Settings).

4. Configure Kontris

OIDC_ENABLED=true
OIDC_PROVIDER=authentik
OIDC_ISSUER=https://auth.example.com/application/o/contracthub/
OIDC_CLIENT_ID=<Client ID>
OIDC_CLIENT_SECRET=<Client Secret>
docker compose up -d --force-recreate contracthub

If Authentik uses a certificate from an internal certificate authority, Kontris has to trust it. Mount the server’s CA bundle and set NODE_EXTRA_CA_CERTS:

    environment:
      NODE_EXTRA_CA_CERTS: /etc/ssl/certs/host-ca.crt
    volumes:
      - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/host-ca.crt:ro

As of 2026-11-15 · Stuck? Write to us