Externe Authentifizierung aktivieren

In diesem Abschnitt wird erläutert, wie Sie die für Ihr Projekt erforderlichen Komponenten beschaffen, installieren und konfigurieren. Einen LDAP-Dienst zur Nutzerauthentifizierung in Apigee Edge einbinden.

Vorbereitung

  • Sie benötigen eine Installation von Apigee Edge for Private Cloud 4.18.05.
  • Sie benötigen globale Systemadministrator-Anmeldedaten in Apigee Edge für Private Cloud, um und führen Sie diese Installation aus.
  • Sie müssen das Stammverzeichnis Ihrer Apigee Edge for Private Cloud-Installation kennen. Die Das Standardstammverzeichnis ist /opt.
  • Sie müssen Ihre Anmeldedaten für den globalen Edge-Systemadministrator zum externes LDAP. Denken Sie daran, dass die Systemadministrator-Anmeldedaten standardmäßig im Edge-Browser gespeichert werden internes LDAP. Wenn Sie zum externen LDAP wechseln, werden Ihre Systemadministrator-Anmeldedaten wird stattdessen dort authentifiziert. Daher müssen Sie die Anmeldedaten für die externen System bevor die externe Authentifizierung in Edge aktiviert wird.

    Wenn Sie beispielsweise Apigee Edge für Private Cloud mit globalen Anmeldedaten des Systemadministrators als:

    username: edgeuser@mydomain.com
    password: Secret123

    Dann hat der Nutzer edgeuser@mydomain.com mit Passwort Secret123 muss auch im externen LDAP vorhanden sein.

  • Wenn Sie einen Management Server-Cluster ausführen, müssen Sie alle Schritte in diesem Dokument für jeden Verwaltungsserver.

Externe Authentifizierung konfigurieren

Die Hauptaktivität, die Sie ausführen, ist das Konfigurieren der Datei management-server.properties. Diese Aktivität umfasst das Stoppen und Starten des Edge-Verwaltungsservers, die Entscheidung, ob Sie die direkte oder indirekte Bindung, das Verschlüsseln vertraulicher Anmeldedaten und ähnliche Aufgaben.

  1. Wichtig: Entscheiden Sie jetzt, ob Sie die indirekte oder direkte Ausrichtung verwenden möchten. Bindungs-Authentifizierungsmethode. Diese Entscheidung wirkt sich auf einige Aspekte der Konfiguration aus. Weitere Informationen finden Sie unter Externe Authentifizierung.
  2. Wichtig: Sie müssen diese Konfigurationsschritte für jedes Apigee Edge Management ausführen. Server (wenn Sie mehrere ausführen).
  3. /opt/apigee/customer/application/management-server.properties öffnen in einem Texteditor. Wenn die Datei nicht vorhanden ist, erstellen Sie sie.
  4. Fügen Sie folgende Zeile hinzu:
    conf_security_authentication.user.store=externalized.authentication

    Diese Zeile fügt Ihrem Edge für Private Cloud das Feature für die externe Authentifizierung hinzu Installation.

  5. Um diesen Schritt zu vereinfachen, haben wir zwei gut kommentierte Beispielkonfigurationen erstellt: eine für die direkte und eine für die indirekte Bindungsauthentifizierung. In den Beispielen unten finden Sie die gewünschte Bindung aus und schließen Sie die Konfiguration ab: <ph type="x-smartling-placeholder">
  6. Starten Sie den Verwaltungsserver neu:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. Prüfen Sie, ob der Server ausgeführt wird:
    /opt/apigee/apigee-service/bin/apigee-all status
  8. Wichtig: Sie müssen eine zusätzliche Konfiguration unter einem der beiden Elemente vornehmen folgenden Umständen erfüllt: <ph type="x-smartling-placeholder">
      </ph>
    1. Wenn Nutzer sich mit Nutzernamen anmelden sollen, die und keine E-Mail-Adressen. In diesem Fall muss sich Ihr Systemadministrator auch mit einem Nutzernamen.

      UND/ODER

    2. Wenn das Passwort für Ihr Systemadministrator-Nutzerkonto in Ihrem externen LDAP unterscheidet sich von dem Passwort, das Sie bei der Installation von Apigee Edge für Private Cloud Weitere Informationen finden Sie unter Konfiguration für verschiedene Systemadministrator-Anmeldedaten.

DIREKT BINDEND Konfigurationsbeispiel

## 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}

Konfigurationsbeispiel für INDIREKTE BINDING-Konfiguration

## 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

Installation testen

  1. Prüfen Sie, ob der Server ausgeführt wird:
    /opt/apigee/apigee-service/bin/apigee-all status
  2. Führen Sie diesen Befehl aus und geben Sie dabei eine Reihe von globalen Apigee Edge-Systemadministratoren an. Anmeldedaten Der API-Aufruf, den wir testen werden, kann nur von einem Edge- sysadmin.
    curl -v http://management-server-IP:8080/v1/o -u sysadmin_username

    Beispiel:

    curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. Geben Sie Ihr Passwort ein, wenn Sie dazu aufgefordert werden.

    Wenn der Befehl den Status 200 und eine Liste der Organisationen zurückgibt, ist die Konfiguration korrekt. Dieser Befehl überprüft, ob der API-Aufruf an den Edge-Verwaltungsserver erfolgreich war über das externe LDAP-System authentifiziert wurden.