ssl_multicert.config

ssl_multicert.config ファイルでは Traffic Server が SSL セッションのターミネーションを行うために複数の SSL サーバー証明書を使用する設定を行えます。一つ以上の IP アドレスを割り当てた Traffic Server システム をもっている場合、クライアントが特定の IP アドレスもしくはホスト名をリクエストした際に異なる SSL 証明書が利用されるように割り当てることができます。

設定時、証明書は証明書のサブジェクトとすべての DNS サブジェクト別名 を展開するためにパースされます。証明書は証明書内にあるどれかのホスト名を要求する接続で渡されます。ワイルドカードの名前は、*.domain.com という形式のみ、すなわち * がドメインの一番左にあるもののみサポートされています。

ssl_multicert.config への変更は traffic_ctl config reload の使用により実行中の Traffic Server に適用できます。

フォーマット

ssl_multicert.config の各行は Traffic Server が特定の SSL 証明書をどう使用すべきかを指定する key=value フィールドの連続で成っています。

ssl_cert_name=FILENAME[,FILENAME ...]

The name of the file containing the TLS certificate. FILENAME is located relative to the directory specified by the proxy.config.ssl.server.cert.path configuration variable. It may also include the intermediate CA certificates, sorted from leaf to root. At a minimum, the file must include a leaf certificate.

When running with OpenSSL 1.0.2 or later, this directive can be used to configure the intermediate CA chain on a per-certificate basis. Multiple chain files are separated by comma character. For example, it is possible able to configure a ECDSA certificate chain and a RSA certificate chain and serve them simultaneously, allowing OpenSSL to determine which certificate would be used when the TLS session cipher suites are negotiated. Note that the leaf certs in FILENAME1 and FILENAME2 must have the same subjects and alternate names. The first certificate is used to to match the client's SNI request.

You can also configure multiple leaf certificates in a same chain with OpenSSL 1.0.1.

This is the only field that is required to be present.

dest_ip=ADDRESS (optional)

The IP (v4 or v6) address that the certificate should be presented on. This is now only used as a fallback in the case that the TLS ServerNameIndication extension is not supported. If ADDRESS is *, the corresponding certificate will be used as the global default fallback if no other match can be made. The address may contain a port specifier, in which case the corresponding certificate will only match for connections accepted on the specified port. IPv6 addresses must be enclosed by square brackets if they have a port, eg, [::1]:80. Care should be taken to make each ADDRESS unique.

ssl_key_name=FILENAME (optional)

The name of the file containing the private key for this certificate. If the key is contained in the certificate file, this field can be omitted, otherwise FILENAME is resolved relative to the proxy.config.ssl.server.private_key.path configuration variable.

ssl_ca_name=FILENAME (optional)

If the certificate is issued by an authority that is not in the system CA bundle, additional certificates may be needed to validate the certificate chain. FILENAME is resolved relative to the proxy.config.ssl.CA.cert.path configuration variable.

ssl_ocsp_name=FILENAME (optional)

The name of the file containing the prefetched OCSP stapling response for this certificate. This field can be omitted to let trafficserver fetch OCSP responses dynamically. Otherwise, when included, the administrator is responsible for updating the file's content. FILENAME is resolved relative to the proxy.config.ssl.ocsp.response.path configuration variable.

ssl_ticket_enabled=1|0 (optional)

Enable RFC 5077 stateless TLS session tickets. To support this, OpenSSL should be upgraded to version 0.9.8f or higher. This option must be set to 0 to disable session ticket support.

ssl_ticket_number=INTEGER (optional)

Specifies the number of TLSv1.3 session tickets that are issued. This defaults to 2 (the OpenSSL default)

ssl_key_dialog=builtin|"exec:/path/to/program [args]" (optional)

秘密鍵を暗号化したパスフレーズを渡すのに使われる手段です。パスフレーズが間違っている場合、接続を試みたクライアントからこの dest_ip への SSL ネゴシエーションは失敗するでしょう。builtin と exec: の 2 つのオプションがサポートされています。

builtin - Requests pass phrase via stdin/stdout. User will be

stdin/stdout によるパスフレーズを要求します。ユーザーは ssl_cert_name を提示され、パスフレーズの入力を促されます。デバッグに便利です。

exec: - Executes program /path/to/program and passes args, if

記述された場合、プログラム /path/to/program を実行し、プログラムに引数を渡し、パスフレーズを得るために stdout からの出力を読みます。引数が渡された場合、exec: 文字列全体は "" で囲まれていなければなりません。( 例を参照してください ) ホワイトスペースを含む引数はシングルクォート (') によってサポートされています。この意図はこのプログラムがセキュリティチェックを実行し、パスフレーズを渡す前にシステムが攻撃者によって汚染されていないことを確かめることです。

証明書の選択

Traffic Server は SSL 接続のセットアップの間に二回の証明書の選択を試みます。初回の選択は TCP の接続が受け入れられたときに行われます。この選択ではクライアントが接続しようとしている IP アドレスとポートを検査し、dest_ip の指定をもつものから最適な証明書を選びます。マッチする証明書が見つからない場合は、デフォルトの証明書が選ばれます。最後の選択は SSL ハンドシェイクの間に行われます。このとき、クライアントは具体的なホスト名を要求するために Server Name Indication を使用することがあります。Traffic Server はサブジェクトまたはサブジェクト別名のマッチングにより証明書を選択するためにこのリクエストを使用するでしょう。それに失敗すると、ワイルドカードによる証明書のマッチが試されます。いずれにもマッチしない場合、初回の証明書の選択がそのまま有効となります。

In all cases, Traffic Server attempts to select the most specific match. An address specification that contains a port number will take precedence over a specification that does not contain a port number. A specific certificate subject will take precedence over a wildcard certificate. In the case of multiple matching certificates the first match will be returned to non-SNI capable clients.

次の例は Traffice Server が SSL 証明書 server.pem を IP アドレス 111.11.11.1 へのすべてのリクエストに使用し、SSL 証明書 server1.pem を IP アドレス 11.1.1.1 へのすべてのリクエストに使用するように設定しています。その他のすべての IP アドレスからの接続は証明書 default.pem によってターミネートされます。秘密鍵は証明書に含まれているので、秘密鍵の名前は指定されていません。

dest_ip=111.11.11.1 ssl_cert_name=server.pem
dest_ip=11.1.1.1 ssl_cert_name=server1.pem
dest_ip=* ssl_cert_name=default.pem

The following example configures Traffic Server to use the ECDSA certificate chain ecdsa.pem or RSA certificate chain rsa.pem for all requests.

dest_ip=* ssl_cert_name=ecdsa.pem,rsa.pem

The following example configures Traffic Server to use the ECDSA certificate chain ecdsa.pem or RSA certificate chain rsa.pem for all requests, the public key and private key are in separate PEM files. Note that the number of files in ssl_key_name must match the files in ssl_cert_name, and they should be presented in the same order.

dest_ip=* ssl_cert_name=ecdsa_pub.pem,rsa_pub.pem ssl_key_name=ecdsa_private.pem,rsa_private.pem

次の例は Traffic Server が SSL 証明書 server.pem と秘密鍵 serverKey.pem を IP アドレス 111.11.11.1 のポート 8443 へのすべてのリクエストに使用するよう設定しています。証明書 general.pem はサーバー名がマッチするもので使用されます。

dest_ip=111.11.11.1:8443 ssl_cert_name=server.pem ssl_key_name=serverKey.pem ssl_cert_name=general.pem

次の例は Traffice Server が SSL 証明書 server.pem を IP アドレス 111.11.11.1 へのすべてのリクエストに使用するように設定しています。セッションチケットは恒久的なチケットキーで有効化されています。

dest_ip=111.11.11.1 ssl_cert_name=server.pem ssl_ticket_enabled=1 ticket_key_name=ticket.key

次の例は Traffice Server が IP アドレス 111.11.11.1 へのすべてのリクエストで SSL 証明書 server.pem を 使用し、セッションチケットを無効化するように設定しています。

dest_ip=111.11.11.1 ssl_cert_name=server.pem ssl_ticket_enabled=0

次の例は Traffice Server が暗号化された秘密鍵を含む SSL 証明書 server.pem を 使用するように設定しています。起動時に外部プログラム /usr/bin/mypass は最初の例では 1 つ引数 (foo) と共に呼ばれ、2つ目の例では 2 つの引数 (foo) と (ba r) と共に呼ばれ、プログラム (mypass) は鍵を復号化するためのパスフレーズを返すでしょう。

ssl_cert_name=server1.pem ssl_key_dialog="exec:/usr/bin/mypass foo"
ssl_cert_name=server2.pem ssl_key_dialog="exec:/usr/bin/mypass foo 'ba r'"