-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automate the setup of github identity provider with internal keycloak #18238
Comments
@benoitf |
Hello Anatolii, after creating the issue I searched and it seems the short answer is 'no' (there is no API) so the idea would to create a hosted 'che oauth github app' that would redirect to the 'local-instance callback' at the end. And the local-instance should be a parameter (like using local-storage to pass the URL to redirect to) and then in keycloak it will had this 'one for all' che-oauth-github-app |
@benoitf |
let say I go to github and I register a new che oAuth github page with callback http://che-incubator.github.io/chectl/oAuth.html then I grab the id of this app and I use it in all chectl providing a flag to use automatic github oAuth Then when it will call oAuth it needs to provide to http://che-incubator.github.io/chectl/oAuth.html a special parameter/local-storage file, whatever, which will be the 'che URL' to redirect to As a client it will do : login on che--> redirect to github oAuth --> goes to http://che-incubator.github.io/chectl/oAuth.html , see that there is a parameter and then redirect to http://my-che-instance.com |
So, does it mean that |
This PR [1] is indented to automatically provision github identity provider. kind: Secret
apiVersion: v1
metadata:
name: github-credentials
namespace: che
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: keycloak-secret
annotations:
che.eclipse.org/github-oauth-credentials: "true"
che.eclipse.org/mount-as: env
che.eclipse.org/githubId_env-name: GITHUB_CLIENT_ID
che.eclipse.org/githubSecret_env-name: GITHUB_SECRET
data:
githubId: <..>
githubSecret: <..>
type: Opaque Regarding the part about creation hosted script to redirect to che instance. |
@tolusha what about setting (...)
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: github-oauth-credentials
annotations:
che.eclipse.org/mount-as: env
che.eclipse.org/githubId_env-name: GITHUB_CLIENT_ID
che.eclipse.org/githubSecret_env-name: GITHUB_SECRET
(...) |
There are two points why I prefer: labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: keycloak-secret
annotations:
che.eclipse.org/github-oauth-credentials: "true"
|
@tolusha ok it makes sense to keep the Anyway it looks like you have implemented a generic mechanism to inject secrets in che-server pods. And that the That was not really required to fix this issue but it's indeed a good idea to have such a generic mechanism. |
Is your enhancement related to a problem? Please describe.
Today, we've some plug-ins that allow to do easy things with github repositories. You just need to click on a button to authenticate on github.
But it works only if the github identity provider is correctly setup on the keycloak instance.
Describe the solution you'd like
Automate the creation of the github oauth apps or ease the way on adding github identity provider when installing che with a local keycloak instance
Describe alternatives you've considered
If creation can't be automated from a github token, allow to specify github
client id
andsecrets
Additional context
The goal is to have workspaces ready to use github integration after a first install of Eclipse Che.
https://www.keycloak.org/docs/latest/server_admin/#github
https://www.eclipse.org/che/docs/che-7/end-user-guide/configuring-github-oauth/
The text was updated successfully, but these errors were encountered: