The clients-registrations API doesn't return secret anymore on RH-SSO 7.5
Issue
I was able to register a new service account using 'single' POST on /clients-registrations API. I got in response the new client representation and the secret.
But with the new version of RHSSO (7.5), I'm not able anymore to register a new service account using 'single' POST on /clients-registrations API because I need to perform an additional PUT on /clients-registrations API for the secret to being generated and then an additional GET on /clients-registrations API to finally get the secret in client representation response.
To reproduce follow the steps:
Write a data.json with:
{
"clientId":"my_client",
"fullScopeAllowed":false,
"bearerOnly":false,
"consentRequired": false,
"standardFlowEnabled":false,
"implicitFlowEnabled":false,
"directAccessGrantsEnabled":false,
"serviceAccountsEnabled":true,
"publicClient":false
}
- RHSSO 7.2
curl -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" --data @data.json -X POST "https://localhost:8080/auth/realms/master/clients-registrations/default/"
Result: client representation + secret in response
- RHSS0 7.5+
curl -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" --data @data.json -X POST "https://localhost:8080/auth/realms/master/clients-registrations/default/"
Result: client representation only in response (no secret)
curl -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" --data @data.json -X PUT "https://localhost:8080/auth/realms/master/clients-registrations/default/my_client"
Result: client representation only in response (no secret, but on RHSSO side secret has been generated)
curl -H "Authorization: Bearer $access_token" -X GET "https://localhost:8080/auth/realms/master/clients-registrations/default/my_client
Result: client representation + secret in response
Environment
- Red Hat Single Sign-On (RH-SSO)
- 7.5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.