Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea70a2eb33 | |||
| 8b8ec1fc9f |
+7
-1
@@ -5,7 +5,11 @@ services:
|
||||
environment:
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
||||
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
|
||||
KC_DB: dev-mem
|
||||
# dev-file persists Keycloak's H2 DB under /opt/keycloak/data/h2/
|
||||
# so the realm + test users survive container restarts. With the
|
||||
# previous dev-mem the realm dissolved every time KC went idle,
|
||||
# breaking local M7.1 smoke testing.
|
||||
KC_DB: dev-file
|
||||
KC_HEALTH_ENABLED: "true"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
@@ -15,6 +19,7 @@ services:
|
||||
volumes:
|
||||
- ./keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro
|
||||
- ./keycloak/themes/certifai:/opt/keycloak/themes/certifai:ro
|
||||
- keycloak-data:/opt/keycloak/data/h2
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /realms/master HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && head -1 <&3 | grep -q '200 OK'"]
|
||||
interval: 10s
|
||||
@@ -256,3 +261,4 @@ volumes:
|
||||
langfuse-db-data:
|
||||
langfuse-clickhouse-data:
|
||||
langfuse-clickhouse-logs:
|
||||
keycloak-data:
|
||||
|
||||
+202
-6
@@ -53,7 +53,7 @@
|
||||
"description": "CERTifAI administration dashboard",
|
||||
"enabled": true,
|
||||
"publicClient": true,
|
||||
"directAccessGrantsEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"serviceAccountsEnabled": false,
|
||||
@@ -73,7 +73,8 @@
|
||||
"defaultClientScopes": [
|
||||
"openid",
|
||||
"profile",
|
||||
"email"
|
||||
"email",
|
||||
"tenant-context"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"offline_access"
|
||||
@@ -106,7 +107,8 @@
|
||||
"defaultClientScopes": [
|
||||
"openid",
|
||||
"profile",
|
||||
"email"
|
||||
"email",
|
||||
"tenant-context"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"offline_access"
|
||||
@@ -139,7 +141,8 @@
|
||||
"defaultClientScopes": [
|
||||
"openid",
|
||||
"profile",
|
||||
"email"
|
||||
"email",
|
||||
"tenant-context"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"offline_access"
|
||||
@@ -269,6 +272,105 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tenant-context",
|
||||
"description": "Breakpilot platform tenant + org claims (M7.1)",
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"include.in.token.scope": "true",
|
||||
"display.on.consent.screen": "false"
|
||||
},
|
||||
"protocolMappers": [
|
||||
{
|
||||
"name": "tenant_id",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "tenant_id",
|
||||
"claim.name": "tenant_id",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tenant_slug",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "tenant_slug",
|
||||
"claim.name": "tenant_slug",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tenant_status",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "tenant_status",
|
||||
"claim.name": "tenant_status",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "plan",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "plan",
|
||||
"claim.name": "plan",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "org_roles",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "org_roles",
|
||||
"claim.name": "org_roles",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String",
|
||||
"multivalued": "true",
|
||||
"aggregate.attrs": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "products",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-usermodel-attribute-mapper",
|
||||
"consentRequired": false,
|
||||
"config": {
|
||||
"user.attribute": "products",
|
||||
"claim.name": "products",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true",
|
||||
"jsonType.label": "String",
|
||||
"multivalued": "true",
|
||||
"aggregate.attrs": "true"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
@@ -289,7 +391,15 @@
|
||||
"realmRoles": [
|
||||
"admin",
|
||||
"user"
|
||||
]
|
||||
],
|
||||
"attributes": {
|
||||
"tenant_id": ["00000000-0000-0000-0000-000000000001"],
|
||||
"tenant_slug": ["acme"],
|
||||
"tenant_status": ["active"],
|
||||
"plan": ["professional"],
|
||||
"org_roles": ["IT_ADMIN", "CXO"],
|
||||
"products": ["compliance", "certifai"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "user@certifai.local",
|
||||
@@ -307,7 +417,93 @@
|
||||
],
|
||||
"realmRoles": [
|
||||
"user"
|
||||
]
|
||||
],
|
||||
"attributes": {
|
||||
"tenant_id": ["00000000-0000-0000-0000-000000000001"],
|
||||
"tenant_slug": ["acme"],
|
||||
"tenant_status": ["active"],
|
||||
"plan": ["professional"],
|
||||
"org_roles": ["USER"],
|
||||
"products": ["compliance"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "frozen@acme.local",
|
||||
"email": "frozen@acme.local",
|
||||
"firstName": "Frozen",
|
||||
"lastName": "Tenant",
|
||||
"enabled": true,
|
||||
"emailVerified": true,
|
||||
"credentials": [
|
||||
{
|
||||
"type": "password",
|
||||
"value": "frozen",
|
||||
"temporary": false
|
||||
}
|
||||
],
|
||||
"realmRoles": [
|
||||
"user"
|
||||
],
|
||||
"attributes": {
|
||||
"tenant_id": ["00000000-0000-0000-0000-000000000002"],
|
||||
"tenant_slug": ["frozenco"],
|
||||
"tenant_status": ["frozen"],
|
||||
"plan": ["starter"],
|
||||
"org_roles": ["IT_ADMIN"],
|
||||
"products": ["compliance"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "archived@acme.local",
|
||||
"email": "archived@acme.local",
|
||||
"firstName": "Archived",
|
||||
"lastName": "Tenant",
|
||||
"enabled": true,
|
||||
"emailVerified": true,
|
||||
"credentials": [
|
||||
{
|
||||
"type": "password",
|
||||
"value": "archived",
|
||||
"temporary": false
|
||||
}
|
||||
],
|
||||
"realmRoles": [
|
||||
"user"
|
||||
],
|
||||
"attributes": {
|
||||
"tenant_id": ["00000000-0000-0000-0000-000000000003"],
|
||||
"tenant_slug": ["archiveco"],
|
||||
"tenant_status": ["archived"],
|
||||
"plan": ["starter"],
|
||||
"org_roles": ["IT_ADMIN"],
|
||||
"products": ["compliance"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "trial@acme.local",
|
||||
"email": "trial@acme.local",
|
||||
"firstName": "Trial",
|
||||
"lastName": "Tenant",
|
||||
"enabled": true,
|
||||
"emailVerified": true,
|
||||
"credentials": [
|
||||
{
|
||||
"type": "password",
|
||||
"value": "trial",
|
||||
"temporary": false
|
||||
}
|
||||
],
|
||||
"realmRoles": [
|
||||
"user"
|
||||
],
|
||||
"attributes": {
|
||||
"tenant_id": ["00000000-0000-0000-0000-000000000004"],
|
||||
"tenant_slug": ["trialco"],
|
||||
"tenant_status": ["trial"],
|
||||
"plan": ["starter"],
|
||||
"org_roles": ["IT_ADMIN"],
|
||||
"products": ["compliance"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user