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

Option for password grant flow instead of authorization code flow #24

Closed
heikoettelbruecksap opened this issue Nov 6, 2018 · 7 comments
Labels
enhancement New feature or request

Comments

@heikoettelbruecksap
Copy link

KIND: Feature request

Currently kubelogin only supports the authorization code flow to retrieve ID tokens. This is helpful for interactive usage of human users where we can expect a web browser and typically an existing session with the OAuth server already (=> SSO). However, for automated scenarios where no browser is available, it would be helpful to be able to use the password grant flow instead.

I see the oauth2 library for go already supports the password grant flow (unfortunately with an compatibility to certain OAuth servers, but I hope this will be fixed - see golang/oauth2#320). That means, I assume it should be rather easy to add a command-line option to request the password grant flow as well as command-line parameters for user name and password.

Would this feature be generally appreciated? (before looking for the actual implementation)

@int128 int128 added the enhancement New feature or request label Nov 6, 2018
@int128
Copy link
Owner

int128 commented Nov 7, 2018

Sounds good.
That is Resource Owner Password Credentials Grant in OpenID Connect.
It is valuable that kubelogin supports password authentication as like oc login of OpenShift or cf login of CloudFoundry.

@heikoettelbruecksap
Copy link
Author

Yes, exactly. The respective go function to perform this flow is https://godoc.org/golang.org/x/oauth2#Config.PasswordCredentialsToken (but keep in mind the issue in the library mentioned earlier).
Would you prefer to implement this option yourself or should we propose a concrete change? (Due to internal processes, this might take some time until approved.)

@int128
Copy link
Owner

int128 commented Nov 8, 2018

Would you propose a pull request for this feature?
For now I don't have environment for testing OIDC flow. (I just destroyed my cluster and Keycloak last month...)

@Baykonur
Copy link
Contributor

Baykonur commented Apr 4, 2019

Hello @heikoettelbruecksap, any news on this?

@heikoettelbruecksap
Copy link
Author

Sorry, I didn't follow up on that, since my company's approach has changed in the meanwhile, and we no longer need this feature. Feel free to leave this issue open or close it.

@Baykonur
Copy link
Contributor

Baykonur commented Apr 4, 2019

Thanks for the feedback.

@int128
Copy link
Owner

int128 commented Jun 6, 2019

This feature is supported in v1.12.0.

@int128 int128 closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants