-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Where are tls.crt and tls.key available? #3832
Comments
@Jfisher77 can you share nginx.conf and the steps how did you setup the ingress controller? If the TLS terminates at ingress then it is quite simple... |
@anjuls the TLS between ingress and pod is the key bit for us. We have verified it's possible when doing TLS termination on the ingress for a request, then reencrypting the traffic using the certificates for TLS-MA with the backend service. To achieve it we use config like this:
However as we are deploying multiple services through multiple environments, we don't want to actually store the certificates and keys on the machine. In the nginx.conf I know there is configuration pointing to the Kubernetes fake certificate (which is presented in the browser for ingress without TLS or misconfigured certificates in TLS secret), but when the TLS secret is configured correctly and the CN matches the host, this certificate is what is presented in the browser whilst the nginx.conf still points to the fake certificate. The reason I opened this request was to see if we could use the same mechanic which presents the correct TLS cert on the ingress to re-encrypt the traffic using the same certificates to the backend. |
@Jfisher77 you don't need the ssl certificate to secure the communication with the backend. Please check https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol |
Maybe my comments are straying from the title of this thread, where are the certs and keys available? `
} Where are these files saved on the machine? |
The SSL certificates are located in the directory |
Thanks for the reply @aledbf, can we reference the certificates in memory through the server-snippet annotation on the ingress? |
@Jfisher77 no because we just send the certificates to lua
|
@aledbf What is lua and where do the certificates go? Is there a way through custom annotations and ingress templates we can reference the certificate in some nginx directives we'd like to add? We'd like to add directives like proxy_ssl_certificate and proxy_ssl_certificate_key. |
@stephankfolkes please check this comment and the links #2965 (comment) |
@Jfisher77 @stephankfolkes the only way I see you can do this right now is to use a mount a volume in the ingress controller with the secret you need and use a custom template (or the custom-configuration annotation) to add the directive you need. https://kubernetes.io/docs/concepts/configuration/secret/#use-cases |
Thank you for your feedback. We'll look into that solution. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.): Yes
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.): tls certs, certificates
Context:
We have various ingresses configured for TLS using a secret containing a tls.key and tls.crt. When hitting the ingress in the browser, we are correctly presented with the certificate in this secret (self signed).
We have a scenario to terminate TLS on the ingress, then re-encrypt the traffic for TLS-MA from the ingress -> service. To do this, we have added proxy_ssl_certificate and proxy_ssl_certificate_key as configurations in the server-snippet annotation pointing to a certificate on the machine. We've verified that this fits our need.
However in the server configuration in nginx.conf for this ingress we see only a reference to a fake certificate. How is the correct certificate from the TLS secret presented in the browser when it is not referenced in this configuration in nginx.conf?
The text was updated successfully, but these errors were encountered: