Identity Service Management
You can manage a client using the Keycloak administration panel or CLI.
Managing a Client Using the Keycloak Administration Panel
To manage a client, complete the following steps:
- Log in to the Keycloak administration panel.
- Select the required Realm according to the brand ID.
- Go to Clients and perform the required action regarding a client.
Managing a Client Using the CLI
Creating a Client
To create a client, complete the following steps:
-
On the management node, create a JSON file with IDP client properties. Use the following client JSON template to create a client:
{ "name": "psaweb", "clientId": "psaweb", "baseUrl": "https://cp.us.na.cloud.im", "redirectUris": ["https://cp.us.na.cloud.im/*"], "clientAuthenticatorType": "client-secret", "publicClient": true, "protocol": "openid-connect", "defaultClientScopes": ["user_account_ids_v1"] }
baseUrl
andredirectUris
must point to the brand. Use other parameters as is. -
Copy this file to the IDP pod. Execute a client creation script on the IDP pod:
# kubectl cp client.json $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2):/opt/jboss/scripts/ kubectl exec $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2) -- bash -c "cd scripts && python /opt/jboss/scripts/create_client.py <brand_id>"
Backing Up a Client
- Create the
get-client-presentation.py
script: - Copy this script to the IDP pod:
# kubectl cp get-client-presentation.py $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2):/opt/jboss/scripts/get-client-presentation.py
- Run this script for each brand integrated with PSA:
# kubectl exec $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2) -- bash -c "cd scripts && python /opt/jboss/scripts/get-client-presentation.py ${brand-id} psaweb" > psaweb-client-brand-${brand-id}.txt
where:
${brand-id}
: the internal ID of the brand integrated with PSA.
Deleting a Client
-
Create the
delete-client.py
script: - Copy this script to the IDP pod:
# kubectl cp get-client-presentation.py $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2):/opt/jboss/scripts/get-client-presentation.py
- Run this script for each brand integrated with PSA:
# kubectl exec $(kubectl get pods -o name -l app=idp-backend | cut -d'/' -f 2) -- bash -c "cd scripts && python /opt/jboss/scripts/delete-client.py ${brand-id} psaweb"
where:
${brand-id}
: the internal ID of the brand integrated with PSA.