Create a user using swagger API without being initially logged in as another user
Summary
Is there a way to create a user using the swagger API without being initially logged in as another user? I am trying to automate the installation of Che with a user and password, but what I noticed is it is not possible to automate the call to create a user without having an initial user signed up in che manually. Are there any workthrough for this?
/cc @skabashnyuk @mshaposhnik
@ssh24 At this moment Eclipse Che uses Keycloak as an identity management system. Thus Eclipse Che itself doesn't include api to create users. Can you elaborate a bit more about your use case? Maybe we can suggest some alternatives.
@skabashnyuk The use case is basically automating creation of che and then signing up a user with the swagger API. But as it stands, if I deploy che, I cannot call the create user api without having to manually sign up first a regular user.
@ssh24 Does keycloak include in your installation? Have you tried to create a user on Keycloak?
@skabashnyuk Yes keycloak does exist on my installation. Are there any docs on how to create a user using keycloak?
I think this doc https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_users_resource is a good starting point.
I was trying to use the keycloak api from che directly to create an user. I noticed the keycloak api direct from che uses additional keys like session_code=<secret_code>&execution=<exec>&client_id=che-public&tab_id=<tab_id>
Is there a way to generate those value through some backend api from che?
@ssh24 I afraid, to create a user you need to create it with Keycloak API first.
Closing this. Resolved it by using the default account.