@@ -3,14 +3,14 @@ OCSP Support
3
3
============
4
4
5
5
:Spec Title: OCSP Support
6
- :Spec Version: 1.1.1
6
+ :Spec Version: 1.2.0
7
7
:Author: Vincent Kam
8
8
:Lead: Jeremy Mikola
9
9
:Advisory Group: Clyde Bazile *(POC author) *, Esha Bhargava *(Program Manager) *, Matt Broadstone, Bernie Hackett *(POC author) *, Shreyas Kaylan *(Server Project Lead) *, Jeremy Mikola *(Spec Lead) *
10
10
:Status: Accepted
11
11
:Type: Standards
12
12
:Minimum Server Version: 4.4
13
- :Last Modified: 2020-2-10
13
+ :Last Modified: 2020-2-26
14
14
15
15
.. contents ::
16
16
@@ -103,13 +103,17 @@ invalid, the driver SHOULD end the connection.
103
103
attempt to validate the status of the unvalidated certificates
104
104
using the cached CRLs.
105
105
106
- 7. If the server's certificate remains unvalidated and that certificate
107
- has a list of OCSP responder endpoints, the driver SHOULD send HTTP
108
- requests to the responders in parallel. The first valid response
109
- that concretely marks the certificate status as good or revoked
110
- should be used. A five-second timeout SHOULD be used for the requests.
111
- The status for a response should only be checked if the response is
112
- valid per `RFC 6960 Section 3.2 <https://tools.ietf.org/html/rfc6960#section-3.2 >`_
106
+ 7. If the server’s certificate remains unvalidated, that certificate
107
+ has a list of OCSP responder endpoints, and
108
+ ``tlsDisableOcspEndpointCheck `` is true (`if the driver supports
109
+ this option <MongoClient Configuration> `_), the driver SHOULD send
110
+ HTTP requests to the responders in parallel. The first valid
111
+ response that concretely marks the certificate status as good or
112
+ revoked should be used. A five-second timeout SHOULD be used for
113
+ the requests. The status for a response should only be checked if
114
+ the response is valid per `RFC 6960 Section 3.2
115
+ <https://tools.ietf.org/html/rfc6960#section-3.2> `_
116
+
113
117
114
118
8. If any unvalidated intermediate certificates remain and those
115
119
certificates have OCSP endpoints, for each certificate, the
@@ -138,7 +142,6 @@ Suggested OCSP Response Validation Behavior
138
142
Drivers SHOULD validate OCSP Responses in the manner specified in `RFC
139
143
6960: 3.2 <https://tools.ietf.org/html/rfc6960#section-3.2> `__ to the
140
144
extent that their TLS library allows.
141
-
142
145
Suggested OCSP Caching Behavior
143
146
-------------------------------
144
147
Drivers with sufficient control over their TLS library's OCSP
@@ -175,28 +178,69 @@ has a later ``nextUpdate`` than the response already in the cache,
175
178
drivers SHOULD replace the older entry in the cache with the fresher
176
179
response.
177
180
181
+ MongoClient Configuration
182
+ --------------------------
183
+
184
+ This specification introduces the client-level configuration option
185
+ defined below. Drivers that can, on a per MongoClient basis, disable
186
+ non-stapled OCSP while keeping stapled OCSP enabled MUST implement
187
+ this option.
188
+
189
+ tlsDisableOCSPEndpointCheck
190
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191
+
192
+ This boolean option determines whether MongoClient should refrain from
193
+ reaching out to an OCSP endpoint i.e. whether non-stapled OCSP should
194
+ be disabled. When set to true, a driver MUST NOT reach out to OCSP
195
+ endpoints. When set to false, a driver MUST reach out to xOCSP
196
+ endpoints if needed (as described in :ref: `Suggested OCSP Behavior `).
197
+ This option MUST default to false.
198
+
199
+ Naming Deviations
200
+ ^^^^^^^^^^^^^^^^^^
201
+
202
+ Drivers MUST use the defined name of ``tlsDisableOCSPEndpointCheck ``
203
+ for the connection string parameter to ensure portability of
204
+ connection strings across applications and drivers. If drivers solicit
205
+ MongoClient options through another mechanism (e.g. an options
206
+ dictionary provided to the MongoClient constructor), drivers SHOULD
207
+ use the defined name but MAY deviate to comply with their existing
208
+ conventions. For example, a driver may use
209
+ ``tls_disable_ocsp_endpoint_check `` instead of
210
+ ``tlsDisableOCSPEndpointCheck ``.
211
+
178
212
How OCSP interacts with existing configuration options
179
213
------------------------------------------------------
180
214
181
215
The following requirements apply only to drivers that are able to
182
216
enable/disable OCSP on a per MongoClient basis.
183
217
184
- 1. If a connection string specifies `tlsInsecure=true ` then the driver
185
- MUST disable OCSP.
218
+ 1. If a connection string specifies `` tlsInsecure=true `` then the
219
+ driver MUST disable OCSP.
186
220
187
- 2. If a driver supports ``tlsAllowInvalidCertificates ``, and a
221
+ 2. If a connection string contains both ``tlsInsecure `` and
222
+ ``tlsDisableOCSPEndpointCheck `` then the driver MUST throw an
223
+ error.
224
+
225
+ 3. If a driver supports ``tlsAllowInvalidCertificates ``, and a
188
226
connection string specifies ``tlsAllowInvalidCertificates=true ``,
189
227
then the driver MUST disable OCSP.
190
228
229
+ 4. If a driver supports ``tlsAllowInvalidCertificates ``, and a
230
+ connection string specifies both ``tlsAllowInvalidCertificates ``
231
+ and ``tlsDisableOCSPEndpointCheck ``, then the driver MUST
232
+ throw an error.
233
+
191
234
The remaining requirements in this section apply only to drivers that
192
235
expose an option to enable/disable certificate revocation checking on a
193
236
per MongoClient basis.
194
237
195
- 1. Driver MUST enable OCSP support (with stapling if possible) when this
196
- option is enabled.
238
+ 1. Driver MUST enable OCSP support (with stapling if possible) when
239
+ certificate revocation checking is enabled.
197
240
198
- 2. Drivers SHOULD throw an error if ``tlsInsecure=true `` or
199
- ``tlsAllowInvalidCertificates=true `` are specified alongside the
241
+ 2. Drivers SHOULD throw an error if any of ``tlsInsecure=true `` or
242
+ ``tlsAllowInvalidCertificates=true `` or
243
+ ``tlsDisableOCSPEndpointCheck=true `` is specified alongside the
200
244
option to enable certificate revocation checking.
201
245
202
246
TLS Requirements
@@ -300,18 +344,12 @@ endpoint.
300
344
Design Rationale
301
345
=================
302
346
303
- In accordance with the “\ `No Knobs” drivers
304
- mantra <https://github.com/mongodb/specifications#no-knobs> `__, we have
305
- chosen not to expose any options specifically related to OCSP to the
306
- user, although this specification does clarify how existing options
307
- should interact with OCSP.
308
-
309
- We have also chosen not to force drivers whose TLS libraries do not
310
- support OCSP/stapling “out of the box” to implement OCSP support due to
311
- the extra work and research that this might require. Similarly, this
312
- specification uses “SHOULD” more commonly (when other specs would prefer
313
- “MUST”) to account for the fact that some drivers may not be able to
314
- fully customize OCSP behavior in their TLS library.
347
+ We have chosen not to force drivers whose TLS libraries do not support
348
+ OCSP/stapling “out of the box” to implement OCSP support due to the
349
+ extra work and research that this might require. Similarly, this
350
+ specification uses “SHOULD” more commonly (when other specs would
351
+ prefer “MUST”) to account for the fact that some drivers may not be
352
+ able to fully customize OCSP behavior in their TLS library.
315
353
316
354
We are requiring drivers to support both stapled OCSP and non-stapled
317
355
OCSP in order to support revocation checking for server versions in
@@ -362,15 +400,17 @@ Backwards Compatibility
362
400
363
401
An application behind a firewall with an outbound whitelist that
364
402
upgrades to a driver implementing this specification may experience
365
- connectivity issues. This is because the driver may need to contact OCSP
366
- endpoints or CRL distribution points [1 ]_ specified in the server’s
367
- certificate and if these OCSP endpoints and/or CRL distribution points
368
- are not accessible, then the connection to the server may fail. (N.B.:
369
- TLS libraries `typically implement “soft
370
- fail” <https://blog.hboeck.de/archives/886-The-Problem-with-OCSP-Stapling-and-Must-Staple-and-why-Certificate-Revocation-is-still-broken.html> `__
403
+ connectivity issues. This is because the driver may need to contact
404
+ OCSP endpoints or CRL distribution points [1 ]_ specified in the
405
+ server’s certificate and if these OCSP endpoints and/or CRL
406
+ distribution points are not accessible, then the connection to the
407
+ server may fail. (N.B.: TLS libraries `typically implement “soft fail”
408
+ <https://blog.hboeck.de/archives/886-The-Problem-with-OCSP-Stapling-and-Must-Staple-and-why-Certificate-Revocation-is-still-broken.html> `__
371
409
such that connections can continue even if the OCSP server is
372
- inaccessible, so this issue is much more likely in the case of a server
373
- with a certificate that only contains CRL distribution points.)
410
+ inaccessible, so this issue is much more likely in the case of a
411
+ server with a certificate that only contains CRL distribution points.)
412
+ In such a scenario, connectivity may be able to be restored by
413
+ disabling non-stapled OCSP via ``tlsDisableOCSPEndpointCheck ``.
374
414
375
415
Reference Implementation
376
416
=========================
@@ -493,6 +533,17 @@ No. Although `RFC 5019, The Lightweight Online Certificate Status Protocol
493
533
allows for the configuration of a tolerance period for the acceptance of OCSP
494
534
responses after ``nextUpdate ``, this spec is not adhering to that RFC.
495
535
536
+ Why was the decision made to allow OCSP endpoint checking to be enabled/disabled via a URI option?
537
+ ---------------------------------------------------------------------------------------------------
538
+ We initially hoped that we would be able to not expose any options
539
+ specifically related to OCSP to the user, in accordance with the
540
+ “\` No Knobs” drivers mantra
541
+ <https://github.com/mongodb/specifications#no-knobs>`__. However, we
542
+ later decided that users may benefit from having the ability to
543
+ disable OCSP endpoint checking when applications are deployed behind
544
+ restrictive firewall with outbound whitelists, and this benefit is
545
+ worth adding another URI option.
546
+
496
547
Appendix
497
548
========
498
549
@@ -648,14 +699,16 @@ of checking this are:
648
699
649
700
Changelog
650
701
==========
651
- **2020-2-19 **: Clarify behavior for reaching out to OCSP responders.
702
+ **2020-2-26 **: 1.2.0: Add tlsDisableOCSPEndpointCheck URI option.
703
+
704
+ **2020-2-19 **: 1.1.1 Clarify behavior for reaching out to OCSP responders.
652
705
653
706
**2020-2-10 **: 1.1.0: Add cache requirement.
654
707
655
708
**2020-1-31 **: 1.0.2: Add SNI requirement and clarify design rationale
656
709
regarding minimizing round trips.
657
710
658
- **2020-1-28 **: Clarify behavior regarding nonces and tolerance periods.
711
+ **2020-1-28 **: 1.0.1: Clarify behavior regarding nonces and tolerance periods.
659
712
660
713
**2020-1-16 **: 1.0.0: Initial commit.
661
714
0 commit comments