Control Center UI 認証¶
ユーザーログインは JAAS を使用してプラグ可能な HTTP 基本認証を使用して提供されています。すべての構成オプションは、ここに記載 されています。
Control Center 認証を構成するには、以下の手順に従います。
control-center.properties
内に以下のオプションを指定します。confluent.controlcenter.rest.authentication.method=BASIC confluent.controlcenter.rest.authentication.realm=c3 confluent.controlcenter.rest.authentication.roles=Administrators,Restricted confluent.controlcenter.auth.restricted.roles=Restricted confluent.controlcenter.auth.session.expiration.ms=600000
重要
confluent.controlcenter.rest.authentication.roles
およびconfluent.controlcenter.auth.restricted.roles
というプロパティはいずれも グループ に適用されます。confluent.controlcenter.rest.authentication.roles
の値は<your_administrator_group>,<your_restricted_group>
、confluent.controlcenter.auth.restricted.roles
の値は<your_restricted_group>
です。以下のような JAAS ファイル(
propertyfile.jaas
)を作成します。認証レルムは Control Center (c3
)です。c3 { org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required file="/password.properties"; };
password.properties
にあるパスワードファイルは以下のような形式になっています。bob: <bob_password>,<your_administrator_group> alice: <alice_password>,<your_restricted_group>
JAAS 構成を使用するために Control Center を起動します。
CONTROL_CENTER_OPTS="-Djava.security.auth.login.config=/propertyfile.jaas" control-center-start /control-center.properties
Control Center へのアクセスを付与された後で、サインイン資格情報が要求されます。bob:<bob_password>
としてログインすると、読み取りおよび書き込みのアクセス権限が提供されます。alice:<alice_password>
としてログインすると、読み取り専用のアクセス権限が提供されます。
以下のメイン UI 要素およびオプションは、制限ユーザーには 表示されません。
- コネクターの追加、削除、一時停止、再開
- コネクターのブラウズ
- コネクター設定の表示
- コネクター構成のアップロード
- アラート(トリガーまたはアクション)の作成、削除、編集
- ライセンスの編集
- ブローカーの編集
- クラスター関連フォームでの送信の実行
- スキーマの編集、作成、削除
- データフロークエリの編集
- トピックの検査
- ksqlDB エディターへの入力
- ksqlDB クエリの実行または停止
- KSQL ストリームまたはテーブルの追加
注釈
ユーザーが管理者グループと制限グループの両方に属している場合は、読み取り専用 ユーザーと見なされます。
UI HTTPS¶
HTTPS は Confluent Control Center へのウェブアクセスのためにサポートされています。HTTPS を有効にするには、まず confluent.controlcenter.rest.listeners
パラメーターを使用して Control Center プロパティファイルに HTTPS リスナーを追加する必要があります。適切な SSL 構成オプション も設定する必要があります。まだ作成していない場合は、この機会に SSL キーおよび証明書 を作成することをお勧めします。
control-center.properties
に追加する必要のある内容の例を以下に示します。
confluent.controlcenter.rest.listeners=https://0.0.0.0:9022
confluent.controlcenter.rest.ssl.keystore.location=/var/private/ssl/kafka.control-center.keystore.jks
confluent.controlcenter.rest.ssl.keystore.password=test1234
confluent.controlcenter.rest.ssl.key.password=test1234
confluent.controlcenter.rest.ssl.truststore.location=/var/private/ssl/kafka.control-center.truststore.jks
confluent.controlcenter.rest.ssl.truststore.password=test1234
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 ファイル を参照してください。