Externe Authentifizierung aktivieren

Edge for Private Cloud Version 4.17.01

In diesem Abschnitt wird erläutert, wie Sie die Komponenten abrufen, installieren und konfigurieren, die zum Einbinden eines externen LDAP-Dienstes in Apigee Edge für die Nutzerauthentifizierung erforderlich sind.

Voraussetzungen

  • Sie benötigen eine Installation von Apigee Edge für Private Cloud 4.17.01.
  • Zum Ausführen dieser Installation benötigen Sie globale Anmeldedaten als Systemadministrator für Apigee Edge for Private Cloud.
  • Sie müssen das Stammverzeichnis Ihrer Installation von Apigee Edge for Private Cloud kennen. Das Standardstammverzeichnis ist /opt.
  • Sie müssen Ihre Global Edge-Systemadministratoranmeldedaten dem externen LDAP hinzufügen. Denken Sie daran, dass die Sysadmin-Anmeldedaten standardmäßig im internen Edge-LDAP gespeichert werden. Sobald Sie zum externen LDAP-Server wechseln, werden Ihre Systemadministrator-Anmeldedaten dort authentifiziert. Daher müssen Sie die Anmeldedaten für das externe System bereitstellen, bevor Sie die externe Authentifizierung in Edge aktivieren.

    Beispiel: Sie haben Apigee Edge für Private Cloud mit den globalen Anmeldedaten des Systemadministrators so konfiguriert und installiert:

    Nutzername: edgeuser@IhrUnternehmen.de
    Passwort: Secret123

    Dann muss der Nutzer edgeuser@IhrUnternehmen.de mit dem Passwort Secret123 auch im externen LDAP vorhanden sein.
  • Wenn Sie einen Verwaltungsserver-Cluster ausführen, müssen Sie alle Schritte in diesem Dokument für jeden Verwaltungsserver ausführen.

Externe Authentifizierung konfigurieren

Die Hauptaktivität ist die Konfiguration der Datei management-server.properties. Zu diesen Aktivitäten gehören das Beenden und Starten des Edge-Management-Servers, die Entscheidung, ob Sie direkte oder indirekte Bindung verwenden möchten, das Verschlüsseln vertraulicher Anmeldedaten und andere verwandte Aufgaben.

  1. Wichtig: Entscheiden Sie jetzt, ob Sie die Authentifizierungsmethode für indirekte oder direkte Bindungen verwenden möchten. Diese Entscheidung wirkt sich auf einige Aspekte der Konfiguration aus. Siehe Externe Authentifizierung.
  2. Wichtig: Sie müssen diese Konfigurationsschritte auf jedem Apigee Edge Management-Server ausführen (wenn Sie mehr als einen ausführen).
  3. Öffnen Sie /opt/apigee/customer/application/management-server.properties in einem Texteditor. Wenn die Datei nicht vorhanden ist, erstellen Sie sie.
  4. Fügen Sie die folgende Zeile hinzu. Hinweis: Achten Sie darauf, dass am Ende der Zeile keine Leerzeichen stehen.

    conf_security_authentication.user.store=externalized.authentication

    In dieser Zeile wird das Feature für die externe Authentifizierung zu Ihrer Edge for Private Cloud-Installation hinzugefügt.
  5. Zur Vereinfachung dieses Schritts haben wir zwei gut kommentierte Beispielkonfigurationen erstellt - eine für die direkte und eine für die indirekte Bindungsauthentifizierung. Schließen Sie die Konfiguration in den folgenden Beispielen für die Bindung ab, die Sie verwenden möchten:

    Konfigurationsbeispiel für DIRECT BINDING
    Konfigurationsbeispiel für INDIREKTE BINDING
  6. Starten Sie den Verwaltungsserver neu:
    > /opt/apigee/apigee-service/bin/apigee-service-Edge-management-server-Neustart
  7. Prüfen Sie, ob der Server ausgeführt wird:
    > Status /opt/apigee/apigee-service/bin/apigee-all
  8. Wichtig: Unter den folgenden Bedingungen müssen Sie eine zusätzliche Konfiguration vornehmen: (a) wenn Nutzer sich mit Nutzernamen anmelden sollen, die keine E-Mail-Adressen sind. In diesem Fall muss sich Ihr Systemadministrator auch mit einem Nutzernamen authentifizieren und/oder (b) wenn sich das Passwort für Ihr Sysadmin-Nutzerkonto in Ihrem externen LDAP von dem Passwort unterscheidet, das Sie bei der ersten Installation von Apigee Edge für Private Cloud konfiguriert haben. Weitere Informationen finden Sie unter Konfiguration für verschiedene Sysadmin-Anmeldedaten erforderlich.

Konfigurationsbeispiel für DIRECT BINDING

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

Konfigurationsbeispiel für INDIREKTE BINDUNG

## 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:
    > Status /opt/apigee/apigee-service/bin/apigee-all
  2. Führen Sie diesen Befehl aus und geben Sie einen Satz globaler Apigee Edge-Systemadministratoranmeldedaten an. Der API-Aufruf, den wir testen, kann nur von einem Edge-Sysadmin ausgeführt werden.

    Wichtig: In Ihrem externen LDAP-Konto müssen identische Anmeldedaten vorhanden sein. Falls nicht, müssen Sie sie jetzt hinzufügen. Beachten Sie, dass der Nutzername normalerweise eine E-Mail-Adresse ist. Er hängt jedoch davon ab, wie Sie die externe Authentifizierung konfiguriert haben, wie weiter oben in diesem Dokument erläutert.
    > curl -v http://<management-server-ip>:8080/v1/o -u <Sysadmin-Nutzername>

    Beispiel:
    > curl -v http://192.168.52.100:8080/v1/o -u j
  3. Geben Sie Ihr Passwort ein, wenn Sie dazu aufgefordert werden.

    Wenn der Befehl den Status 200 und eine Liste von Organisationen zurückgibt, ist die Konfiguration korrekt. Mit diesem Befehl wird geprüft, ob der API-Aufruf an den Edge Management Server erfolgreich über das externe LDAP-System authentifiziert wurde.