Control Center での HTTP 基本認証の構成

HTTP 基本認証により、アクセス制御の実装を簡単に行えます。Confluent Control Center の UI アクセス制御を、HTTP 基本認証を使用して構成できます。これにより、Control Center へのユーザーアクセスを認証します。

注釈

より洗練されたアクセス制御が必要な場合は、Control Center 用にロールベースアクセス制御を構成 してください。

Control Center の基本認証の有効化

Java Authentication and Authorization Service(JAAS)を使用して HTTP 基本認証を構成すると、ユーザーに Control Center へのログインを要求できます。JAAS は、実行時に指定された詳細に基づいて、プラグ可能なモデルを提供します。すべての構成オプションの詳細については、「UI 認証設定」を参照してください。

Control Center 認証を構成するには、以下の手順に従います。

  1. 適切な Control Center プロパティファイル で以下のオプションを指定します。confluent.controlcenter.rest.authentication.roles および confluent.controlcenter.auth.restricted.roles を使用して、管理者(読み取りおよび書き込みのフルアクセスが許可されている)と制限ユーザー(読み取りアクセスのみ許可されている)のいずれかのユーザーのグループを作成します。

    • confluent.controlcenter.rest.authentication.roles の値を <administrator_group_name>,<restricted_group_name> の形式で指定します。

    • restricted の値は、制限グループの名前です。confluent.controlcenter.auth.restricted.roles<restricted_group_name> です。

      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
      
  2. 以下のような JAAS ファイル(propertyfile.jaas)を作成します。ファイルで、認証レルムを Control Center (c3)として指定し、Control Center のユーザーとパスワードを含めるパスワードファイルの名前を指定します。

    c3 {
        org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required
        file="/path/to/password.properties";
    };
    

    password.properties のパスワードファイルは、ユーザー名の後ろにパスワードとそのユーザーのグループ(管理者グループまたは制限グループ)を続けて指定して、以下のような内容にする必要があります。

    注釈

    複数グループのメンバーシップを持つユーザーは、最も限定されたアクセス権限のみ許可されます。たとえば、ユーザーが adminreadonly の 2 つのグループのメンバーであり、readonly が限定されたロールである場合、ユーザーは readonly グループの権限のみ許可されます。

    admin: <admin-password>,<administrator_group_name>
    bob: <bob-password>,<administrator_group_name>
    alice: <alice-password>,<your_restricted_group>
    
  3. JAAS 構成を使用するための引数を渡して Control Center を起動し、HTTP 基本認証設定を含むプロパティファイルを指定します。

    CONTROL_CENTER_OPTS="-Djava.security.auth.login.config=/path/to/propertyfile.jaas" \
    control-center-start ./etc/confluent-control-center/control-center.properties
    

ユーザーが Control Center にアクセスする場合は、サインイン認証情報が要求されます。この例では、bob:<bob_password> としてログインすると、読み取りおよび書き込みのアクセス権限が付与されます。alice:<alice_password> としてログインすると、読み取り専用のアクセス権限が提供されます。

制限ユーザー

限定ロール(読み取り専用)のユーザーは、以下のユーザーインターフェイス(UI)の機能とオプションは使用できず、表示もされません。