[keycloak-user] keycloak api access
Sankar P
sankar.curiosity at gmail.com
Sat Oct 5 07:43:22 EDT 2019
Hi,
I installed a new keycloak setup using kubernetes, helm charts
helm install codecentric/keycloak
Now when I try to login through the web interface, I am able to login to
the keycloak setup using a `keycloak` user and an auto-generated password
(say `TsIeWcqrig2YIs`). However, when I repeat the same authenticate
request using curl, I get the a HTTP 400 with the following error message
in the keycloak logs:
The curl command that I use is:
```
curl -X POST -k -v -d "username=keycloak&password=TsIeWcqrig2YIs"
https://example.com/auth/realms/master/login-actions/authenticate\?session_code\=9arYjZF8fRSe-FFLBfkIsTdgowTHqE8T3NcUmSTTwr8\&execution\=f9e8c53c-4e3f-4450-9d01-a5b42c539f21\&client_id\=security-admin-console\&tab_id\=6d2ztopE4Vc
```
I have tried logging in without the url parameters too and get the same
error. I got these url params from the web client when it logged in via the
front end. Is there something I am doing wrong ?
The reason why I want to do the API based login, is because, I want to add
an user and set the password for that user, after my keycloak pod is
installed. I could not find a reliable way to do this. Any pointers on how
to do this ?
Thanks.
--
Sankar P
http://psankar.blogspot.com
More information about the keycloak-user
mailing list