Activer l'authentification externe

Edge pour Private Cloud version 4.17.01

Cette section explique comment obtenir, installer et configurer les composants requis pour intégrer un service LDAP externe dans Apigee Edge pour l'authentification des utilisateurs.

Prérequis

  • Vous devez disposer d'une installation Apigee Edge for Private Cloud 4.17.01.
  • Vous devez disposer d'identifiants d'administrateur système global sur Apigee Edge pour Private Cloud pour effectuer cette installation.
  • Vous devez connaître le répertoire racine de votre installation Apigee Edge pour Private Cloud. La le répertoire racine par défaut est /opt.
  • Vous devez ajouter vos identifiants d'administrateur système global Edge au LDAP externe. N'oubliez pas que par défaut, les informations d'identification sysadmin sont stockées dans le LDAP interne. Une fois que vous passez au serveur LDAP externe, vos identifiants d'administrateur système y seront authentifiés. Vous devez donc provisionner les identifiants système externe avant d'activer l'authentification externe dans Edge.

    Par exemple, si vous avez configuré et installé Apigee Edge pour Private Cloud avec une gestion identifiants d'administrateur système en tant que:

    nom d'utilisateur: edgeuser@mydomain.com
    mot de passe: Secret123

    L'utilisateur edgeuser@mydomain.com avec le mot de passe Secret123 doit également être présent sur le serveur LDAP externe.
  • Si vous exécutez un cluster de serveur de gestion, notez que vous devez effectuer toutes les étapes dans ce document pour chaque serveur de gestion.

Configurer l'authentification externe

L'activité principale que vous allez effectuer consiste à configurer le fichier management-server.properties. Cette activité inclut l'arrêt et le démarrage du serveur de gestion Edge, le choix vous souhaitez utiliser une liaison directe ou indirecte, chiffrer les identifiants sensibles et d'autres tâches.

  1. Important: Déterminez maintenant si vous prévoyez d'utiliser l'accès indirect ou direct et par liaison d'authentification. Cette décision aura une incidence sur certains aspects de la configuration. Voir Authentification externe.
  2. Important: Vous devez effectuer ces étapes de configuration sur chaque gestion d'Apigee Edge Server (si vous en exécutez plusieurs).
  3. Ouvrez /opt/apigee/customer/application/management-server.properties. dans un éditeur de texte. Si le fichier n'existe pas, créez-le.
  4. Ajoutez la ligne suivante. Remarque: Assurez-vous qu'il n'y a pas d'espace à la fin de la ligne.

    conf_security_authentication.user.store=externalized.authentication

    Cette ligne ajoute la fonction d'authentification externe à votre Edge pour Private Cloud l'installation.
  5. Pour faciliter cette étape, nous avons créé deux exemples de configuration bien commentés : une pour l'authentification directe et une pour l'authentification par liaison indirecte. Consultez les exemples ci-dessous pour la liaison que vous souhaitez utiliser et terminez la configuration:

    DIRECTE Exemple de configuration de liaison
    MÉCIALE Exemple de configuration de liaison
  6. Redémarrez le serveur de gestion:
    > /opt/apigee/apigee-service/bin/apigee-service Edge-management-server restart
  7. Vérifiez que le serveur est en cours d'exécution:
    > /opt/apigee/apigee-service/bin/apigee-all statut
  8. Important: Vous devez effectuer une configuration supplémentaire dans l'une des applications (ou les deux) dans les cas suivants: (a) si vous avez l'intention que les utilisateurs se connectent avec un nom d'utilisateur et non des adresses e-mail. Dans ce cas, votre utilisateur système doit également s'authentifier avec un nom d'utilisateur et/ou (b) si le mot de passe de votre compte utilisateur "sysadmin" dans votre instance externe LDAP est différent du mot de passe que vous avez configuré lors de la première installation d'Apigee Edge pour Private Cloud. Reportez-vous à la section Configuration requise pour identifiants d'administrateur système différents.

LIENS DIRECTS exemple de configuration

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

LIAISON PUBLICITAIRE exemple de configuration

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

Tester l'installation

  1. Vérifiez que le serveur est en cours d'exécution:
    > /opt/apigee/apigee-service/bin/apigee-all état
  2. Exécutez cette commande, qui fournit un ensemble d'administrateurs système globaux Apigee Edge. identifiants. L'appel d'API que nous allons tester ne peut être exécuté que par un sysadmin.

    Important: Les identifiants identiques doivent exister dans votre compte LDAP externe. Si ce n'est pas le cas, vous devez les ajouter maintenant. Notez que le nom d'utilisateur est généralement une adresse e-mail. Toutefois, cela dépend de la manière dont vous avez configuré l'authentification externe, document.
    &gt; curl -v http://<management-server-ip>:8080/v1/o -u <Nom d'administrateur système>

    Exemple:
    &gt; curl -v http://192.168.52.100:8080/v1/o -u jdupont@mondomaine.com
  3. Saisissez votre mot de passe lorsque vous y êtes invité.

    Si la commande renvoie l'état 200 et une liste d'organisations, la configuration est correcte. Cette commande vérifie que l'appel d'API vers le serveur de gestion Edge a bien été authentifiés via le système LDAP externe.