feat(keycloak): add keycloak::enable-service-account

This commit is contained in:
Masaki Yatsu
2025-10-15 22:59:45 +09:00
parent 1e001462f6
commit 6367833ca4
2 changed files with 71 additions and 0 deletions

View File

@@ -268,6 +268,16 @@ delete-client realm client_id:
export KEYCLOAK_CLIENT_ID={{ client_id }}
dotenvx run -q -f ../.env.local -- tsx ./scripts/delete-client.ts
# Enable service account for Keycloak client
enable-service-account realm client_id:
#!/bin/bash
set -euo pipefail
export KEYCLOAK_ADMIN_USER=$(just admin-username)
export KEYCLOAK_ADMIN_PASSWORD=$(just admin-password)
export KEYCLOAK_REALM={{ realm }}
export KEYCLOAK_CLIENT_ID={{ client_id }}
dotenvx run -q -f ../.env.local -- tsx ./scripts/enable-service-account.ts
# Add attribute mapper for Keycloak client
add-attribute-mapper client_id attribute_name display_name='' claim_name='' options='' default_value='' mapper_name='' view_perms='admin,user' edit_perms='admin':
#!/bin/bash