-
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
Support for external dex implementation #702
Comments
@jaxxstorm we will make sure this is possible as part of: |
Hello @jessesuen and happy new year to you and argo-cd team, during the past week we digged into the documentation to understand how to configure an external dex but we didn't find any documentation that relates anything about this topic. Thanks! |
after some digging we figured out the configuration, the point was to use oidc.config and configure external dex to use oauth2 to communicate with argo. Should be good to do a documentation about external dex scenario. Have a good day! |
Agreed that this would be useful documented 😄 Thanks for adding this as confirmation @mbuccarello |
Hi, we are also trying to solve this issue of implementing ArgoCD with an external Dex server. Did the documentation ever get created? If not could you share an example of how you managed to get this to work please? |
@mbuccarello could you please share the configuration. |
Our dex server is running on the same cluster as ArgoCD with this config:
Then based on the comments above we have tried to configure ArgoCD through the
This is the error we see when attempting to login with LDAP on ArgoCD:
I have tried passing in |
@awalford16 can you open an issue and specify the version you're running? My immediate instinct is that Argo CD is trying to compare the redirect URL with the configured |
So I was able fix this by adding |
can posters post specific examples of your working configs? @michaelajr @mbuccarello ? edit: for our use-case, we got things to work. see below
dex:
enabled: false
configs:
rbac:
scopes:
- groups
- email
cm:
url: https://abc.com/argocd
oidc.config: |
name: AzureAD
issuer: https://abc.com/dex
clientID: argocd
clientSecret: passBetweenDexAndArgo #needs to match what you defined in Dex.
# root CA of our abc.com
rootCA: |
-----BEGIN CERTIFICATE-----
MIIE0DCCA7igAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
-----END CERTIFICATE-----
requestedIDTokenClaims:
groups:
essential: true
requestedScopes:
- openid
- profile
- email
- groups
params:
server.insecure: true
server.rootpath: "argocd"
kind: ConfigMap
apiVersion: v1
metadata:
name: dex
namespace: dex
data:
config.yaml: |
issuer: https://abc.com/dex
expiry:
idTokens: "30m"
storage:
type: kubernetes
config:
inCluster: true
web:
https: 0.0.0.0:5556
tlsCert: /etc/dex/tls/tls.crt
tlsKey: /etc/dex/tls/tls.key
connectors:
- type: microsoft
# Required field for connector id.
id: microsoft
# Required field for connector name.
name: Microsoft
config:
# Credentials can be string literals or pulled from the environment.
clientID: $MICROSOFT_APPLICATION_ID
clientSecret: $MICROSOFT_CLIENT_SECRET
redirectURI: https://abc.com/dex/callback
tenant: someTenantId
groupNameFormat: id
oauth2:
skipApprovalScreen: true
staticClients:
- id: argocd
redirectURIs:
- 'https://abc.com/argocd/auth/callback'
name: 'argocd'
secret: passBetweenDexAndArgo we use K8s Nginx Ingress Controller as our reverse proxy for both Dex and ArgoCD |
If you'd like to extract the working config for your current dex in order to import it into an external dex, you can get a pod shell into |
So in the case I've been trying to set up, I was asked to patch out the bundled Dex as well as leverage the existing Dex instance on the cluster managed by others. Followed the directions above to a achieve a partial success. It uses the Github connector on the Dex side so just a case of sharing the clientID and secret between both ConfigMaps. So by partial, I mean I managed to create a new static client in Dex for ArgoCD with the appropriate redirectURI and log in via the UI but when I try to use the
Any thoughts here @michaelajr @mbuccarello @thiDucTran? Do I need seperate What am I putting for redirectURI? Literally Dex Side - Added new static client:
ArgoCD Side:
|
I dont think dex works with argo cd cli . try |
It does @thiDucTran! i.e.
|
We already have a dex server installed. Is it possible to point to this, and not deploy an additional dex server?
The text was updated successfully, but these errors were encountered: