rfc5019.txt 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236
  1. Network Working Group A. Deacon
  2. Request for Comments: 5019 VeriSign
  3. Category: Standards Track R. Hurst
  4. Microsoft
  5. September 2007
  6. The Lightweight Online Certificate Status Protocol (OCSP) Profile
  7. for High-Volume Environments
  8. Status of This Memo
  9. This document specifies an Internet standards track protocol for the
  10. Internet community, and requests discussion and suggestions for
  11. improvements. Please refer to the current edition of the "Internet
  12. Official Protocol Standards" (STD 1) for the standardization state
  13. and status of this protocol. Distribution of this memo is unlimited.
  14. Abstract
  15. This specification defines a profile of the Online Certificate Status
  16. Protocol (OCSP) that addresses the scalability issues inherent when
  17. using OCSP in large scale (high volume) Public Key Infrastructure
  18. (PKI) environments and/or in PKI environments that require a
  19. lightweight solution to minimize communication bandwidth and client-
  20. side processing.
  21. Deacon & Hurst Standards Track [Page 1]
  22. RFC 5019 Lightweight OCSP Profile September 2007
  23. Table of Contents
  24. 1. Introduction ....................................................3
  25. 1.1. Requirements Terminology ...................................4
  26. 2. OCSP Message Profile ............................................4
  27. 2.1. OCSP Request Profile .......................................4
  28. 2.1.1. OCSPRequest Structure ...............................4
  29. 2.1.2. Signed OCSPRequests .................................5
  30. 2.2. OCSP Response Profile ......................................5
  31. 2.2.1. OCSPResponse Structure ..............................5
  32. 2.2.2. Signed OCSPResponses ................................6
  33. 2.2.3. OCSPResponseStatus Values ...........................6
  34. 2.2.4. thisUpdate, nextUpdate, and producedAt ..............7
  35. 3. Client Behavior .................................................7
  36. 3.1. OCSP Responder Discovery ...................................7
  37. 3.2. Sending an OCSP Request ....................................7
  38. 4. Ensuring an OCSPResponse Is Fresh ...............................8
  39. 5. Transport Profile ...............................................9
  40. 6. Caching Recommendations .........................................9
  41. 6.1. Caching at the Client .....................................10
  42. 6.2. HTTP Proxies ..............................................10
  43. 6.3. Caching at Servers ........................................12
  44. 7. Security Considerations ........................................12
  45. 7.1. Replay Attacks ............................................12
  46. 7.2. Man-in-the-Middle Attacks .................................13
  47. 7.3. Impersonation Attacks .....................................13
  48. 7.4. Denial-of-Service Attacks .................................13
  49. 7.5. Modification of HTTP Headers ..............................14
  50. 7.6. Request Authentication and Authorization ..................14
  51. 8. Acknowledgements ...............................................14
  52. 9. References .....................................................14
  53. 9.1. Normative References ......................................14
  54. 9.2. Informative References ....................................15
  55. Appendix A. Example OCSP Messages .................................16
  56. A.1. OCSP Request ..............................................16
  57. A.2. OCSP Response .............................................16
  58. Deacon & Hurst Standards Track [Page 2]
  59. RFC 5019 Lightweight OCSP Profile September 2007
  60. 1. Introduction
  61. The Online Certificate Status Protocol [OCSP] specifies a mechanism
  62. used to determine the status of digital certificates, in lieu of
  63. using Certificate Revocation Lists (CRLs). Since its definition in
  64. 1999, it has been deployed in a variety of environments and has
  65. proven to be a useful certificate status checking mechanism. (For
  66. brevity we refer to OCSP as being used to verify certificate status,
  67. but only the revocation status of a certificate is checked via this
  68. protocol.)
  69. To date, many OCSP deployments have been used to ensure timely and
  70. secure certificate status information for high-value electronic
  71. transactions or highly sensitive information, such as in the banking
  72. and financial environments. As such, the requirement for an OCSP
  73. responder to respond in "real time" (i.e., generating a new OCSP
  74. response for each OCSP request) has been important. In addition,
  75. these deployments have operated in environments where bandwidth usage
  76. is not an issue, and have run on client and server systems where
  77. processing power is not constrained.
  78. As the use of PKI continues to grow and move into diverse
  79. environments, so does the need for a scalable and cost-effective
  80. certificate status mechanism. Although OCSP as currently defined and
  81. deployed meets the need of small to medium-sized PKIs that operate on
  82. powerful systems on wired networks, there is a limit as to how these
  83. OCSP deployments scale from both an efficiency and cost perspective.
  84. Mobile environments, where network bandwidth may be at a premium and
  85. client-side devices are constrained from a processing point of view,
  86. require the careful use of OCSP to minimize bandwidth usage and
  87. client-side processing complexity. [OCSPMP]
  88. PKI continues to be deployed into environments where millions if not
  89. hundreds of millions of certificates have been issued. In many of
  90. these environments, an even larger number of users (also known as
  91. relying parties) have the need to ensure that the certificate they
  92. are relying upon has not been revoked. As such, it is important that
  93. OCSP is used in such a way that ensures the load on OCSP responders
  94. and the network infrastructure required to host those responders are
  95. kept to a minimum.
  96. This document addresses the scalability issues inherent when using
  97. OCSP in PKI environments described above by defining a message
  98. profile and clarifying OCSP client and responder behavior that will
  99. permit:
  100. Deacon & Hurst Standards Track [Page 3]
  101. RFC 5019 Lightweight OCSP Profile September 2007
  102. 1) OCSP response pre-production and distribution.
  103. 2) Reduced OCSP message size to lower bandwidth usage.
  104. 3) Response message caching both in the network and on the client.
  105. It is intended that the normative requirements defined in this
  106. profile will be adopted by OCSP clients and OCSP responders operating
  107. in very large-scale (high-volume) PKI environments or PKI
  108. environments that require a lightweight solution to minimize
  109. bandwidth and client-side processing power (or both), as described
  110. above. As OCSP does not have the means to signal responder
  111. capabilities within the protocol, clients needing to differentiate
  112. between OCSP responses produced by responders conformant with this
  113. profile and those that are not need to rely on out-of-band mechanisms
  114. to determine when a responder operates according to this profile and,
  115. as such, when the requirements of this profile apply. In the case
  116. where out-of-band mechanisms may not be available, this profile
  117. ensures that interoperability will still occur between a fully
  118. conformant OCSP 2560 client and a responder that is operating in a
  119. mode as described in this specification.
  120. 1.1. Requirements Terminology
  121. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  122. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  123. document are to be interpreted as described in [RFC2119].
  124. 2. OCSP Message Profile
  125. This section defines a subset of OCSPRequest and OCSPResponse
  126. functionality as defined in [OCSP].
  127. 2.1. OCSP Request Profile
  128. 2.1.1. OCSPRequest Structure
  129. OCSPRequests conformant to this profile MUST include only one Request
  130. in the OCSPRequest.RequestList structure.
  131. Clients MUST use SHA1 as the hashing algorithm for the
  132. CertID.issuerNameHash and the CertID.issuerKeyHash values.
  133. Clients MUST NOT include the singleRequestExtensions structure.
  134. Clients SHOULD NOT include the requestExtensions structure. If a
  135. requestExtensions structure is included, this profile RECOMMENDS that
  136. it contain only the nonce extension (id-pkix-ocsp-nonce). See
  137. Section 4 for issues concerning the use of a nonce in high-volume
  138. OCSP environments.
  139. Deacon & Hurst Standards Track [Page 4]
  140. RFC 5019 Lightweight OCSP Profile September 2007
  141. 2.1.2. Signed OCSPRequests
  142. Clients SHOULD NOT send signed OCSPRequests. Responders MAY ignore
  143. the signature on OCSPRequests.
  144. If the OCSPRequest is signed, the client SHALL specify its name in
  145. the OCSPRequest.requestorName field; otherwise, clients SHOULD NOT
  146. include the requestorName field in the OCSPRequest. OCSP servers
  147. MUST be prepared to receive unsigned OCSP requests that contain the
  148. requestorName field, but must realize that the provided value is not
  149. authenticated.
  150. 2.2. OCSP Response Profile
  151. 2.2.1. OCSPResponse Structure
  152. Responders MUST generate a BasicOCSPResponse as identified by the
  153. id-pkix-ocsp-basic OID. Clients MUST be able to parse and accept a
  154. BasicOCSPResponse. OCSPResponses conformant to this profile SHOULD
  155. include only one SingleResponse in the ResponseData.responses
  156. structure, but MAY include additional SingleResponse elements if
  157. necessary to improve response pre-generation performance or cache
  158. efficiency.
  159. The responder SHOULD NOT include responseExtensions. As specified in
  160. [OCSP], clients MUST ignore unrecognized non-critical
  161. responseExtensions in the response.
  162. In the case where a responder does not have the ability to respond to
  163. an OCSP request containing a option not supported by the server, it
  164. SHOULD return the most complete response it can. For example, in the
  165. case where a responder only supports pre-produced responses and does
  166. not have the ability to respond to an OCSP request containing a
  167. nonce, it SHOULD return a response that does not include a nonce.
  168. Clients SHOULD attempt to process a response even if the response
  169. does not include a nonce. See Section 4 for details on validating
  170. responses that do not contain a nonce. See also Section 7 for
  171. relevant security considerations.
  172. Responders that do not have the ability to respond to OCSP requests
  173. that contain an unsupported option such as a nonce MAY forward the
  174. request to an OCSP responder capable of doing so.
  175. The responder MAY include the singleResponse.singleResponse
  176. extensions structure.
  177. Deacon & Hurst Standards Track [Page 5]
  178. RFC 5019 Lightweight OCSP Profile September 2007
  179. 2.2.2. Signed OCSPResponses
  180. Clients MUST validate the signature on the returned OCSPResponse.
  181. If the response is signed by a delegate of the issuing certification
  182. authority (CA), a valid responder certificate MUST be referenced in
  183. the BasicOCSPResponse.certs structure.
  184. It is RECOMMENDED that the OCSP responder's certificate contain the
  185. id-pkix-ocsp-nocheck extension, as defined in [OCSP], to indicate to
  186. the client that it need not check the certificate's status. In
  187. addition, it is RECOMMENDED that neither an OCSP authorityInfoAccess
  188. (AIA) extension nor cRLDistributionPoints (CRLDP) extension be
  189. included in the OCSP responder's certificate. Accordingly, the
  190. responder's signing certificate SHOULD be relatively short-lived and
  191. renewed regularly.
  192. Clients MUST be able to identify OCSP responder certificates using
  193. both the byName and byKey ResponseData.ResponderID choices.
  194. Responders SHOULD use byKey to further reduce the size of the
  195. response in scenarios where reducing bandwidth is an issue.
  196. 2.2.3. OCSPResponseStatus Values
  197. As long as the OCSP infrastructure has authoritative records for a
  198. particular certificate, an OCSPResponseStatus of "successful" will be
  199. returned. When access to authoritative records for a particular
  200. certificate is not available, the responder MUST return an
  201. OCSPResponseStatus of "unauthorized". As such, this profile extends
  202. the RFC 2560 [OCSP] definition of "unauthorized" as follows:
  203. The response "unauthorized" is returned in cases where the client
  204. is not authorized to make this query to this server or the server
  205. is not capable of responding authoritatively.
  206. For example, OCSP responders that do not have access to authoritative
  207. records for a requested certificate, such as those that generate and
  208. distribute OCSP responses in advance and thus do not have the ability
  209. to properly respond with a signed "successful" yet "unknown"
  210. response, will respond with an OCSPResponseStatus of "unauthorized".
  211. Also, in order to ensure the database of revocation information does
  212. not grow unbounded over time, the responder MAY remove the status
  213. records of expired certificates. Requests from clients for
  214. certificates whose record has been removed will result in an
  215. OCSPResponseStatus of "unauthorized".
  216. Security considerations regarding the use of unsigned responses are
  217. discussed in [OCSP].
  218. Deacon & Hurst Standards Track [Page 6]
  219. RFC 5019 Lightweight OCSP Profile September 2007
  220. 2.2.4. thisUpdate, nextUpdate, and producedAt
  221. When pre-producing OCSPResponse messages, the responder MUST set the
  222. thisUpdate, nextUpdate, and producedAt times as follows:
  223. thisUpdate The time at which the status being indicated is known
  224. to be correct.
  225. nextUpdate The time at or before which newer information will be
  226. available about the status of the certificate.
  227. Responders MUST always include this value to aid in
  228. response caching. See Section 6 for additional
  229. information on caching.
  230. producedAt The time at which the OCSP response was signed.
  231. Note: In many cases the value of thisUpdate and producedAt will be
  232. the same.
  233. For the purposes of this profile, ASN.1-encoded GeneralizedTime
  234. values such as thisUpdate, nextUpdate, and producedAt MUST be
  235. expressed Greenwich Mean Time (Zulu) and MUST include seconds (i.e.,
  236. times are YYYYMMDDHHMMSSZ), even where the number of seconds is zero.
  237. GeneralizedTime values MUST NOT include fractional seconds.
  238. 3. Client Behavior
  239. 3.1. OCSP Responder Discovery
  240. Clients MUST support the authorityInfoAccess extension as defined in
  241. [PKIX] and MUST recognize the id-ad-ocsp access method. This enables
  242. CAs to inform clients how they can contact the OCSP service.
  243. In the case where a client is checking the status of a certificate
  244. that contains both an authorityInformationAccess (AIA) extension
  245. pointing to an OCSP responder and a cRLDistributionPoints extension
  246. pointing to a CRL, the client SHOULD attempt to contact the OCSP
  247. responder first. Clients MAY attempt to retrieve the CRL if no
  248. OCSPResponse is received from the responder after a locally
  249. configured timeout and number of retries.
  250. 3.2. Sending an OCSP Request
  251. To avoid needless network traffic, applications MUST verify the
  252. signature of signed data before asking an OCSP client to check the
  253. status of certificates used to verify the data. If the signature is
  254. invalid or the application is not able to verify it, an OCSP check
  255. MUST NOT be requested.
  256. Deacon & Hurst Standards Track [Page 7]
  257. RFC 5019 Lightweight OCSP Profile September 2007
  258. Similarly, an application MUST validate the signature on certificates
  259. in a chain, before asking an OCSP client to check the status of the
  260. certificate. If the certificate signature is invalid or the
  261. application is not able to verify it, an OCSP check MUST NOT be
  262. requested. Clients SHOULD NOT make a request to check the status of
  263. expired certificates.
  264. 4. Ensuring an OCSPResponse Is Fresh
  265. In order to ensure that a client does not accept an out-of-date
  266. response that indicates a 'good' status when in fact there is a more
  267. up-to-date response that specifies the status of 'revoked', a client
  268. must ensure the responses they receive are fresh.
  269. In general, two mechanisms are available to clients to ensure a
  270. response is fresh. The first uses nonces, and the second is based on
  271. time. In order for time-based mechanisms to work, both clients and
  272. responders MUST have access to an accurate source of time.
  273. Because this profile specifies that clients SHOULD NOT include a
  274. requestExtensions structure in OCSPRequests (see Section 2.1),
  275. clients MUST be able to determine OCSPResponse freshness based on an
  276. accurate source of time. Clients that opt to include a nonce in the
  277. request SHOULD NOT reject a corresponding OCSPResponse solely on the
  278. basis of the nonexistent expected nonce, but MUST fall back to
  279. validating the OCSPResponse based on time.
  280. Clients that do not include a nonce in the request MUST ignore any
  281. nonce that may be present in the response.
  282. Clients MUST check for the existence of the nextUpdate field and MUST
  283. ensure the current time, expressed in GMT time as described in
  284. Section 2.2.4, falls between the thisUpdate and nextUpdate times. If
  285. the nextUpdate field is absent, the client MUST reject the response.
  286. If the nextUpdate field is present, the client MUST ensure that it is
  287. not earlier than the current time. If the current time on the client
  288. is later than the time specified in the nextUpdate field, the client
  289. MUST reject the response as stale. Clients MAY allow configuration
  290. of a small tolerance period for acceptance of responses after
  291. nextUpdate to handle minor clock differences relative to responders
  292. and caches. This tolerance period should be chosen based on the
  293. accuracy and precision of time synchronization technology available
  294. to the calling application environment. For example, Internet peers
  295. with low latency connections typically expect NTP time
  296. synchronization to keep them accurate within parts of a second;
  297. higher latency environments or where an NTP analogue is not available
  298. may have to be more liberal in their tolerance.
  299. Deacon & Hurst Standards Track [Page 8]
  300. RFC 5019 Lightweight OCSP Profile September 2007
  301. See the security considerations in Section 7 for additional details
  302. on replay and man-in-the-middle attacks.
  303. 5. Transport Profile
  304. The OCSP responder MUST support requests and responses over HTTP.
  305. When sending requests that are less than or equal to 255 bytes in
  306. total (after encoding) including the scheme and delimiters (http://),
  307. server name and base64-encoded OCSPRequest structure, clients MUST
  308. use the GET method (to enable OCSP response caching). OCSP requests
  309. larger than 255 bytes SHOULD be submitted using the POST method. In
  310. all cases, clients MUST follow the descriptions in A.1.1 of [OCSP]
  311. when constructing these messages.
  312. When constructing a GET message, OCSP clients MUST base64 encode the
  313. OCSPRequest structure and append it to the URI specified in the AIA
  314. extension [PKIX]. Clients MUST NOT include CR or LF characters in
  315. the base64-encoded string. Clients MUST properly URL-encode the
  316. base64 encoded OCSPRequest. For example:
  317. http://ocsp.example.com/MEowSDBGMEQwQjAKBggqhkiG9w0CBQQQ7sp6GTKpL
  318. 2dAdeGaW267owQQqInESWQD0mGeBArSgv%2FBWQIQLJx%2Fg9xF8oySYzol80Mbpg
  319. %3D%3D
  320. In response to properly formatted OCSPRequests that are cachable
  321. (i.e., responses that contain a nextUpdate value), the responder will
  322. include the binary value of the DER encoding of the OCSPResponse
  323. preceded by the following HTTP [HTTP] headers.
  324. content-type: application/ocsp-response
  325. content-length: <OCSP response length>
  326. last-modified: <producedAt [HTTP] date>
  327. ETag: "<strong validator>"
  328. expires: <nextUpdate [HTTP] date>
  329. cache-control: max-age=<n>, public, no-transform, must-revalidate
  330. date: <current [HTTP] date>
  331. See Section 6.2 for details on the use of these headers.
  332. 6. Caching Recommendations
  333. The ability to cache OCSP responses throughout the network is an
  334. important factor in high volume OCSP deployments. This section
  335. discusses the recommended caching behavior of OCSP clients and HTTP
  336. proxies and the steps that should be taken to minimize the number of
  337. times that OCSP clients "hit the wire". In addition, the concept of
  338. including OCSP responses in protocol exchanges (aka stapling or
  339. piggybacking), such as has been defined in TLS, is also discussed.
  340. Deacon & Hurst Standards Track [Page 9]
  341. RFC 5019 Lightweight OCSP Profile September 2007
  342. 6.1. Caching at the Client
  343. To minimize bandwidth usage, clients MUST locally cache authoritative
  344. OCSP responses (i.e., a response with a signature that has been
  345. successfully validated and that indicate an OCSPResponseStatus of
  346. 'successful').
  347. Most OCSP clients will send OCSPRequests at or near the nextUpdate
  348. time (when a cached response expires). To avoid large spikes in
  349. responder load that might occur when many clients refresh cached
  350. responses for a popular certificate, responders MAY indicate when the
  351. client should fetch an updated OCSP response by using the cache-
  352. control:max-age directive. Clients SHOULD fetch the updated OCSP
  353. Response on or after the max-age time. To ensure that clients
  354. receive an updated OCSP response, OCSP responders MUST refresh the
  355. OCSP response before the max-age time.
  356. 6.2. HTTP Proxies
  357. The responder SHOULD set the HTTP headers of the OCSP response in
  358. such a way as to allow for the intelligent use of intermediate HTTP
  359. proxy servers. See [HTTP] for the full definition of these headers
  360. and the proper format of any date and time values.
  361. HTTP Header Description
  362. =========== ====================================================
  363. date The date and time at which the OCSP server generated
  364. the HTTP response.
  365. last-modified This value specifies the date and time at which the
  366. OCSP responder last modified the response. This date
  367. and time will be the same as the thisUpdate timestamp
  368. in the request itself.
  369. expires Specifies how long the response is considered fresh.
  370. This date and time will be the same as the nextUpdate
  371. timestamp in the OCSP response itself.
  372. ETag A string that identifies a particular version of the
  373. associated data. This profile RECOMMENDS that the
  374. ETag value be the ASCII HEX representation of the
  375. SHA1 hash of the OCSPResponse structure.
  376. cache-control Contains a number of caching directives.
  377. * max-age=<n> -where n is a time value later than
  378. thisUpdate but earlier than
  379. nextUpdate.
  380. Deacon & Hurst Standards Track [Page 10]
  381. RFC 5019 Lightweight OCSP Profile September 2007
  382. * public -makes normally uncachable response
  383. cachable by both shared and nonshared
  384. caches.
  385. * no-transform -specifies that a proxy cache cannot
  386. change the type, length, or encoding
  387. of the object content.
  388. * must-revalidate -prevents caches from intentionally
  389. returning stale responses.
  390. OCSP responders MUST NOT include a "Pragma: no-cache", "Cache-
  391. Control: no-cache", or "Cache-Control: no-store" header in
  392. authoritative OCSP responses.
  393. OCSP responders SHOULD include one or more of these headers in non-
  394. authoritative OCSP responses.
  395. For example, assume that an OCSP response has the following timestamp
  396. values:
  397. thisUpdate = May 1, 2005 01:00:00 GMT
  398. nextUpdate = May 3, 2005 01:00:00 GMT
  399. productedAt = May 1, 2005 01:00:00 GMT
  400. and that an OCSP client requests the response on May 2, 2005 01:00:00
  401. GMT. In this scenario, the HTTP response may look like this:
  402. content-type: application/ocsp-response
  403. content-length: 1000
  404. date: Fri, 02 May 2005 01:00:00 GMT
  405. last-modified: Thu, 01 May 2005 01:00:00 GMT
  406. ETag: "c66c0341abd7b9346321d5470fd0ec7cc4dae713"
  407. expires: Sat, 03 May 2005 01:00:00 GMT
  408. cache-control: max-age=86000,public,no-transform,must-revalidate
  409. <...>
  410. OCSP clients MUST NOT include a no-cache header in OCSP request
  411. messages, unless the client encounters an expired response which may
  412. be a result of an intermediate proxy caching stale data. In this
  413. situation, clients SHOULD resend the request specifying that proxies
  414. should be bypassed by including an appropriate HTTP header in the
  415. request (i.e., Pragma: no-cache or Cache-Control: no-cache).
  416. Deacon & Hurst Standards Track [Page 11]
  417. RFC 5019 Lightweight OCSP Profile September 2007
  418. 6.3. Caching at Servers
  419. In some scenarios, it is advantageous to include OCSP response
  420. information within the protocol being utilized between the client and
  421. server. Including OCSP responses in this manner has a few attractive
  422. effects.
  423. First, it allows for the caching of OCSP responses on the server,
  424. thus lowering the number of hits to the OCSP responder.
  425. Second, it enables certificate validation in the event the client is
  426. not connected to a network and thus eliminates the need for clients
  427. to establish a new HTTP session with the responder.
  428. Third, it reduces the number of round trips the client needs to make
  429. in order to complete a handshake.
  430. Fourth, it simplifies the client-side OCSP implementation by enabling
  431. a situation where the client need only the ability to parse and
  432. recognize OCSP responses.
  433. This functionality has been specified as an extension to the TLS
  434. [TLS] protocol in Section 3.6 [TLSEXT], but can be applied to any
  435. client-server protocol.
  436. This profile RECOMMENDS that both TLS clients and servers implement
  437. the certificate status request extension mechanism for TLS.
  438. Further information regarding caching issues can be obtained from RFC
  439. 3143 [RFC3143].
  440. 7. Security Considerations
  441. The following considerations apply in addition to the security
  442. considerations addressed in Section 5 of [OCSP].
  443. 7.1. Replay Attacks
  444. Because the use of nonces in this profile is optional, there is a
  445. possibility that an out of date OCSP response could be replayed, thus
  446. causing a client to accept a good response when in fact there is a
  447. more up-to-date response that specifies the status of revoked. In
  448. order to mitigate this attack, clients MUST have access to an
  449. accurate source of time and ensure that the OCSP responses they
  450. receive are sufficiently fresh.
  451. Deacon & Hurst Standards Track [Page 12]
  452. RFC 5019 Lightweight OCSP Profile September 2007
  453. Clients that do not have an accurate source of date and time are
  454. vulnerable to service disruption. For example, a client with a
  455. sufficiently fast clock may reject a fresh OCSP response. Similarly
  456. a client with a sufficiently slow clock may incorrectly accept
  457. expired valid responses for certificates that may in fact be revoked.
  458. Future versions of the OCSP protocol may provide a way for the client
  459. to know whether the server supports nonces or does not support
  460. nonces. If a client can determine that the server supports nonces,
  461. it MUST reject a reply that does not contain an expected nonce.
  462. Otherwise, clients that opt to include a nonce in the request SHOULD
  463. NOT reject a corresponding OCSPResponse solely on the basis of the
  464. nonexistent expected nonce, but MUST fall back to validating the
  465. OCSPResponse based on time.
  466. 7.2. Man-in-the-Middle Attacks
  467. To mitigate risk associated with this class of attack, the client
  468. must properly validate the signature on the response.
  469. The use of signed responses in OCSP serves to authenticate the
  470. identity of the OCSP responder and to verify that it is authorized to
  471. sign responses on the CA's behalf.
  472. Clients MUST ensure that they are communicating with an authorized
  473. responder by the rules described in [OCSP], Section 4.2.2.2.
  474. 7.3. Impersonation Attacks
  475. The use of signed responses in OCSP serves to authenticate the
  476. identity of OCSP responder.
  477. As detailed in [OCSP], clients must properly validate the signature
  478. of the OCSP response and the signature on the OCSP response signer
  479. certificate to ensure an authorized responder created it.
  480. 7.4. Denial-of-Service Attacks
  481. OCSP responders should take measures to prevent or mitigate denial-
  482. of-service attacks. As this profile specifies the use of unsigned
  483. OCSPRequests, access to the responder may be implicitly given to
  484. everyone who can send a request to a responder, and thus the ability
  485. to mount a denial-of-service attack via a flood of requests may be
  486. greater. For example, a responder could limit the rate of incoming
  487. requests from a particular IP address if questionable behavior is
  488. detected.
  489. Deacon & Hurst Standards Track [Page 13]
  490. RFC 5019 Lightweight OCSP Profile September 2007
  491. 7.5. Modification of HTTP Headers
  492. Values included in HTTP headers, as described in Sections 5 and 6,
  493. are not cryptographically protected; they may be manipulated by an
  494. attacker. Clients SHOULD use these values for caching guidance only
  495. and ultimately SHOULD rely only on the values present in the signed
  496. OCSPResponse. Clients SHOULD NOT rely on cached responses beyond the
  497. nextUpdate time.
  498. 7.6. Request Authentication and Authorization
  499. The suggested use of unsigned requests in this environment removes an
  500. option that allows the responder to determine the authenticity of
  501. incoming request. Thus, access to the responder may be implicitly
  502. given to everyone who can send a request to a responder.
  503. Environments where explicit authorization to access the OCSP
  504. responder is necessary can utilize other mechanisms to authenticate
  505. requestors or restrict or meter service.
  506. 8. Acknowledgements
  507. The authors wish to thank Magnus Nystrom of RSA Security, Inc.,
  508. Jagjeet Sondh of Vodafone Group R&D, and David Engberg of CoreStreet,
  509. Ltd. for their contributions to this specification.
  510. 9. References
  511. 9.1. Normative References
  512. [HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter,
  513. L., Leach, P., and T. Berners-Lee, "Hypertext Transfer
  514. Protocol -- HTTP/1.1", RFC 2616, June 1999.
  515. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  516. Requirement Levels", BCP 14, RFC 2119, March 1997.
  517. [OCSP] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C.
  518. Adams, "X.509 Internet Public Key Infrastructure: Online
  519. Certificate Status Protocol - OCSP", RFC 2560, June 1999.
  520. [PKIX] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet
  521. Public Key Infrastructure - Certificate and Certificate
  522. Revocation List (CRL) Profile", RFC 3280, April 2002.
  523. [TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security
  524. Protocol Version 1.1", RFC 4346, April 2006.
  525. Deacon & Hurst Standards Track [Page 14]
  526. RFC 5019 Lightweight OCSP Profile September 2007
  527. [TLSEXT] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
  528. and T. Wright, "Transport Layer Security (TLS) Extensions",
  529. RFC 4366, April 2006.
  530. 9.2. Informative References
  531. [OCSPMP] "OCSP Mobile Profile V1.0", Open Mobile Alliance,
  532. www.openmobilealliance.org.
  533. [RFC3143] Cooper, I. and J. Dilley, "Known HTTP Proxy/Caching
  534. Problems", RFC 3143, June 2001.
  535. Deacon & Hurst Standards Track [Page 15]
  536. RFC 5019 Lightweight OCSP Profile September 2007
  537. Appendix A. Example OCSP Messages
  538. A.1. OCSP Request
  539. SEQUENCE {
  540. SEQUENCE {
  541. SEQUENCE {
  542. SEQUENCE {
  543. SEQUENCE {
  544. SEQUENCE {
  545. OBJECT IDENTIFIER sha1 (1 3 14 3 2 26)
  546. NULL
  547. }
  548. OCTET STRING
  549. C0 FE 02 78 FC 99 18 88 91 B3 F2 12 E9 C7 E1 B2
  550. 1A B7 BF C0
  551. OCTET STRING
  552. 0D FC 1D F0 A9 E0 F0 1C E7 F2 B2 13 17 7E 6F 8D
  553. 15 7C D4 F6
  554. INTEGER
  555. 09 34 23 72 E2 3A EF 46 7C 83 2D 07 F8 DC 22 BA
  556. }
  557. }
  558. }
  559. }
  560. }
  561. A.2. OCSP Response
  562. SEQUENCE {
  563. ENUMERATED 0
  564. [0] {
  565. SEQUENCE {
  566. OBJECT IDENTIFIER ocspBasic (1 3 6 1 5 5 7 48 1 1)
  567. OCTET STRING, encapsulates {
  568. SEQUENCE {
  569. SEQUENCE {
  570. [0] {
  571. INTEGER 0
  572. }
  573. [1] {
  574. SEQUENCE {
  575. SET {
  576. SEQUENCE {
  577. OBJECT IDENTIFIER organizationName (2 5 4 10)
  578. PrintableString 'Example Trust Network'
  579. }
  580. }
  581. Deacon & Hurst Standards Track [Page 16]
  582. RFC 5019 Lightweight OCSP Profile September 2007
  583. SET {
  584. SEQUENCE {
  585. OBJECT IDENTIFIER
  586. organizationalUnitName (2 5 4 11)
  587. PrintableString 'Example, Inc.'
  588. }
  589. }
  590. SET {
  591. SEQUENCE {
  592. OBJECT IDENTIFIER
  593. organizationalUnitName (2 5 4 11)
  594. PrintableString
  595. 'Example OCSP Responder'
  596. }
  597. }
  598. }
  599. }
  600. GeneralizedTime 07/11/2005 23:52:44 GMT
  601. SEQUENCE {
  602. SEQUENCE {
  603. SEQUENCE {
  604. SEQUENCE {
  605. OBJECT IDENTIFIER sha1 (1 3 14 3 2 26)
  606. NULL
  607. }
  608. OCTET STRING
  609. C0 FE 02 78 FC 99 18 88 91 B3 F2 12 E9 C7 E1 B2
  610. 1A B7 BF C0
  611. OCTET STRING
  612. 0D FC 1D F0 A9 E0 F0 1C E7 F2 B2 13 17 7E 6F 8D
  613. 15 7C D4 F6
  614. INTEGER
  615. 09 34 23 72 E2 3A EF 46 7C 83 2D 07 F8 DC 22 BA
  616. }
  617. [0]
  618. Error: Object has zero length.
  619. GeneralizedTime 07/11/2005 23:52:44 GMT
  620. [0] {
  621. GeneralizedTime 14/11/2005 23:52:44 GMT
  622. }
  623. }
  624. }
  625. }
  626. SEQUENCE {
  627. OBJECT IDENTIFIER
  628. sha1withRSAEncryption (1 2 840 113549 1 1 5)
  629. NULL
  630. }
  631. Deacon & Hurst Standards Track [Page 17]
  632. RFC 5019 Lightweight OCSP Profile September 2007
  633. BIT STRING
  634. 0E 9F F0 52 B1 A7 42 B8 6E C1 35 E1 0E D5 A9 E2
  635. F5 C5 3C 16 B1 A3 A7 A2 03 8A 2B 4D 2C F1 B4 98
  636. 8E 19 DB BA 1E 1E 72 FF 32 F4 44 E0 B2 77 1C D7
  637. 3C 9E 78 F3 D1 82 68 86 63 12 7F A4 6F F0 4D 84
  638. EA F8 E2 F7 5D E3 48 44 57 28 80 C7 57 3C FE E1
  639. 42 0E 5E 17 FC 60 D8 05 D9 EF E2 53 E7 AB 7F 3A
  640. A8 84 AA 5E 46 5B E7 B8 1F C6 B1 35 AD FF D1 CC
  641. BA 58 7D E8 29 60 79 F7 41 02 EA E0 82 0E A6 30
  642. [0] {
  643. SEQUENCE {
  644. SEQUENCE {
  645. SEQUENCE {
  646. [0] {
  647. INTEGER 2
  648. }
  649. INTEGER
  650. 49 4A 02 37 1B 1E 70 67 41 6C 9F 06 2F D8 FE DA
  651. SEQUENCE {
  652. OBJECT IDENTIFIER
  653. sha1withRSAEncryption (1 2 840 113549 1 1 5)
  654. NULL
  655. }
  656. SEQUENCE {
  657. SET {
  658. SEQUENCE {
  659. OBJECT IDENTIFIER
  660. organizationName (2 5 4 10)
  661. PrintableString 'Example Trust Network'
  662. }
  663. }
  664. SET {
  665. SEQUENCE {
  666. OBJECT IDENTIFIER
  667. organizationalUnitName (2 5 4 11)
  668. PrintableString 'Example, Inc.'
  669. }
  670. }
  671. SET {
  672. SEQUENCE {
  673. OBJECT IDENTIFIER
  674. organizationalUnitName (2 5 4 11)
  675. PrintableString
  676. 'Example CA'
  677. }
  678. }
  679. }
  680. SEQUENCE {
  681. Deacon & Hurst Standards Track [Page 18]
  682. RFC 5019 Lightweight OCSP Profile September 2007
  683. UTCTime 08/10/2005 00:00:00 GMT
  684. UTCTime 06/01/2006 23:59:59 GMT
  685. }
  686. SEQUENCE {
  687. SET {
  688. SEQUENCE {
  689. OBJECT IDENTIFIER
  690. organizationName (2 5 4 10)
  691. PrintableString 'Example Trust Network'
  692. }
  693. }
  694. SET {
  695. SEQUENCE {
  696. OBJECT IDENTIFIER
  697. organizationalUnitName (2 5 4 11)
  698. PrintableString 'Example, Inc.'
  699. }
  700. }
  701. SET {
  702. SEQUENCE {
  703. OBJECT IDENTIFIER
  704. organizationalUnitName (2 5 4 11)
  705. PrintableString
  706. 'Example OCSP Responder'
  707. }
  708. }
  709. }
  710. SEQUENCE {
  711. SEQUENCE {
  712. OBJECT IDENTIFIER
  713. rsaEncryption (1 2 840 113549 1 1 1)
  714. NULL
  715. }
  716. BIT STRING, encapsulates {
  717. SEQUENCE {
  718. INTEGER
  719. 00 AF C9 7A F5 09 CA D1 08 8C 82 6D AC D9 63 4D
  720. D2 64 17 79 CB 1E 1C 1C 0C 6E 28 56 B5 16 4A 4A
  721. 00 1A C1 B0 74 D7 B4 55 9D 2A 99 1F 0E 4A E3 5F
  722. 81 AF 8D 07 23 C3 30 28 61 3F B0 C8 1D 4E A8 9C
  723. A6 32 B4 D2 63 EC F7 C1 55 7A 73 2A 51 99 00 D5
  724. 0F B2 4E 11 5B 83 55 83 4C 0E DD 12 0C BD 7E 41
  725. 04 3F 5F D9 2A 65 88 3C 2A BA 20 76 1D 1F 59 3E
  726. D1 85 F7 4B E2 81 50 9C 78 96 1B 37 73 12 1A D2
  727. [ Another 1 bytes skipped ]
  728. INTEGER 65537
  729. }
  730. }
  731. Deacon & Hurst Standards Track [Page 19]
  732. RFC 5019 Lightweight OCSP Profile September 2007
  733. }
  734. [3] {
  735. SEQUENCE {
  736. SEQUENCE {
  737. OBJECT IDENTIFIER
  738. basicConstraints (2 5 29 19)
  739. OCTET STRING, encapsulates {
  740. SEQUENCE {}
  741. }
  742. }
  743. SEQUENCE {
  744. OBJECT IDENTIFIER extKeyUsage (2 5 29 37)
  745. OCTET STRING, encapsulates {
  746. SEQUENCE {
  747. OBJECT IDENTIFIER
  748. ocspSigning (1 3 6 1 5 5 7 3 9)
  749. }
  750. }
  751. }
  752. SEQUENCE {
  753. OBJECT IDENTIFIER keyUsage (2 5 29 15)
  754. OCTET STRING, encapsulates {
  755. BIT STRING 7 unused bits
  756. '1'B (bit 0)
  757. }
  758. }
  759. SEQUENCE {
  760. OBJECT IDENTIFIER
  761. ocspNoCheck (1 3 6 1 5 5 7 48 1 5)
  762. OCTET STRING, encapsulates {
  763. NULL
  764. }
  765. }
  766. }
  767. }
  768. }
  769. SEQUENCE {
  770. OBJECT IDENTIFIER
  771. sha1withRSAEncryption (1 2 840 113549 1 1 5)
  772. NULL
  773. }
  774. BIT STRING
  775. 3A 68 5F 6A F8 87 36 4A E2 22 46 5C C8 F5 0E CE
  776. 1A FA F2 25 E1 51 AB 37 BE D4 10 C8 15 93 39 73
  777. C8 59 0F F0 39 67 29 C2 60 20 F7 3F FE A0 37 AB
  778. 80 0B F9 3D 38 D4 48 67 E4 FA FD 4E 12 BF 55 29
  779. 14 E9 CC CB DD 13 82 E9 C4 4D D3 85 33 C1 35 E5
  780. 8F 38 01 A7 F7 FD EB CD DE F2 F7 85 86 AE E3 1B
  781. Deacon & Hurst Standards Track [Page 20]
  782. RFC 5019 Lightweight OCSP Profile September 2007
  783. 9C FD 1D 07 E5 28 F2 A0 5E AC BF 9E 0B 34 A1 B4
  784. 3A A9 0E C5 8A 34 3F 65 D3 10 63 A4 5E 21 71 5A
  785. }
  786. }
  787. }
  788. }
  789. }
  790. }
  791. }
  792. }
  793. Authors' Addresses
  794. Alex Deacon
  795. VeriSign, Inc.
  796. 487 E. Middlefield Road
  797. Mountain View, CA 94043
  798. USA
  799. Phone: 1-650-426-3478
  800. EMail: alex@verisign.com
  801. Ryan Hurst
  802. Microsoft
  803. One Microsoft Way
  804. Redmond, WA 98052
  805. USA
  806. Phone: 1-425-707-8979
  807. EMail: rmh@microsoft.com
  808. Deacon & Hurst Standards Track [Page 21]
  809. RFC 5019 Lightweight OCSP Profile September 2007
  810. Full Copyright Statement
  811. Copyright (C) The IETF Trust (2007).
  812. This document is subject to the rights, licenses and restrictions
  813. contained in BCP 78, and except as set forth therein, the authors
  814. retain all their rights.
  815. This document and the information contained herein are provided on an
  816. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  817. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
  818. THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
  819. OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
  820. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  821. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  822. Intellectual Property
  823. The IETF takes no position regarding the validity or scope of any
  824. Intellectual Property Rights or other rights that might be claimed to
  825. pertain to the implementation or use of the technology described in
  826. this document or the extent to which any license under such rights
  827. might or might not be available; nor does it represent that it has
  828. made any independent effort to identify any such rights. Information
  829. on the procedures with respect to rights in RFC documents can be
  830. found in BCP 78 and BCP 79.
  831. Copies of IPR disclosures made to the IETF Secretariat and any
  832. assurances of licenses to be made available, or the result of an
  833. attempt made to obtain a general license or permission for the use of
  834. such proprietary rights by implementers or users of this
  835. specification can be obtained from the IETF on-line IPR repository at
  836. http://www.ietf.org/ipr.
  837. The IETF invites any interested party to bring to its attention any
  838. copyrights, patents or patent applications, or other proprietary
  839. rights that may cover technology that may be required to implement
  840. this standard. Please address the information to the IETF at
  841. ietf-ipr@ietf.org.
  842. Deacon & Hurst Standards Track [Page 22]