This section explains how to obtain, install, and configure the components required to integrate an LDAP service into Apigee Edge for user authentication.
Prerequisites
- You must have an Apigee Edge for Private Cloud 4.18.05 installation.
- You must have global system administrator credentials on Apigee Edge for Private Cloud to perform this installation.
- You need to know the root directory of your Apigee Edge for Private Cloud installation. The
default root directory is
/opt
. - You must add your Edge global system administrator credentials to the
external LDAP. Remember that by default, the sysadmin credentials are stored in the Edge
internal LDAP. Once you switch to the external LDAP, your sysadmin credentials
will be authenticated there instead. Therefore, you must provision the credentials to the
external system before enabling external authentication in Edge.
For example if you have configured and installed Apigee Edge for Private Cloud with global system administrator credentials as:
username: edgeuser@mydomain.com password: Secret123
Then the user
edgeuser@mydomain.com
with passwordSecret123
must also be present in the external LDAP. - If you are running a Management Server cluster, note that you must perform all of the steps in this document for each Management Server.
Configuring external authentication
The main activity you'll perform is configuring the management-server.properties
file.
This activity includes stopping and starting the Edge Management Server, deciding whether you
want to use direct or indirect binding, encrypting sensitive credentials, and other related
tasks.
- Important: Decide now whether you intend to use the indirect or direct binding authentication method. This decision will affect some aspects of the configuration. See External Authentication.
- Important: You must do these config steps on each Apigee Edge Management Server (if you are running more than one).
- Open
/opt/apigee/customer/application/management-server.properties
in a text editor. If the file does not exist, create it. - Add the following line:
conf_security_authentication.user.store=externalized.authentication
This line adds the external authentication feature to your Edge for Private Cloud installation.
- To make this step easy, we have created two well-commented sample configurations -- one for direct and one for indirect binding authentication. See the samples below for the binding you wish to use, and complete the configuration:
- Restart the Management Server:
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- Verify that the server is running:
/opt/apigee/apigee-service/bin/apigee-all status
- Important: You must do an additional configuration under either (or both)
of the following circumstances:
- If you intend to have users log in using usernames that are
not email addresses. In this case, your sysadmin user must also authenticate with a
username.
AND/OR
- If the password for your sysadmin user account in your external LDAP is different from the password you configured when you first installed Apigee Edge for Private Cloud. See Configuration required for different sysadmin credentials.
- If you intend to have users log in using usernames that are
not email addresses. In this case, your sysadmin user must also authenticate with a
username.
DIRECT BINDING configuration sample
## 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}
INDIRECT BINDING configuration sample
## 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
Testing the installation
- Verify that the server is running:
/opt/apigee/apigee-service/bin/apigee-all status
- Execute this command, providing a set of Apigee Edge global system admin
credentials. The API call we're going to test can only be executed by an Edge
sysadmin.
curl -v http://management-server-IP:8080/v1/o -u sysadmin_username
For example:
curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
- Enter your password when prompted.
If the command returns a 200 status and a list of organizations, the configuration is correct. This command verifies that the API call to the Edge Management Server was successfully authenticated through the external LDAP system.