[keycloak-user] Service Account enable by default for clients, how?

Sebastien Blanc sblanc at redhat.com
Wed Jan 11 03:12:28 EST 2017


Yes I was talking about the registration_endpoint , I just did the test
with something like :

curl -X PUT \
    -d '{ "clientId": "testclient", "serviceAccountsEnabled": true }' \
    -H "Content-Type:application/json" \
    -H "Authorization: bearer my_registration_access_token" \
http://localhost:8080/auth/realms/myrealm/clients-registrations/default/testclient

My Service Accounts for this client is then enabled but Keycloak fails to
returns a response for this PUT request. So I'm not able to get the new
registration access token.

Could you try this request and if it fails for you as well I will open a
ticket ?

Seb



On Wed, Jan 11, 2017 at 8:16 AM, Sven Thoms <sven.thoms at gmail.com> wrote:

> Hello Sebastien
>
> Are you talking about the Admin REST endpoint or the registration_endpoint
> defined at
> /auth/reales/[realmname]/.well-known/openid-configuration?
>
> I am trying to submit a registration request via registration_endpoint and
> submit a field enabling the service account.
>
> According to the openid connect dynamic client registration documentation
> at openid.net,  the request payload is non-normative, I am just not able
> to enable service account that way.
>
> Am 10.01.2017 10:32 vorm. schrieb "Sebastien Blanc" <sblanc at redhat.com>:
>
>> I haven't tried it but when registering the client, in the payload, the
>> ClientRepresentation, there is a serviceAccountsEnabled field , so maybe
>> "service-accounts-enabled : true will do the trick ?
>>
>> On Tue, Jan 10, 2017 at 10:17 AM, Sven Thoms <sven.thoms at gmail.com>
>> wrote:
>>
>>> Is it possible via a setting to automatically enable clients registered
>>> dynamically via the well-known registration endpoint and registration
>>> access token?  My current approach is to iterate over all clients post -
>>> creation and set serviceaccountsEnabled to true. I need a more prompt and
>>> real-time way
>>> _______________________________________________
>>> keycloak-user mailing list
>>> keycloak-user at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>
>>
>>


More information about the keycloak-user mailing list