-
Notifications
You must be signed in to change notification settings - Fork 519
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
Explicitly document that security.OCSP.enabled only affects OCSP fetching, not stapling #334
Comments
@smithfred good find, thanks for reporting. /* 1211: control use of OCSP responder servers to confirm current validity of certificates
* 0=disabled, 1=enabled (default), 2=enabled for EV certificates only.
* OCSP (non-stapled) leaks information about the sites you visit to the CA (cert authority)
* It's a trade-off between security (checking) and privacy (leaking info to the CA).
* [NOTE] This pref only controls OCSP fetching and does not affect OCSP stapling.
* [1] https://en.wikipedia.org/wiki/Ocsp ***/
user_pref("security.OCSP.enabled", 1);
/* 1212: set non-stapled OCSP to hard-fail
* When a CA cannot be reached to validate a cert, Firefox just continues the connection (=soft-fail).
* Setting this pref to true tells Firefox to instead terminate the connection (=hard-fail).
* For more info about the problems with soft/hard-fail (and OCSP in general) see [2].
* [NOTE] this pref is ignored if 'security.OCSP.enabled' is set to 0.
* [1] https://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox/
* [2] https://www.imperialviolet.org/2014/04/19/revchecking.html ***/
user_pref("security.OCSP.require", true); FYI mozilla set 1211 to 2 in nightly for a while but apparently it didn't produce the outcome they'd hoped because in the latest nightly the default value is 1 again. |
Looks good to me re. the note. Could optionally refer to the source code comments, but that's the Wikipedia mentality in me ("citation needed") :D Edit: also, it's arguably also worth explicitly pointing out in the comments that enabling OCSP fetching without enabling "require" is completely fucking pointless (as highlighted in [2]), resulting in the worst of all worlds (privacy+security) ;) |
Yep, that was me. I ticked the "break GitHub" box when I was submitting my comment, should I not have done that? |
so what about Mr. Fred's EDIT, Pantsky? Very eloquently written indeed, and I couldn't agree more :)
|
I only license my characterisation colourfully verbatim (last 3 words at least) 😁 |
LOL, this guy! |
|
The user might think the "unable to validate" condition would only be coincidental (e.g. OCSP server down) rather than maliciously blocked, and consider it a reasonable trade-off on that basis.
And this kind of makes my point (i.e. believing it has any use against a competent attack). With a competent attacker, and given the likely prerequisites of a revoked cert attack, they will be a position to block, and will block, access to the OCSP server. |
no humor - it's a quote from a google engineer hence the quotation marks ;) You're right though, maybe we should change it to "OCSP fetching without hard-fail is almost completely pointless" or "OCSP fetching without hard-fail is mostly pointless" or something like that. |
👍 to the 1211 title change. Big fat 👎 to the changes in 1212. |
you're right, I'm sorry mate.
why are you even in here + annoying me? ;) |
My take is soft-fail is of theoretical value only. If the cert is revoked but OCSP fetch succeeds, it's either a shit attacker (can interfere with DNS/routing to MITM to another endpoint serving the stolen cert), but doesn't know they need to prevent OCSP fetch using the same mechanism) or a useless sysadmin (still "legitimately" serving a revoked cert). And on that basis soft-fail would only be of any real-world use if there were some sort of notification of the soft-fail. Which there ain't.
I like this one. Mostly because Mostly Harmless.
|
It means you're inviting me to look after the news stand. I'll just nick it. |
No no no, digital duplication is theft, please re-insert MPAA/RIAA consumer compliance needle into brain. Also, where's the fun if I can't trash your whole repo? Boo. |
Per https://hg.mozilla.org/mozilla-central/file/bd02f1cb9f4f/security/manager/ssl/nsNSSComponent.cpp#l828, setting the above pref to false doesn't (or shouldn't) affect stapling.
Though the user.js comments are correct in describing the actual effect, the pref. name itself is inaccurate/misleading - would be useful to specifically mention this, and that setting it to false (e.g. for privacy reasons) doesn't affect the non-trash-fire version of cert verification (stapling+must-staple) ;)
The text was updated successfully, but these errors were encountered: