DTaaS Configuration
This document describes the configuration needed for the docker compose file. It has pre-install and post-install parts. Complete the pre-install tasks before bringing up the docker compose services, and the post-install tasks after.
Pre-install Configuration Tasks:
Post-install Configuration Tasks:
Environment
The compose commands in the setup guides read their environment from
an environment file. An example of this file is at
config/.env.example.
Create a copy of this example file without the example suffix:
Domain
Decide whether the deployment is local or remote.
Wherever <DOMAIN_NAME> or intocps.org appears
in this guide, replace it with the domain name of the remote machine.
The remote machine must have a domain name and be reachable from the
internet.
Open config/.env and replace the current value of
the SERVER_DNS variable with the domain name:
TLS Certificates
Ensure that valid TLS certificates are present on the machine.
The fullchain.pem and privkey.pem files must be in the certs/
directory. Traefik reads them through config/tls.yml.
There are several ways to obtain TLS certificates. On a web server you can use Certbot from Let's Encrypt:
Usernames
The usernames of the main workspace users are set in
the environment variable file config/.env.
Change the default values (user1 and user2) to the desired usernames:
NOTE: These usernames must match the names of the Keycloak users used in the forward auth configuration.
Traefik Forward Auth Configuration
The config/forward-auth-conf.example file contains an
example configuration for the forward-auth service.
Create a copy of this example file without the example suffix:
Then update the Traefik forward auth configuration file with the usernames
and emails of the Keycloak users that correspond to user1 and user2.
NOTE: The usernames set in the Usernames configuration step must be the same as those in the Traefik forward auth configuration file.
Keycloak Integration
The default docker-compose.yml uses Keycloak for authentication
through OIDC (OpenID Connect).
The traefik-forward-auth and DTaaS client docker services use
Keycloak for authentication and authorisation. Each one needs an OAuth2
application in the integrated Keycloak service.
For detailed Keycloak setup instructions, see keycloak-setup.md
Configure Environment Variables
- Edit
config/.envand fill in the Keycloak credentials:
DTaaS Web Client Config
The DTaaS web client is configured with a small JavaScript file.
An example is at config/client.js.example.
Create a copy of this example file without the example suffix:
Then edit the new web client config file and update the following values.
Client OAuth2 Setup
The DTaaS web client is a React SPA that authenticates with Keycloak using
the Authorization Code flow with PKCE. Follow the
Create OAuth2 Client for DTaaS Client Service
instructions to create the public PKCE client in Keycloak, then update
config/client.js:
openid and profile are standard OIDC scopes that Keycloak provides by
default. openid is required for OIDC authentication and issues the ID
token. profile adds the profile claims, including preferred_username
and the profile claim mapped from the profile user attribute that
Create Users sets.
The web client takes the username from the first of these claims that is
present: preferred_username, username, nickname, login, the part of
email before @, the part of upn before @, the last path segment of
the profile URL, and sub. The profile URL is also shown as the
user's profile link.
The variable is named REACT_APP_GITLAB_SCOPES for historical reasons;
it carries the Keycloak OIDC scopes.
Replace <DOMAIN_NAME> with the value set in the
Domain section, and replace dtaas with the Keycloak realm name
if you chose a different one.