-
Notifications
You must be signed in to change notification settings - Fork 194
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
Flag to force PKCE #858
Comments
Would be really nice if it s possible to use PKCE flow with Azure-AD. Client-Secrets in kubeconfigs aren't beautiful. 😥 |
It seems that auth code + pkce can't be used on Azure with this plugin in that case. I think, new flag(e.g. |
We digged a bit in the deeper into this issue and found out that the PKCE flags are actually send in the version of Kubelogin oidc-login v1.28.0. When we do the oidc setup with the following command:
we get the following URL:
You see that The following line also supports this: But something in the back is not working properly, which we did not find out yet. |
That is very good news. Thanks for investigating this @ch9hn ! |
Can someone of you test, if setting the application as "SPA - Single Web Application" works then with the PKCE ? According to that blog entry it should work. When I follow the flow of the blog with Postman, I get the same error as in kubelogin:
|
|
I am getting the same error as @oskarm93 when using Can we add this header to these requests to resolve this issue? How should we go about configuring this? Add a config flag to support CORS overall (not sure how much effort this would take)? Add a config flag to add the I opened #1048 for this issue in particular. It appears that I was able to workaround this limitation my changing the Azure application from a "Single Page Application" to a "Mobile and desktop applications". See #1048 (comment) for some more details. |
Purpose of the feature (why)
The purpose of this feature request is to enable authentication against OIDC providers that support the Authorization Code+PKCE flow but fail to publish the
code_challenge_methods_supported
value in their metadata document.While the failure to publish this value is non-compliant with RFC8414, at least one major identity provider, Azure AD, is in this situation. As documented here, Azure AD does in fact support PKCE.
As a result of #283, kubelogin does not use PKCE when the value is missing from the metadata document, even if the
--oidc-use-pkce
flag is used.Your idea (how)
Because PKCE is so important when authenticating with public clients such as kubelogin, I would propose that the
--oidc-use-pkce
flag be updated as follows:--oidc-use-pkce=S256
. In this case, kubelogin would ignore what is said in the metadata document and accept the user's instruction.The text was updated successfully, but these errors were encountered: