Skip to content

Keycloak Authentication

Keycloak handles authentication and authorization for both the Taxpayer Portal and Tax Admin Dashboard. Each environment has its own Keycloak instance.

EnvironmentURLImageDatabase
DEVhttps://auth.swarm.ayinza.devkeycloak:26.0-sserisDEV PostgreSQL
UAThttps://auth.ayinza.devkeycloak:26.0UAT PostgreSQL

Both environments use a realm called ssra (SSERIS South Sudan Revenue Authority).

The realm export is stored at /home/kaks/stacks/ssra-realm-export.json on Azure and is imported when Keycloak first starts.

FeatureDEVUAT
Imagekeycloak:26.0-sseriskeycloak:26.0
Custom themeCustom SSERIS theme (26.0-sseris)Base Keycloak (26.0, no custom theme)
Domainauth.swarm.ayinza.devauth.ayinza.dev
DatabaseDEV PostgreSQL (port 5432)UAT PostgreSQL (port 5433)

Keycloak DEV uses a custom SSERIS theme for the login pages. The theme is baked into the Docker image (keycloak:26.0-sseris). UAT uses the base Keycloak image (keycloak:26.0) without a custom theme. To update the DEV theme:

  1. Modify the theme in the keycloak theme repo
  2. Build a new Docker image
  3. Push to Harbor
  4. Update the service
  1. Go to https://auth.swarm.ayinza.dev (DEV) or https://auth.ayinza.dev (UAT)
  2. Click Administration Console
  3. Log in with the admin credentials (stored in the stack YAML)
  1. Admin Console → Users → Add User
  2. Set username, email, first/last name
  3. After creating, go to Credentials tab → Set Password
  4. Assign realm roles as needed
Terminal window
# On the Keycloak container
/opt/keycloak/bin/kc.sh export --dir /opt/keycloak/data/export --realm ssra