外部認証を有効にする

Edge for Private Cloud バージョン 4.17.05

このセクションでは、ユーザー認証のために外部 LDAP サービスを Apigee Edge に統合するために必要なコンポーネントを入手、インストール、構成する方法について説明します。

前提条件

  • Apigee Edge for Private Cloud 4.17.05 がインストールされている必要があります。
  • このインストールを行うには、Apigee Edge for Private Cloud のグローバル システム管理者認証情報が必要です。
  • Apigee Edge for Private Cloud インストール環境のルート ディレクトリを把握している必要があります。デフォルトのルート ディレクトリは /opt です。
  • Edge グローバル システム管理者認証情報を外部 LDAP に追加する必要があります。デフォルトでは、システム管理者の認証情報は Edge の内部 LDAP に保存されます。外部 LDAP に切り替えると、システム管理者の認証情報は外部 LDAP で認証されます。したがって、Edge で外部認証を有効にする前に、認証情報を外部システムにプロビジョニングする必要があります。

    たとえば、次のグローバル システム管理者認証情報を使用して Apigee Edge for Private Cloud を構成してインストールした場合:

    ユーザー名: edgeuser@mydomain.com
    パスワード: Secret123

    次に、ユーザー edgeuser@mydomain.com とパスワード Secret123 が外部 LDAP に存在する必要があります。
  • Management Server クラスタを実行している場合は、Management Server ごとにこのドキュメントの手順をすべて行う必要があります。

外部認証の構成

実行する主なアクティビティは、management-server.properties ファイルの構成です。このアクティビティには、Edge Management Server の停止と起動、直接バインディングと間接バインディングのどちらを使用するかの判断、機密性の高い認証情報の暗号化、その他の関連タスクが含まれます。

  1. 重要: 間接バインディングと直接バインディングのどちらの認証方法を使用するかを決めてください。この決定は、構成の一部に影響します。外部認証をご覧ください。
  2. 重要: これらの構成手順は、Apigee Edge Management Server ごとに行う必要があります(複数の管理サーバーを実行している場合)。
  3. テキスト エディタで /opt/apigee/customer/application/management-server.properties を開きます。ファイルが存在しない場合は作成します。
  4. 次の行を追加します。注: 行の末尾にスペースを入れないでください

    conf_security_authentication.user.store=externalized.authentication

    この行により、Edge for Private Cloud インストールに外部認証機能が追加されます。
  5. このステップを簡単にするために、適切にコメントされた 2 つのサンプル構成を作成しました(1 つは直接バインディング認証用、もう 1 つは間接バインディング認証用)。以下のサンプルを参照して使用するバインディングを確認し、構成を完了します。

    ダイレクト バインディングの構成のサンプル
    間接バインディングの構成のサンプル
  6. Management Server を再起動します。
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. サーバーが実行中であることを確認します。
    > /opt/apigee/apigee-service/bin/apigee-all status
  8. 重要: 次のいずれかの状況(または両方)に該当する場合、追加構成を行う必要があります。(a)ユーザーがメールアドレスではないユーザー名を使用してログインできるようにする場合。この場合、外部 LDAP の sysadmin ユーザー アカウントのパスワードが、最初に Apigee Edge for Private Cloud をインストールしたときに構成したパスワードと異なる場合、sysadmin ユーザーはユーザー名でも認証を行う必要があります。さまざまな sysadmin 認証情報に必要な構成をご覧ください。

直接バインディングのサンプル構成

## The first property is always required to enable the external authorization feature. Do not change it.
conf_security_externalized.authentication.implementation.class=com.apigee.rbac.impl.LdapAuthenticatorImpl

## Identify the type of binding:
# Set to "true" for direct binding
# Set to "false" for indirect binding. 
conf_security_externalized.authentication.bind.direct.type=true

## The next seven properties are needed regardless of direct or indirect binding. You need to configure these per your external authentication installation. 
## The IP or domain for your external LDAP instance. 
conf_security_externalized.authentication.server.url=ldap://localhost:389

## Your external LDAP server version.
conf_security_externalized.authentication.server.version=3

## The server timeout in milliseconds. 
conf_security_externalized.authentication.server.conn.timeout=50000

## Change these baseDN values to match your external LDAP service. This attribute value will be provided by your external LDAP administrator, and may have more or fewer dc elements depending on your setup.
conf_security_externalized.authentication.user.store.baseDN=dc=apigee,dc=com

## Do not change this search string. It is used internally. 
conf_security_externalized.authentication.user.store.search.query=(&(${userAttribute}=${userId}))

## Identifies the external LDAP property you want to bind against for Authentication. For example if you are binding against an email address, this would typically be in the userPrincipalName property in your external LDAP instance. Alternatively if you are binding against the user’s ID, this would typically be in the sAMAccountName property:
conf_security_externalized.authentication.user.store.user.attribute=userPrincipalName

## The LDAP attribute where the user email value is stored. For direct binding, set it to userPrincipalName.
conf_security_externalized.authentication.user.store.user.email.attribute=userPrincipalName

## ONLY needed for DIRECT binding.
## The direct.bind.user.directDN property defines the string that is used for the bind against the external authentication service. Ensure it is set as follows:
conf_security_externalized.authentication.direct.bind.user.directDN=${userDN}

間接バインディングのサンプル

## Required to enable the external authorization feature. Do not change it.
conf_security_externalized.authentication.implementation.class=com.apigee.rbac.impl.LdapAuthenticatorImpl

## Identifies the type of binding:
# Set to "true" for direct binding
# Set to "false" for indirect binding. 
conf_security_externalized.authentication.bind.direct.type=false

## The next seven properties are needed regardless of direct or indirect binding. You need to configure these per your external LDAP installation. 
## The IP or domain for your external LDAP instance. 
conf_security_externalized.authentication.server.url=ldap://localhost:389

## Replace with your external LDAP server version.
conf_security_externalized.authentication.server.version=3

## Set the server timeout in milliseconds. 
conf_security_externalized.authentication.server.conn.timeout=50000

## Change these baseDN values to match your external LDAP service. This attribute value will be provided by your external LDAP administrator, and may have more or fewer dc elements depending on your setup.
conf_security_externalized.authentication.user.store.baseDN=dc=apigee,dc=com

## Do not change this search string. It is used internally. 
conf_security_externalized.authentication.user.store.search.query=(&(${userAttribute}=${userId}))

## Identifies the external LDAP property you want to bind against for Authentication. For example if you are binding against an email address, this would typically be in the userPrincipalName property in your external LDAP instance. Alternatively if you are binding against the user’s ID, this would typically be in the sAMAccountName property. See also "Indirect binding only: Encrypting the external LDAP user’s password".
conf_security_externalized.authentication.user.store.user.attribute=userPrincipalName

## Used by Apigee to perform the Authorization step and currently, Apigee only supports email address for Authorization. Make sure to set it to the attribute in your external LDAP that stores the user’s email address. Typically this will be in the userPrincipalName property. 
conf_security_externalized.authentication.user.store.user.email.attribute=userPrincipalName

## The external LDAP username (for a user with search privileges on the external LDAP) and password and whether the password is encrypted. You must also set the attribute externalized.authentication.bind.direct.type to false.
## The password attribute can be encrypted or in plain text. See "Indirect binding only: Encrypting the external LDAP user’s password" for encryption instructions. Set the password.encrypted attribute to "true" if the password is encrypted. Set it to "false" if the password is in plain text.
conf_security_externalized.authentication.indirect.bind.server.admin.dn=myExtLdapUsername
conf_security_externalized.authentication.indirect.bind.server.admin.password=myExtLdapPassword
conf_security_externalized.authentication.indirect.bind.server.admin.password.encrypted=true

インストールのテスト

  1. サーバーが実行中であることを確認します。
    > /opt/apigee/apigee-service/bin/apigee-all status
  2. 一連の Apigee Edge グローバル システム管理者認証情報を指定して、次のコマンドを実行します。これからテストする API 呼び出しは、Edge システム管理者のみが実行できます。

    重要: 外部 LDAP アカウントに同じ認証情報が存在している必要があります。含まれていない場合は、今すぐ追加する必要があります。通常、ユーザー名はメールアドレスですが、このドキュメントで前述したように、外部認証の構成方法によって異なります。
    > curl -v http://<management-server-ip>:8080/v1/o -u <Sysadmin ユーザー名>

    例:
    > curl -v http://192.168.52.100:8080/uv1/e-domain
  3. プロンプトが表示されたら、パスワードを入力します。

    このコマンドから 200 ステータスと組織のリストが返された場合、構成は正しくなっています。 このコマンドは、Edge Management Server への API 呼び出しが外部 LDAP システムで正常に認証されたことを確認します。