Edge for Private Cloud v4.19.01
このセクションでは、ユーザー認証のために LDAP サービスを Apigee Edge に統合する場合に必要なコンポーネントを取得、インストール、構成する方法を説明します。
要件
- Apigee Edge for Private Cloud 4.18.05 がインストールされている必要があります。
- この手順を行うには、Apigee Edge for Private Cloud のグローバル システム管理者認証情報が必要です。
- Apigee Edge for Private Cloud インストール環境のルート ディレクトリを把握している必要があります。デフォルトのルート ディレクトリは
/opt
です。 - Edge グローバル システム管理者認証情報を外部 LDAP に追加する必要があります。デフォルトでは、このシステム管理者認証情報は Edge の内部 LDAP に保管されています。外部 LDAP に切り替えた後は、その外部 LDAP でシステム管理者認証情報が認証されます。したがって、Edge で外部認証を有効にする前に、該当する外部システムに合わせて認証情報をプロビジョニングする必要があります。
たとえば、次のシステム管理者認証情報を使用して Apigee Edge for Private Cloud を構成してインストールしたとします。
username: edgeuser@mydomain.com password: Secret123
この場合、ユーザー
edgeuser@mydomain.com
とパスワードSecret123
が外部 LDAP にも存在している必要があります。 - Management Server クラスタを実行している場合、クラスタ内の各 Management Server について、このドキュメントで説明するすべての手順を行う必要があります。
外部認証を構成する
management-server.properties
ファイルを構成することが、主なアクティビティとなります。このアクティビティには、Edge Management Server の停止と起動、直接または間接バインディングのどちらを使用するかの決定、機密性の高い認証情報の暗号化、および関連するその他のタスクが含まれます。
- 重要: 現時点で、間接または直接バインディグ認証方法のどちらを使用するか決定してください。この決定は、構成のいくつかの側面に影響を及ぼします。詳しくは、外部認証をご覧ください。
- 重要: 以下の構成手順は、Apigee Edge Management Server ごとに行う必要があります(複数の Management Server を使用している場合)。
- テキスト エディタで
/opt/apigee/customer/application/management-server.properties
を開きます。このファイルが存在しない場合は、作成します。 - 次の行を追加します。
conf_security_authentication.user.store=externalized.authentication
上記の行により、Edge for Private Cloud インストール環境に外部認証機能が追加されます。
- このステップを簡易化するために、わかりやすいコメントを追加したサンプル構成を 2 つ用意しています。1 つは直接バインディング認証用のサンプル構成で、もう 1 つは間接バインディング認証用のサンプル構成です。使用するバインディングに応じたサンプルを参照して、構成を行ってください。
- Management Server を再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- サーバーが稼働していることを確認します。
/opt/apigee/apigee-service/bin/apigee-all status
- 重要: 次のいずれか(または両方)に該当する場合は、追加の構成を行う必要があります。
- メールアドレスではないユーザー名を使用してユーザーにログインさせる場合。この場合、システム管理者ユーザーもユーザー名を使用して認証を行う必要があります。
かつ / または
- 外部 LDAP 内のシステム管理者ユーザー アカウントのパスワードが、最初に Apigee Edge for Private Cloud をインストールしたときに構成したパスワードと異なる場合。さまざまなシステム管理者認証情報に必要な構成をご覧ください。
- メールアドレスではないユーザー名を使用してユーザーにログインさせる場合。この場合、システム管理者ユーザーもユーザー名を使用して認証を行う必要があります。
直接バインディングのサンプル構成
## 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 in Microsoft Active Directory, this would be ## 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 with AD, 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 "Configuration required for different sysadmin credentials". 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
インストールのテスト
- サーバーが稼働していることを確認します。
/opt/apigee/apigee-service/bin/apigee-all status
- Apigee Edge グローバル システム管理者認証情報一式を使用して、以下のコマンドを実行します。ここでテストする API 呼び出しを実行できるのは、Edge システム管理者のみです。
curl -v http://management-server-IP:8080/v1/o -u sysadmin_username
例:
curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
- プロンプトが表示されたら、パスワードを入力します。
このコマンドから 200 ステータス コードと組織のリストが返された場合、構成は正しく行われています。このコマンドは、Edge Management Server に対する API 呼び出しが外部 LDAP システムによって正常に認証されたことを確認します。