[keycloak-user] Clarify "Create a new client" via Admin REST API

Juraj Janosik juraj.janosik77 at gmail.com
Fri Dec 11 05:04:11 EST 2015


Hi,

JIRA issue created for this topic:
https://issues.jboss.org/browse/KEYCLOAK-2217

But please check another new JIRA issues handling "Update User" scenarios:

https://issues.jboss.org/browse/KEYCLOAK-2216 : Update User (admin REST
API): some attributes added via POST/PUT method are deleted.

https://issues.jboss.org/browse/KEYCLOAK-2218 : Update User (Attribute
"enabled" via Admin REST API): JSON body without attribute "username"
causes HTTP 500 - Internal Server Error

Best Regards,
Juraj

2015-12-10 16:30 GMT+01:00 Marek Posolda <mposolda at redhat.com>:

> I think it should be same consistent behaviour on all places. Probably we
> should make it to what is used for clients (id is allowed) and improve
> realms and users to allow it too.
>
> Feel free to create JIRA for this.
>
> Marek
>
>
> On 10/12/15 14:24, Juraj Janosik wrote:
>
> Hi all,
>
> please, could somebody clarify issue (see bottom of the mail) discovered
> in version 1.6.1.Final?
> The same behavior is detected in version 1.7.0.Final.
>
> This behavior differs from a Create a New User where the JSON body
> parameter "id" is skipped.
>
> Thanks a lot.
>
> Best regards,
> Juraj
>
> 2015-11-12 10:32 GMT+01:00 Juraj Janosik < <juraj.janosik77 at gmail.com>
> juraj.janosik77 at gmail.com>:
>
>> Hi,
>> I want to clarify the "Create a new client" via REST API
>> especially for body parameter "id" from "ClientRepresentation".
>> If I set the parameter "id" in the request body (see example below),
>> the value is set to the client. No new id value is generated for the
>> client, which is the typically behavior of "Create a new role for the
>> realm or client
>> <http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_role_for_the_realm_or_client>"
>> and "Create a new user
>> <http://keycloak.github.io/docs/rest-api/index.html#_create_a_new_user>".
>> Is this a correct behavior?
>>
>> Tested data example:
>> "Create Client":
>> "method":"POST","url":"<URL>:<PORT>/auth/admin/realms/<REALM>/clients"
>> "body":
>> "{
>> "id":"3",
>> "clientId":"testclient-3",
>> "name": "testclient-3",
>> "description": "TESTCLIENT-3",
>> "enabled": true,
>> "redirectUris":[ "\\" ],
>> "publicClient": true
>> }"
>> "headers":
>> [["Content-Type","application/json"],
>> ["Authorization","Bearer <ACCESS_TOKEN>]]
>>
>> Output for GET clients looks like:
>>  {
>>         "*id": "3"*,
>>         "clientId": "testclient-3",
>>         "name": "testclient-3",
>>         "description": "TESTCLIENT-3",
>>         "surrogateAuthRequired": false,
>>         "enabled": true,
>>         "clientAuthenticatorType": "client-secret",
>>         "redirectUris":
>>         [
>>             "\"
>>         ],
>>         "webOrigins":
>>         [
>>         ],
>>         "notBefore": 0,
>>         "bearerOnly": false,
>>         "consentRequired": false,
>>         "serviceAccountsEnabled": false,
>>         "directGrantsOnly": false,
>>         "publicClient": true,
>>         "frontchannelLogout": false,
>>         "attributes":
>>         {
>>         },
>> ...
>>
>> Thanks a lot.
>>
>> Best Regards,
>> Juraj
>>
>>
>>
>
>
> _______________________________________________
> keycloak-user mailing listkeycloak-user at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151211/522bea44/attachment.html 


More information about the keycloak-user mailing list