外部認証を有効にする

Edge for Private Cloud v. 4.17.09

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

前提条件

  • Apigee Edge for Private Cloud 4.17.09 がインストールされている必要があります。
  • Apigee Edge for Private Cloud のグローバル システム管理者認証情報が必要です。 このインストールを実行します。
  • Apigee Edge for Private Cloud インストールのルート ディレクトリを知っておく必要があります。「 デフォルトのルート ディレクトリは /opt です。
  • Edge のグローバル システム管理者認証情報を できます。デフォルトでは、sysadmin 認証情報は Edge の できます。外部 LDAP に切り替えると、 そこで認証が行われます。そのため、認証情報をサービス アカウントにプロビジョニングし、 Edge で外部認証を有効にする前に、外部システムに外部システムに接続します。

    たとえば、Apigee Edge for Private Cloud をグローバル システム管理者の認証情報:

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

    次に、パスワードを使用してユーザー edgeuser@mydomain.com を指定します。 Secret123 も存在する必要があります 使用できます。
  • Management Server クラスタを実行している場合は、すべての手順を実施する必要があります。 Management Server ごとに設定できます。

外部認証の構成

主な作業として、management-server.properties ファイルの構成を行います。 これには、Edge Management Server の停止と起動、 直接的または間接的なバインディングの使用、機密性の高い認証情報の暗号化、 できます。

  1. 重要: 間接的または直接的のどちらを使用するかを今すぐ決定してください 認証方法を指定します。この決定は、構成のいくつかの側面に影響します。詳しくは、 外部認証
  2. 重要: これらの構成手順は、Apigee Edge 管理ごとに行う必要があります。 (複数のサーバーを実行している場合)。
  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 のステータス
  8. 重要: 次のいずれか(または両方)で追加の構成を行う必要があります。 (a)ユーザーが特定のサービス アカウントのログインに使用するユーザー名で、 メールアドレスではありません。この場合、システム管理者ユーザーもユーザー名で認証する必要があります。 および/または(b)外部組織の sysadmin ユーザー アカウントのパスワードが LDAP は、Apigee Edge for Education を最初にインストールしたときに構成したパスワードと異なります。 プライベート クラウド詳しくは、Terraform で必要な構成の 異なる 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 "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

インストールのテスト

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

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

    例:
    &gt;curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. プロンプトが表示されたら、パスワードを入力します。

    コマンドからステータス 200 と組織のリストが返された場合、構成は適切です。 このコマンドは、Edge Management Server への API 呼び出しが正常に行われたことを確認します。 認証できます。