Keycloak API - ability to skip certification verification - #6741
Conversation
ttoomey
left a comment
There was a problem hiding this comment.
Looks good, maybe guard production so it's always true if we intend this to only be qa/staging/dev
|
|
||
| # When true, TLS certificate verification is disabled for Keycloak requests. | ||
| # Intended for staging/dev environments with self-signed certificates only. | ||
| def skip_ssl_verification? |
There was a problem hiding this comment.
maybe return true if Rails.env.production?
There was a problem hiding this comment.
Oh, stupid AI, that comment isn't correct. The skip is because our infrastructure uses a different domain with a self-signed certificate for internal communication, not because of the environment.
There was a problem hiding this comment.
I see, so the risk is then that there's no verification when making API requests to keycloak in prod or fetching an access token. Definitely not ideal.
But since we control the network and hosts, this has probably low practical risk. A different story if it's an external IDP; that seems riskier.
Should we flag this as a work-around and plan a follow up get validation working?
There was a problem hiding this comment.
wonder if we could just make the self-signed certs part of our image
There was a problem hiding this comment.
@yakloinsteak can you weigh in here? It sounded like you had some potential solutions, but felt the self-signed cert was sufficient.
There was a problem hiding this comment.
I feel that the self-signed cert is sufficient, but this could be a good opportunity to improve things. All of our load balancers talk to our services with self-signed certs, but @ttoomey's point is valid for sure.
We can use kyverno to copy the CA from the keycloak namespace to the rails namespace and mount it, and there are a number of tools that can can get what we need in the rails namespace (but I figure they aren't worth it since we already have kyverno).
It's maybe a few hours work to get this set up. Tack this on to https://github.com/greenriver/devops-requests/issues/2770 if you want to try it out.
|
Moving back to draft, until we determine timing of better certificates on the back-channel communications. |
|
https://github.com/greenriver/argocd-manifests/pull/4279 should be ready for review soon, and in the meantime, |
Merging this PR
mainDescription
Type of change
Checklist before requesting review