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

Enable OCSP stabling #19

Open
Cryptophobia opened this issue Mar 13, 2018 · 1 comment
Open

Enable OCSP stabling #19

Cryptophobia opened this issue Mar 13, 2018 · 1 comment

Comments

@Cryptophobia
Copy link
Member

From @helgi on September 22, 2016 14:43

Performance and more

https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_stapling

Copied from original issue: deis/router#257

@felixbuenemann
Copy link
Contributor

felixbuenemann commented Mar 24, 2019

This is not so easy to implement.

In order to use OCSP stapling, each vHost would have to specify the ssl_trusted_certificate, which is a PEM file containing only the certificate chain (intermediate certificate(s)).

Because Workflow stores the intermediates bundled with the certificate, this would mean parsing the certificate bundle to extract the intermediate certs.

In addition to that, the router needs a proper resolver set up, to be able to resolve the hostname of the OCSP server.

We could grab the resolver from the /etc/resolv.conf during startup:

test `sysctl -n net.ipv6.conf.all.disable_ipv6` = 1 && ipv6=off || ipv6=on
export RESOLVERS=`awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf`"ipv6=$ipv6"

The IPv6 check is needed, because the OCSP responded might have AAAA records, that are unreachable, if the router does not have IPv6 enabled.

The snippet was taken from some internal NGINX proxies I'm running on K8s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants