headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.2k stars 155 forks source link

Add integration with OKD Oauth #1035

Open NikolayMarusenko opened 1 year ago

NikolayMarusenko commented 1 year ago

Do you have guidelines how to deploy Headlamp on Openshift (OKD) cluster and enable 'Sign in' functionall? https://headlamp.dev/docs/latest/installation/in-cluster/oidc/

If Integrate Keycloak as Identity Provider (https://docs.openshift.com/container-platform/4.10/authentication/identity_providers/configuring-oidc-identity-provider.html) and integrate Headlamp with Keycloak, got error - Token not defined. I assume that the problem is in the format of the token, since on OKD the token is used in the format Bearer sha256~.

If in manually mode get sha256~ token and past this token to Headlamp - everything works.

If try to integrate with native OpenShift Oauth - https://docs.openshift.com/container-platform/4.10/authentication/configuring-oauth-clients.html problems with redirects because Oauth use another endpoints.

Could you help with the integration with OKD cluster?

joaquimrocha commented 1 year ago

@NikolayMarusenko , we did merge a PR recently that maybe influences this issue too (though I am not 100% sure). Are you able to build an image from main and retry?

zmotso commented 1 year ago

@joaquimrocha, It Looks like OKD has an approach for authentication that does not fit the current headlamp flow. I've made a draft working code with authentication in the OKD cluster. https://github.com/zmotso/headlamp/pull/1/files Do you have plans to add OKD authentication support to Headlamp?