Quick deployment guide
This guide provides the minimal steps to get our full software stack running locally for development and testing purposes. You will have a complete working environment up and running in minutes.
This setup is designed exclusively for local development and testing. It is not production-ready and should never be exposed to external networks or the internet.
Prerequisites
- Docker installed on your local machine.
- Access to the project's Docker Compose configuration file and associated container images.
Familiarize yourself with configuration locations
Environment variables are located in the ./env/
directory and configuration
files are located in the ./conf/
directory. The defaults will work for local
development, but you can review these files to understand available
customization options.
Configure local domain resolution
Open your hosts file:
sudo vim /etc/hosts
Add the following line:
127.0.0.1 keycloak
Save and exit the editor.
Deploy ingress and authentication server
Start Traefik (ingress controller) and Keycloak (authentication):
docker compose up traefik keycloak -d
Configure authentication server and OAuth2 proxy
-
Open
http://keycloak:8080
and log in using the admin credentialsadmin
andadmin
(defined in./env/.keycloak.env
). -
Create a new client with the following settings:
-
Client ID:
one-bff-client
-
Name:
one-bff-client
-
Client authentication:
On
-
Authorization:
On
-
Authentication flow:
Standard flow
andDirect access grants
-
Valid redirect URIs:
http://localhost/oath2/callback/*
-
Valid post logout redirect URis:
http://localhost
-
Web origins:
+
Extract the client secret and update the OAuth2 proxy configuration:
-
In the
one-bff-client
, go to the "Credentials" tab and copy the Client Secret. -
Update the OAuth2 proxy configuration at
./conf/oauth2_proxy/alpha-config.yml
with the Client Secret from Keycloak:
providers:
- provider: oidc
clientSecret: { { CLIENT-SECRET-HERE } }
Deploy the remaining stack
docker compose up -d
Configure IAM roles
Go to Keycloak and create two new realm roles with the following names:
SAMPLE_ORG_EDITOR
SAMPLE_ORG_READER
Configure client and authentication
-
In Keycloak create a new client scope with the name
one-bff-client
. -
For this new client scope, configure a new mapper with the following settings:
-
Mapper type:
Audience
-
Name:
one-bff-audience
-
Included Client Audience:
one-bff-client
-
Included Custom Audience:
one-bff-client
Add the new client scope to the client:
-
Go to "Clients" and choose
one-bff-client
-
Add a client scope, selecting
one-bff-client
and adding it as the default client scope.
Create the first user
In Keycloak add a new user with the following settings:
-
Email verified:
On
-
Choose a username and email for testing
Map the user to the IAM roles:
-
Go to "Role mapping" and assign a role
-
Filter the selectable roles by realm roles
-
Select
SAMPLE_ORG_EDITOR
andSAMPLE_ORG_READER
Go to "Credentials" and set a password for the user.
Sign in
Open
http://localhost
and sign in with your credentials.