Abilitazione dell'autenticazione esterna

Edge per Private Cloud v4.18.01

Questa sezione spiega come ottenere, installare e configurare i componenti necessari per integrare un servizio LDAP esterno in Apigee Edge per l'autenticazione degli utenti.

Prerequisiti

  • Devi avere un'installazione Apigee Edge per Private Cloud 4.18.01.
  • Per eseguire questa installazione, devi disporre delle credenziali di amministratore di sistema globali su Apigee Edge per il cloud privato.
  • Devi conoscere la directory radice dell'installazione di Apigee Edge per il cloud privato. La directory principale predefinita è /opt.
  • Devi aggiungere le tue credenziali di amministratore di sistema globali Edge al server LDAP esterno. Ricorda che, per impostazione predefinita, le credenziali sysadmin sono archiviate nel server LDAP interno perimetrale. Quando passi al LDAP esterno, le tue credenziali di amministratore di sistema verranno autenticate lì. Pertanto, devi eseguire il provisioning delle credenziali nel sistema esterno prima di abilitare l'autenticazione esterna in Edge.

    Ad esempio, se hai configurato e installato Apigee Edge per cloud privato con credenziali di amministratore di sistema globali come:

    nome utente: edgeuser@miodominio.com
    password: Secret123

    Allora l'utente edgeuser@miodominio.com con password Secret123 deve essere presente anche nel LDAP esterno.
  • Se esegui un cluster di server di gestione, tieni presente che devi eseguire tutti i passaggi in questo documento per ciascun server di gestione.

Configurazione dell'autenticazione esterna

L'attività principale che eseguirai è la configurazione del file management-server.properties. Questa attività include l'arresto e l'avvio di Edge Management Server, nonché decidere se utilizzare l'associazione diretta o indiretta, criptare le credenziali sensibili e altre attività correlate.

  1. Importante: decidi ora se intendi utilizzare il metodo di autenticazione di associazione indiretta o diretta. Questa decisione influirà su alcuni aspetti della configurazione. Vedi Autenticazione esterna.
  2. Importante: devi eseguire questi passaggi di configurazione su ciascun server Apigee Edge Management (se ne esegui più di uno).
  3. Apri /opt/apigee/customer/application/management-server.properties in un editor di testo. Se il file non esiste, crealo.
  4. Aggiungi la seguente riga. Nota: assicurati che non ci siano spazi finali alla fine della riga.

    conf_security_authentication.user.store=externalized.authentication

    Questa riga aggiunge la funzionalità di autenticazione esterna all'installazione di Edge per Cloud privato.
  5. Per semplificare questo passaggio, abbiamo creato due configurazioni di esempio ben commentate: una per l'autenticazione di associazione diretta e una per l'associazione indiretta. Consulta gli esempi riportati di seguito per l'associazione che vuoi utilizzare e completa la configurazione:

    Esempio di configurazione di DIRECT BINDING
    Esempio di configurazione di BINDING INDIRETTO
  6. Riavvia il server di gestione:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server reboot
  7. Verifica che il server sia in esecuzione:
    > stato /opt/apigee/apigee-service/bin/apigee-all
  8. Importante: devi eseguire una configurazione aggiuntiva in una o entrambe le seguenti circostanze: (a) se vuoi che gli utenti accedano utilizzando nomi utente diversi da indirizzi email. In questo caso, l'utente di amministratore di sistema deve anche autenticarsi con un nome utente e/o (b) se la password dell'account utente di amministratore di sistema nel server LDAP esterno è diversa da quella configurata alla prima installazione di Apigee Edge per il cloud privato. Vedi Configurazione richiesta per credenziali sysadmin diverse.

Esempio di configurazione di associazione diretta

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

Esempio di configurazione BINDING INDIRETTO

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

Test dell'installazione

  1. Verifica che il server sia in esecuzione:
    > stato /opt/apigee/apigee-service/bin/apigee-all
  2. Esegui questo comando, fornendo un set di credenziali di amministratore del sistema globale di Apigee Edge. La chiamata API che testeremo può essere eseguita solo da un amministratore di sistema Edge.

    Importante: le credenziali identiche devono esistere nel tuo account LDAP esterno. In caso contrario, devi aggiungerli ora. Tieni presente che in genere il nome utente è un indirizzo email, ma dipende da come hai configurato l'autenticazione esterna, come spiegato in precedenza in questo documento.
    > curl -v http://<management-server-ip>:8080/v1/o -u <Nome utente Sysadmin>

    Ad esempio:
    > curl -v http://192.168.52.100:8080/v1/o -mydomain.comjdoe
  3. Inserisci la password quando richiesto.

    Se il comando restituisce lo stato 200 e un elenco di organizzazioni, la configurazione è corretta. Questo comando verifica che la chiamata API a Edge Management Server sia stata autenticata correttamente tramite il sistema LDAP esterno.