-
Notifications
You must be signed in to change notification settings - Fork 111
client secret #93
Comments
Hey @kfox1111, do you mean the Once this step is complete the refresh token is then used to update that secret automatically. |
My understanding of the OIDC protocol, a client secret for a web service should never be given out. it is a secret only for that web service. If given out, it breaks the trust model of OIDC. For cli's / local gui's, OIDC providers usually have a mechanism to create clients that are hardened and don't have client secrets. Dex supports this model. For example, dexidp/dex#469 Usually a public client can not have a redirectURL other then localhost. A web service should only have a valid redirectURL. So usually you need to configure dex with 2 different clients. one public, one for the web service like gangway. You authenticate for gangway and then through a trust, you convert the private client's id token to the public one's. If the client secret you are giving out as part of gangway's process is its own web service client secret, I believe this is a big problem. |
I feel like it is a problem to directly expose something called a
|
Any movement on this? A potential security issue so fundamental to the function of this service really should be answered definitively as a problem, or not. |
I wonder if it's possible to use the PKCE flow here so that client secrets aren't involved at all? Not sure if the flow allows for that 🤔 |
NOTE: this client also has the client secret in the config https://github.com/int128/kubelogin ... which still feels wrong, but maybe its a problem with the way OIDC is implemented in kubernetes api server, rather than these "helpers" |
Yeah, there still feels like there is a security hole here somewhere. I think a better long term solution is just around the corner. Keycloak recently added device flow: https://issues.redhat.com/browse/KEYCLOAK-7675. The kubectl client could talk to oidc via device flow, print out a url / qrcode for the user to login at, and then the cli would unblock and continue on with credentials handed to it by the oidc server. |
I'm trying to understand the security ramifications of gangway. As I understand it, in oidc, a web client's secret should never be given to a user. But the example screenshots in the repo do just that. How does this work?
The text was updated successfully, but these errors were encountered: