-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat: PKCE authentication flow for web logins #9890 #15889
Conversation
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15889 +/- ##
=======================================
Coverage 49.69% 49.70%
=======================================
Files 267 267
Lines 46351 46371 +20
=======================================
+ Hits 23036 23048 +12
- Misses 21054 21063 +9
+ Partials 2261 2260 -1
☔ View full report in Codecov by Sentry. |
@crenshaw-dev @jessesuen Can you please take a look or add relevant reviewers? |
@Marvin9 I see that the example config adds the option to # argocd-cm
oidc.config: |
name: dex
issuer: http://localhost:4000/api/dex
clientID: argo-cd-pkce
requestedScopes: ["openid", "profile", "email", "groups"]
enablePKCEAuthentication: true Does this imply we don't support PKCE for someone using |
I forgot that case. Please confirm that I understood this correct, what you are saying is the configuration of only OIDC from dex.config right? data:
url: "https://argocd.example.com"
dex.config: |
connectors:
# OIDC
- type: oidc
id: oidc
name: OIDC
config:
issuer: https://example-OIDC-provider.com
clientID: aaaabbbbccccddddeee
clientSecret: $dex.oidc.clientSecret |
What I meant was: when users use the bundled dex, today we generate a dex config for them with pre-defined staticClients like: staticClients:
- id: argo-cd
name: Argo CD
redirectURIs:
- https://cd.demo.akuity.io/auth/callback
secret: xxxxxxxxxxxxxxxxxxxxx # this is automatically generated for them
- id: argo-cd-cli
name: Argo CD CLI
public: true
redirectURIs:
- http://localhost
- http://localhost:8085/auth/callback In order to support pkce web login when used with Argo CD's bundled dex, we need to:
However, this behavior needs to be controlled with a new knob. As discussed offline, I think for this PR, support for dex.config can be considered out of scope. |
@@ -63,6 +63,14 @@ func GenerateDexConfigYAML(argocdSettings *settings.ArgoCDSettings, disableTls b | |||
redirectURL, | |||
}, | |||
} | |||
argoCDPKCEStaticClient := map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessesuen forgot to tell that I have added static client as well for PKCE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI LGTM
…#15889) feat: PKCE authentication flow for web logins argoproj#9890 (argoproj#15889) Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com> Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
…#15889) feat: PKCE authentication flow for web logins argoproj#9890 (argoproj#15889) Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
…#15889) feat: PKCE authentication flow for web logins argoproj#9890 (argoproj#15889) Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
…#15889) feat: PKCE authentication flow for web logins argoproj#9890 (argoproj#15889) Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com> Signed-off-by: Kevin Lyda <kevin@lyda.ie>
…#15889) feat: PKCE authentication flow for web logins argoproj#9890 (argoproj#15889) Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
Closes #9890
This PR implements browser only PKCE flow for sso authentication.
It adds new attribute to the oidc config to enable the feature
Flow in UI if PKCE enabled
Login:
consent screen callback to -
<argocd>/pkce/verify
- again thats the UI page which then get authorization code and asks Idp for user tokencode
from query parametersid_token
in cookieChecklist:
not sure about this one