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

tls.Provision does not respect disable_ocsp_stapling #4064

Closed
cds2-stripe opened this issue Mar 15, 2021 · 3 comments
Closed

tls.Provision does not respect disable_ocsp_stapling #4064

cds2-stripe opened this issue Mar 15, 2021 · 3 comments
Labels
feature ⚙️ New feature or request
Milestone

Comments

@cds2-stripe
Copy link

cds2-stripe commented Mar 15, 2021

Hello!

We were very excited to see 09432ba as we're running Caddy in an environment without internet access, and the 10s timeout per cert for OCSP stapling means we have to wait a while for Caddy to start.

I went to test v2.4.0-beta.1 and added the following to our Caddy JSON configuration file. From reading the source it appears that not specifying a subject matches all hostnames.

+      "automation": {
+        "policies": [
+          {
+            "disable_ocsp_stapling": true
+          }
+        ]
+      },

After rolling out the change above we still saw OCSP timeouts during startup. Reading through the code, it looks like tls.Provision is making calls to magic.CacheUnmanagedTLSCertificate using a CertMagic configuration that does not respect DisableOCSPStapling https://github.com/caddyserver/caddy/blob/v2.4.0-beta.1/modules/caddytls/tls.go#L187.

I'm not sure what the best approach is for threading this through, especially during tls.Provision. It would be great if we could just disable this globally!

@francislavoie francislavoie added the bug 🐞 Something isn't working label Mar 15, 2021
@francislavoie francislavoie added this to the v2.4.0 milestone Mar 15, 2021
@mholt mholt removed the bug 🐞 Something isn't working label Mar 15, 2021
@mholt
Copy link
Member

mholt commented Mar 15, 2021

This is intentional, according to the original issue. OCSP stapling can only be disabled for managed (automated) certificates. For certificates you have manual control over, don't issue them with the OCSP responder field.

@mholt
Copy link
Member

mholt commented Apr 12, 2021

@cds2-stripe I went ahead and made this configurable in 2250920 -- allowing you to disable OCSP stapling for manual certificates. (Note that it does not apply to automated certificates, which use automation policies instead.)

@mholt mholt added the feature ⚙️ New feature or request label Apr 12, 2021
@cds2-stripe
Copy link
Author

Thank you! Our CA doesn't allow us to issue certificates with the OCSP responder field unset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants