Skip to content

Commit 7e35d82

Browse files
committed
Documented client certificate validation with OCSP in stream.
1 parent 17185d5 commit 7e35d82

File tree

2 files changed

+176
-2
lines changed

2 files changed

+176
-2
lines changed

xml/en/docs/stream/ngx_stream_ssl_module.xml

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<module name="Module ngx_stream_ssl_module"
1010
link="/en/docs/stream/ngx_stream_ssl_module.html"
1111
lang="en"
12-
rev="35">
12+
rev="36">
1313

1414
<section id="summary">
1515

@@ -384,6 +384,92 @@ Specifies a timeout for the SSL handshake to complete.
384384
</directive>
385385

386386

387+
<directive name="ssl_ocsp">
388+
<syntax><literal>on</literal> |
389+
<literal>off</literal> |
390+
<literal>leaf</literal></syntax>
391+
<default>off</default>
392+
<context>stream</context>
393+
<context>server</context>
394+
<appeared-in>1.27.2</appeared-in>
395+
396+
<para>
397+
Enables OCSP validation of the client certificate chain.
398+
The <literal>leaf</literal> parameter
399+
enables validation of the client certificate only.
400+
</para>
401+
402+
<para>
403+
For the OCSP validation to work,
404+
the <link id="ssl_verify_client"/> directive should be set to
405+
<literal>on</literal> or <literal>optional</literal>.
406+
</para>
407+
408+
<para>
409+
To resolve the OCSP responder hostname,
410+
the <link doc="ngx_stream_core_module.xml" id="resolver"/> directive
411+
should also be specified.
412+
</para>
413+
414+
<para>
415+
Example:
416+
<example>
417+
ssl_verify_client on;
418+
ssl_ocsp on;
419+
resolver 192.0.2.1;
420+
</example>
421+
</para>
422+
423+
</directive>
424+
425+
426+
<directive name="ssl_ocsp_cache">
427+
<syntax>
428+
<literal>off</literal> |
429+
[<literal>shared</literal>:<value>name</value>:<value>size</value>]</syntax>
430+
<default>off</default>
431+
<context>stream</context>
432+
<context>server</context>
433+
<appeared-in>1.27.2</appeared-in>
434+
435+
<para>
436+
Sets <literal>name</literal> and <literal>size</literal> of the cache
437+
that stores client certificates status for OCSP validation.
438+
The cache is shared between all worker processes.
439+
A cache with the same name can be used in several virtual servers.
440+
</para>
441+
442+
<para>
443+
The <literal>off</literal> parameter prohibits the use of the cache.
444+
</para>
445+
446+
</directive>
447+
448+
449+
<directive name="ssl_ocsp_responder">
450+
<syntax><value>url</value></syntax>
451+
<default/>
452+
<context>stream</context>
453+
<context>server</context>
454+
<appeared-in>1.27.2</appeared-in>
455+
456+
<para>
457+
Overrides the URL of the OCSP responder specified in the
458+
“<link url="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.2.1">Authority
459+
Information Access</link>” certificate extension
460+
for <link id="ssl_ocsp">validation</link> of client certificates.
461+
</para>
462+
463+
<para>
464+
Only “<literal>http://</literal>” OCSP responders are supported:
465+
<example>
466+
ssl_ocsp_responder http://ocsp.example.com/;
467+
</example>
468+
</para>
469+
470+
</directive>
471+
472+
387473
<directive name="ssl_password_file">
388474
<syntax><value>file</value></syntax>
389475
<default/>

xml/ru/docs/stream/ngx_stream_ssl_module.xml

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<module name="Модуль ngx_stream_ssl_module"
1010
link="/ru/docs/stream/ngx_stream_ssl_module.html"
1111
lang="ru"
12-
rev="35">
12+
rev="36">
1313

1414
<section id="summary">
1515

@@ -387,6 +387,94 @@ ssl_ecdh_curve prime256v1:secp384r1;
387387
</directive>
388388

389389

390+
<directive name="ssl_ocsp">
391+
<syntax><literal>on</literal> |
392+
<literal>off</literal> |
393+
<literal>leaf</literal></syntax>
394+
<default>off</default>
395+
<context>stream</context>
396+
<context>server</context>
397+
<appeared-in>1.27.2</appeared-in>
398+
399+
<para>
400+
Включает проверку OCSP для цепочки клиентских сертификатов.
401+
Параметр <literal>leaf</literal>
402+
включает проверку только клиентского сертификата.
403+
</para>
404+
405+
<para>
406+
Для работы проверки OCSP
407+
необходимо дополнительно установить значение директивы
408+
<link id="ssl_verify_client"/> в
409+
<literal>on</literal> или <literal>optional</literal>.
410+
</para>
411+
412+
<para>
413+
Для преобразования имени хоста OCSP responder’а в адрес необходимо
414+
дополнительно задать директиву
415+
<link doc="ngx_stream_core_module.xml" id="resolver"/>.
416+
</para>
417+
418+
<para>
419+
Пример:
420+
<example>
421+
ssl_verify_client on;
422+
ssl_ocsp on;
423+
resolver 192.0.2.1;
424+
</example>
425+
</para>
426+
427+
</directive>
428+
429+
430+
<directive name="ssl_ocsp_cache">
431+
<syntax>
432+
<literal>off</literal> |
433+
[<literal>shared</literal>:<value>имя</value>:<value>размер</value>]</syntax>
434+
<default>off</default>
435+
<context>stream</context>
436+
<context>server</context>
437+
<appeared-in>1.27.2</appeared-in>
438+
439+
<para>
440+
Задаёт <literal>имя</literal> и <literal>размер</literal> кэша,
441+
который хранит статус клиентских сертификатов для проверки OCSP-ответов.
442+
Кэш разделяется между всеми рабочими процессами.
443+
Кэш с одинаковым названием может использоваться в нескольких
444+
виртуальных серверах.
445+
</para>
446+
447+
<para>
448+
Параметр <literal>off</literal> запрещает использование кэша.
449+
</para>
450+
451+
</directive>
452+
453+
454+
<directive name="ssl_ocsp_responder">
455+
<syntax><value>url</value></syntax>
456+
<default/>
457+
<context>stream</context>
458+
<context>server</context>
459+
<appeared-in>1.27.2</appeared-in>
460+
461+
<para>
462+
Переопределяет URL OCSP responder’а, указанный в расширении сертификата
463+
“<link url="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.2.1">Authority
464+
Information Access</link>”
465+
для <link id="ssl_ocsp">проверки</link> клиентских сертификатов.
466+
</para>
467+
468+
<para>
469+
Поддерживаются только “<literal>http://</literal>” OCSP responder’ы:
470+
<example>
471+
ssl_ocsp_responder http://ocsp.example.com/;
472+
</example>
473+
</para>
474+
475+
</directive>
476+
477+
390478
<directive name="ssl_password_file">
391479
<syntax><value>файл</value></syntax>
392480
<default/>

0 commit comments

Comments
 (0)