Control Center 用の TLS/SSL の構成

HTTPS 経由でセキュアなウェブアクセスができるように、Control Center に TLS/SSL を構成できます。さらに、Control Center は他のコンポーネントのプロキシサーバーとして機能するので、Control Center に TLS/SSL を構成して、他のセキュアな Confluent Platform コンポーネントとの通信をセキュアにできます。

サーバーとしての Control Center 用の TLS/SSL 構成

HTTPS を Confluent Control Center へのウェブアクセス用に構成できます。HTTPS を有効にするには、まず confluent.controlcenter.rest.listeners パラメーターを使用して Control Center プロパティファイルに HTTPS リスナーを追加する必要があります。さらに、適切な TLS/SSL 構成オプション を設定する必要があります。まだ作成していない場合は、TLS/SSL キーおよび証明書を作成 する必要があります。

適切な Control Center プロパティファイル に追加する必要のある内容の例を以下に示します。

confluent.controlcenter.rest.listeners=<listener-url>
confluent.controlcenter.rest.ssl.keystore.location=<keystore-location>
confluent.controlcenter.rest.ssl.keystore.password=<password>
confluent.controlcenter.rest.ssl.key.password=<key-password>
confluent.controlcenter.rest.ssl.truststore.location=<truststore-location>
confluent.controlcenter.rest.ssl.truststore.password=<password>
curl -vvv -X GET --tlsv1.2 https://localhost:9022
#for cases when using a self-signed certificate
curl -vvv -X GET --tlsv1.2 --cacert scripts/security/snakeoil-ca-1.crt https://localhost:9022

参考

この構成の動作例については、Confluent Platform デモ を参照してください。構成リファレンスについては、デモの docker-compose.yml ファイル を参照してください。

ちなみに

フォールバックメカニズムとして、JVM またはオペレーティングシステム(OS)のトラストストアをチェックするように Control Center を構成できます。

  • デフォルトの JVM トラストストアを構成するには、次のプロパティを true に設定します。

    confluent.controlcenter.use.default.jvm.truststore=true

  • デフォルトの OS トラストストアを構成するには、次のプロパティを true に設定します。

    confluent.controlcenter.use.default.os.truststore=true

Kafka Streams 用の TLS/SSL の構成

Control Center では、他の任意のコンポーネントに対してセキュリティが有効になっているかどうかを知る必要があります。Control Center は、内部で Kafka Streams をステートストアとして使用します。つまり 1 台のブローカーがセキュアな場合は、Kafka Streams もセキュアにする必要があります。

環境に応じて、以下の変更を control-center.properties ファイルに加える必要があります。

confluent.controlcenter.streams.security.protocol=SSL
confluent.controlcenter.streams.ssl.keystore.location=<keystore-location>
confluent.controlcenter.streams.ssl.keystore.password=<password>
confluent.controlcenter.streams.ssl.key.password=<password>
confluent.controlcenter.streams.ssl.truststore.location=<truststore-location>
confluent.controlcenter.streams.ssl.truststore.password=<password>

注釈

Apache Kafka® クライアントインターセプターの構成の詳細については、「インターセプターの有効化」を参照してください。

プロキシサーバーとしての Control Center 用の TLS/SSL 構成

Confluent Control Center は、通常、HTTP プロトコルを使用して Confluent Platform コンポーネントと通信します。2 つのコンポーネントを TLS/SSL でセキュアにすることで、それらのコンポーネント間で HTTPS を有効にできます。

Control Center と他の Confluent Platform コンポーネント間の通信用に TLS/SSL を構成する方法は多数あります。

注釈

Confluent Control Center 用のストアは、構成方法にかかわらず、以下の順にチェックされます。

  • Schema Registry ストア
  • Connect ストア
  • ksqlDB ストア
  • プロキシサーバーストア
  • サーバーストア

各コンポーネントを個別に構成する場合は、各コンポーネントに、プレフィックスによって固有の構成が設定されている必要があります。たとえば、Schema Registry の場合は、プレフィックス confluent.controlcenter.schema.registry を使用します。

TLS/SSL トラストストアの場所は以下のように設定されます。

confluent.controlcenter.schema.registry.schema.registry.ssl.truststore.location=<value>

各コンポーネントは、それぞれの構成ファイルで、Control Center をエンドツーエンドでセキュアにするように構成されている必要があります。

一部の構成設定は不要な場合があります。構成する各コンポーネントの構成リファレンスを参照してください。

Schema Registry に対する TLS/SSL プロキシサーバーアクセスの構成

Confluent Control Center が Schema Registry に接続し、Schema Registry で TLS/SSL が有効の場合

  • Schema Registry は Kafka プロトコルを使用して Kafka と通信します。このプロトコルは TLS/SSL を使用したセキュアなものです。
  • Control Center は Kafka プロトコルを使用して Kafka と通信します。このプロトコルは TLS/SSL を使用したセキュアなものです。
  • Control Center は HTTPS プロトコルを使用して Schema Registry と通信します。このプロトコルは TLS/SSL を使用したセキュアなものです。

実質的に、Control Center は Schema Registry に対してプロキシサーバーとして機能します。HTTPS を使用して Control Center をセキュアにするには、「REST API の HTTP または HTTPS の構成」の説明に従い HTTPS を許可するように Schema Registry を構成します。

さらに、「HTTPS 用の追加構成」で説明されているように、Control Center のトラストストアに、HTTPS を介して Schema Registry と接続するための信頼された証明書が含まれている必要があります。

control-center.properties 内の Control Center 構成属性には必ず confluent.controlcenter. のプレフィックスを付けます。以下に例を示します。

confluent.controlcenter.schema.registry.schema.registry.ssl.truststore.location=<truststore-location>
confluent.controlcenter.schema.registry.schema.registry.ssl.truststore.password=<password>
confluent.controlcenter.schema.registry.schema.registry.ssl.keystore.location=<keystore-location>
confluent.controlcenter.schema.registry.schema.registry.ssl.keystore.password=<password>
confluent.controlcenter.schema.registry.schema.registry.ssl.key.password=<password>

Connect に対する TLS/SSL プロキシサーバーアクセスの構成

Confluent Control Center は、通常、HTTP プロトコルを使用して Connect と通信します。2 つのコンポーネントを SSL/TLS でセキュアにすることで、それらのコンポーネント間で HTTPS を有効にできます。Control Center のトラストストア内に、Connect によって信頼された HTTPS を介して通信するための証明書があることを確認します。以下のプロパティを設定して、Control Center で Connect との HTTPS 通信を有効にします。

confluent.controlcenter.connect.connect.ssl.truststore.location=<truststore-location>
confluent.controlcenter.connect.connect.ssl.truststore.password=<password>
confluent.controlcenter.connect.connect.ssl.keystore.location=<keystore-location>
confluent.controlcenter.connect.connect.ssl.keystore.password=<password>
confluent.controlcenter.connect.connect.ssl.key.password=<password>

HTTPS を介した Connect へのアクセスの詳細については、「HTTP または HTTPS を使用するための Connect REST API の構成」を参照してください。

ksqlDB に対する TLS/SSL プロキシサーバーアクセスの構成

Confluent Control Center は、通常、HTTP プロトコルを使用して ksqlDB と通信します。2 つのコンポーネントを TLS/SSL でセキュアにすることで、それらのコンポーネント間で HTTPS を有効にできます。HTTPS を介して ksqlDB に接続するように Control Center を構成するには、『Configure ksqlDB for HTTPS』を参照してください。

Control Center のトラストストア内に、ksqlDB によって信頼された HTTPS を介して通信するための証明書があることを確認します。control-center.properties ファイルに以下のパラメーターが含まれている必要があります。

confluent.controlcenter.ksql.ksql.ssl.truststore.location=<truststore-location>
confluent.controlcenter.ksql.ksql.ssl.truststore.password=<password>
confluent.controlcenter.ksql.ksql.ssl.keystore.location=<keystore-location>
confluent.controlcenter.ksql.ksql.ssl.keystore.password=<password>
confluent.controlcenter.ksql.ksql.ssl.key.password=<password>

単一のプロキシサーバーストアの構成

各コンポーネントについて Control Center を構成する代わりに、単一のプロキシサーバーストアを構成できます。

プロキシストアを構成するには、以下のプロパティを設定します。

confluent.controlcenter.rest.proxy.ssl.truststore.location=<truststore-location>
confluent.controlcenter.rest.proxy.ssl.truststore.password=<password>
confluent.controlcenter.rest.proxy.ssl.keystore.location=<keystore-location>
confluent.controlcenter.rest.proxy.ssl.keystore.password=<password>
confluent.controlcenter.rest.proxy.ssl.key.password=<password>

サーバーストアの使用

プロキシサーバー TLS/SSL にサーバーストアを使用することはできますが、これはお勧めしません。

サーバー TLS/SSL を使用する場合、Control Center は、サーバーとしての Control Center 用の TLS/SSL 構成 で指定された場所とパスワードを使用します。