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

Ability to configure TLS / HTTPS for Dex #9424

Closed
avidspartan1 opened this issue May 16, 2022 · 0 comments · Fixed by #9883
Closed

Ability to configure TLS / HTTPS for Dex #9424

avidspartan1 opened this issue May 16, 2022 · 0 comments · Fixed by #9883
Labels
enhancement New feature or request security Security related

Comments

@avidspartan1
Copy link

Summary

I would like to configure the bundled Dex deployment to serve over HTTPS instead of HTTP. Currently, HTTP is hard-coded in the ArgoCD wrapper for launching Dex.

Motivation

Encrypting all traffic between pods is a security requirement for me, and likely is for many others. Being able to configure this within ArgoCD (via the ArgoCD Helm chart) instead of having to maintain my own separate Dex Helm release is ideal; one less maintenance burden if it's supported by ArgoCD natively.

Proposal

Similar to how other keys in the Dex config are handled, particularly the web key should be checked to see if a value was given for it in the Dex config settings. My best guess is that this would be handled in util/dex/config.go: https://github.com/argoproj/argo-cd/blob/master/util/dex/config.go#L29-L31

The code currently looks like:

	dexCfg["web"] = map[string]interface{}{
		"http": "0.0.0.0:5556",
	}

I think it should look something like this:

        ok := dexCfg["web"].(map[string]interface{})
        if !ok {
	        dexCfg["web"] = map[string]interface{}{
		        "http": "0.0.0.0:5556",
	        }
	}

Take the above with a grain of salt; I'm not very familiar with Go. 😄

The point is to only set web if we didn't already find it in the Dex settings; this would allow a user like me to put the following in the Dex config:

web:
  https: 0.0.0.0:5554
  tlsCert: /etc/dex/tls.crt
  tlsKey: /etc/dex/tls.key

That definition of web would then be added to the generated /tmp/dex.yaml that the Dex pod then serves.

@avidspartan1 avidspartan1 added the enhancement New feature or request label May 16, 2022
@avidspartan1 avidspartan1 changed the title Ability to configure Dex for TLS Ability to configure TLS / HTTPS for Dex May 16, 2022
@crenshaw-dev crenshaw-dev added the security Security related label Jun 22, 2022
notfromstatefarm added a commit to notfromstatefarm/argo-cd that referenced this issue Jul 5, 2022
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
notfromstatefarm added a commit to notfromstatefarm/argo-cd that referenced this issue Jul 6, 2022
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Jul 13, 2022
* feat: add HTTPS support to dex server (#9424)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* refactor transports, add v2.5 to docs, other small nits

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* use OIDCTLSConfig in session manager

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* update tls to use os instead of ioutil (but really this is just me trying to get CICD to work)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* cleanup and nits

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix tests after merge

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix tests

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* nit

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security Security related
Projects
None yet
2 participants