-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: add HTTPS to dex server (#9424) #9883
feat: add HTTPS to dex server (#9424) #9883
Conversation
8518259
to
5cb5ce8
Compare
Codecov Report
@@ Coverage Diff @@
## master #9883 +/- ##
==========================================
- Coverage 45.97% 45.96% -0.02%
==========================================
Files 227 227
Lines 27230 27276 +46
==========================================
+ Hits 12520 12538 +18
- Misses 13011 13036 +25
- Partials 1699 1702 +3
Continue to review full report at Codecov.
|
9770620
to
1f78d17
Compare
Signed-off-by: notfromstatefarm <[email protected]>
1f78d17
to
c00d0d4
Compare
In case anyone wants to test out strict validation/providing your own cert super quickly, cert-manager can be installed and configured in two steps:
and then apply this manifest: apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: argocd-ca
namespace: argocd
spec:
isCA: true
commonName: argocd-ca
secretName: root-secret
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
name: selfsigned-issuer
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: argocd-issuer
namespace: argocd
spec:
ca:
secretName: root-secret
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: argocd-dex-server
namespace: argocd
spec:
secretName: argocd-dex-server-tls
issuerRef:
name: argocd-issuer
commonName: argocd-dex-server
dnsNames:
- argocd-dex-server After this PR I'm going to take a look at auto-reloading whenever the TLS changes. As of right now, repo server and dex server both have to be restarted manually if the TLS changes, which prevents effective use of cert-manager. |
Signed-off-by: notfromstatefarm <[email protected]>
8a956e7
to
f32ed5e
Compare
Signed-off-by: notfromstatefarm <[email protected]>
227dba8
to
7c4eb6f
Compare
…ying to get CICD to work) Signed-off-by: notfromstatefarm <[email protected]>
something funky is going on with CI and the tests are failing with nonsensical errors.. lets see if a new commit helps any. |
Signed-off-by: notfromstatefarm <[email protected]>
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.
Just tested locally, works like a charm. Thanks so much again!
I'm going to look for a second review, since this is very core security work.
the latest GHSA merge broke some of the tests, figuring it out! |
Signed-off-by: notfromstatefarm <[email protected]>
53f4d51
to
c6ad8cb
Compare
okay, got it all figured out. Long story short, the GHSA merge introduced a new Might need to document that we're ignoring the OIDC TLS settings when using internal dex. |
@notfromstatefarm how would you feel about dropping the Dex-specific TLS verification flag in favor of the one introduced by the GHSA? Is there any advantage to having a setting specific to Dex? |
There's a few problems with that off the top of my head
|
@notfromstatefarm that makes sense! My brain was quite tired last night. :-) |
Signed-off-by: notfromstatefarm <[email protected]>
Signed-off-by: notfromstatefarm [email protected]
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Closes #9424
This PR implements TLS for the dex server in a nearly identical fashion to the repo server TLS, using the
argocd-dex-server-tls
secret and falling back to a generated self-signed certificate if it is not present.By default, TLS will now be enabled for communications between the API server and repo server. However, just like with the repo server, it's best to use a user-provided certificate. The API server will validate the certificate against the secret.
Thanks @crenshaw-dev for pointing this issue out to me! 🥳