You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This realm configuration file contains client definitions for Sentrius.
3
+
This realm configuration file contains client definitions for Sentrius with dynamic secret injection.
4
4
5
-
⚠️ **IMPORTANT**: The client secrets in this file are set to "CHANGE_ME_AFTER_IMPORT" and must be updated after importing the realm to match the secrets configured in your Helm deployment.
5
+
## 🔐 Dynamic Secret Management
6
6
7
-
The client secrets should be configured to match:
8
-
- The OAuth2 secrets generated by the Helm chart
9
-
- Or the secrets you provide in your values.yaml
7
+
The Keycloak container now supports dynamic secret injection through environment variables:
10
8
11
-
You can update client secrets via:
12
-
1. Keycloak Admin Console
13
-
2. Keycloak Admin REST API
14
-
3. Environment variable substitution during realm import
9
+
-**SENTRIUS_API_CLIENT_SECRET** - Secret for sentrius-api client
10
+
-**SENTRIUS_LAUNCHER_CLIENT_SECRET** - Secret for sentrius-launcher-service client
11
+
-**JAVA_AGENTS_CLIENT_SECRET** - Secret for java-agents client
12
+
-**AI_AGENT_ASSESSOR_CLIENT_SECRET** - Secret for ai-agent-assessor client
13
+
14
+
## How It Works
15
+
16
+
1.**Template Processing**: The `sentrius-realm.json.template` file contains environment variable placeholders
17
+
2.**Runtime Substitution**: During container startup, the `process-realm-template.sh` script replaces placeholders with actual values
18
+
3.**Helm Integration**: The Helm chart generates OAuth2 secrets and passes them as environment variables
19
+
4.**Automatic Import**: Keycloak imports the processed realm with the dynamically generated secrets
20
+
21
+
## Environment Variable Integration
22
+
23
+
The Helm chart automatically:
24
+
- Generates random 32-character secrets when none are provided
25
+
- Passes these secrets as environment variables to the Keycloak container
26
+
- Ensures consistency between Helm-managed OAuth2 secrets and Keycloak realm configuration
27
+
28
+
## Fallback Behavior
29
+
30
+
If environment variables are not provided, the startup script generates default random secrets to ensure the container can start successfully.
0 commit comments