Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github identity provider automatically into the Keycloak server in time of launching of Eclipse Che Multi User #7899

Closed
dmytro-ndp opened this issue Dec 15, 2017 · 10 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Dec 15, 2017

Description

It may be useful to add Github identity provider automatically into the Keycloak server in time of launching of Eclipse Che Multi User to compensate removal of support of CHE_OAUTH_GITHUB_CLIENTID and CHE_OAUTH_GITHUB_CLIENTSECRET variables as part of issue #5943.
Command to add github provider through the Keycloak's Admin CLI:

kcadm.sh create identity-provider/instances -r che -s alias=github -s providerId=github -s enabled=true -s storeToken=true -s addReadTokenRoleOnCreate=true -s 'config.useJwksUrl="true"' -s config.clientId=<GITHUB_CLIENTID> -s config.clientSecret=<GITHUB_CLIENTSECRET> -s 'config.defaultScope="repo,user,write:public_key"' --no-config --server http://localhost:8080/auth --user <admin's name> --password <admin's password> --realm master

Created provider can be observed in the Keycloak Administration Console:
screenshot from 2017-12-11 19-15-15

Authorization callback URL

  1. For multiuser Eclipse Che:

http://<CHE_SERVER_IP>:5050/auth/realms/che/broker/github/endpoint

  1. For single user Eclipse Che:

http://<CHE_SERVER_IP>:8080/api/oauth/callback

OS and version:
Eclipse Che 6.x

@dmytro-ndp dmytro-ndp added kind/task Internal things, technical debt, and to-do tasks to be performed. team/production labels Dec 15, 2017
@riuvshin
Copy link
Contributor

added 4 types of client id/secret pairs for each qa-slave:

  • che single user docker
  • che multi user docker
  • che single user ocp
  • che multi user ocp

@riuvshin
Copy link
Contributor

Done. after some discussion we come to conclusion that we should not put that

kcadm.sh create identity-provider/instances -r che -s alias=github -s providerId=github -s enabled=true -s storeToken=true -s addReadTokenRoleOnCreate=true -s 'config.useJwksUrl="true"' -s config.clientId=<GITHUB_CLIENTID> -s config.clientSecret=<GITHUB_CLIENTSECRET> -s 'config.defaultScope="repo,user,write:public_key"' --no-config --server http://localhost:8080/auth --user <admin's name> --password <admin's password> --realm master

to any deploy script but add this to CHE docs

@patlachance
Copy link

@riuvshin to any deploy script but add this to CHE docs
Was it included somewere? I didn't find it in https://www.eclipse.org/che/docs/6/che/docs/user-management.html#social-login-and-brokering

@riuvshin
Copy link
Contributor

@patlachance in docs we describe how to configure it manually with KC Admin panel.
if you are looking for KC CLI docs Eclipse CHE docs site is the wrong place to look at you better check KC docs http://www.keycloak.org/docs/3.3/server_admin/topics/admin-cli.html

@patlachance
Copy link

@riuvshin I agree that KC CLI doc is should be in KC but I thought that this particular line of code with useful and Che specific parameters could be included in Che’s doc.

@riuvshin
Copy link
Contributor

I think we can add this, @eivantsov WDYT?

@ghost
Copy link

ghost commented Mar 27, 2018

@riuvshin but we need GitHub app with the right redirect URL. Yes, we can add a provider with dummy data but it is helpful at all?

Or do you mean adding such CLI instructions to docs? I think a UI is a better experience. But we can do that of course

@riuvshin
Copy link
Contributor

riuvshin commented Mar 27, 2018

I mean should we have just an example of how to do the same but using CLI ?
it is actually what @patlachance wanted, am I right?

@ghost
Copy link

ghost commented Mar 27, 2018

Yeah, that makes sense. Will do

@patlachance
Copy link

@riuvshin yes, exactly!
@eivantsov thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

3 participants