Включение внешней аутентификации

Edge для частного облака v. 4.16.09

В этом разделе объясняется, как получить, установить и настроить компоненты, необходимые для интеграции внешней службы LDAP в Apigee Edge для аутентификации пользователей.

Предварительные условия

  • У вас должна быть установлена ​​версия Apigee Edge для частного облака 4.16.09.
  • Для выполнения этой установки у вас должны быть учетные данные глобального системного администратора в Apigee Edge для частного облака.
  • Вам необходимо знать корневой каталог установки Apigee Edge for Private Cloud. Корневой каталог по умолчанию — /opt .
  • Вы должны добавить свои учетные данные глобального системного администратора Edge во внешний LDAP. Помните, что по умолчанию учетные данные системного администратора хранятся во внутреннем LDAP Edge. Как только вы переключитесь на внешний LDAP, вместо этого ваши учетные данные системного администратора будут аутентифицированы там. Поэтому перед включением внешней аутентификации в Edge необходимо предоставить учетные данные внешней системе.

    Например, если вы настроили и установили Apigee Edge для частного облака с учетными данными глобального системного администратора:

    имя пользователя: Edgeuser@mydomain.com
    пароль: Secret123

    Тогда пользователь Edgeuser@mydomain.com с паролем Secret123 также должен присутствовать во внешнем LDAP.
  • Если вы используете кластер Серверов управления, обратите внимание, что вы должны выполнить все шаги, описанные в этом документе, для каждого Сервера управления.

Настройка внешней аутентификации

Основное действие, которое вам предстоит выполнить, — это настройка файла Management-server.properties . Это действие включает в себя остановку и запуск Edge Management Server, принятие решения о том, хотите ли вы использовать прямую или косвенную привязку, шифрование конфиденциальных учетных данных и другие связанные задачи.

  1. Важно ! Теперь решите, собираетесь ли вы использовать метод аутентификации с непрямой или прямой привязкой. Это решение повлияет на некоторые аспекты конфигурации. См. Внешняя аутентификация .
  2. Важно ! Эти шаги настройки необходимо выполнить на каждом сервере управления Apigee Edge (если вы используете более одного).
  3. Откройте /opt/apigee/customer/application/management-server.properties в текстовом редакторе. Если файл не существует, создайте его.
  4. Добавьте следующую строку. Примечание. Убедитесь, что в конце строки нет пробелов .

    conf_security_authentication.user.store=externalized.authentication

    Эта строка добавляет функцию внешней аутентификации в вашу установку Edge for Private Cloud.
  5. Чтобы упростить этот шаг, мы создали два хорошо прокомментированных примера конфигурации — один для прямой и один для аутентификации с непрямой привязкой . Посмотрите примеры ниже для привязки, которую вы хотите использовать, и завершите настройку:

    Пример конфигурации ПРЯМОЙ ПРИВЯЗКИ
    Пример конфигурации НЕПРЯМОЙ ПРИВЯЗКИ
  6. Перезапустите сервер управления:
    > /opt/apigee/apigee-service/bin/apigee-service перезапуск сервера Edge-Management-Server
  7. Убедитесь, что сервер работает:
    > /opt/apigee/apigee-service/bin/apigee-all status
  8. Важно ! Дополнительную настройку необходимо выполнить в одном из следующих случаев (или в обоих случаях): (a) если вы хотите, чтобы пользователи входили в систему с использованием имен пользователей, которые не являются адресами электронной почты. В этом случае ваш системный администратор также должен пройти аутентификацию с использованием имени пользователя и/или (б) если пароль для вашей учетной записи системного администратора во внешнем LDAP отличается от пароля, который вы настроили при первой установке Apigee Edge для частного облака. См. раздел Конфигурация, необходимая для различных учетных данных системного администратора .

Пример конфигурации ПРЯМОЙ ПРИВЯЗКИ

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

Пример конфигурации НЕПРЯМОЙ ПРИВЯЗКИ

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

Тестирование установки

  1. Убедитесь, что сервер работает:
    > /opt/apigee/apigee-service/bin/apigee-all status
  2. Выполните эту команду, предоставив набор учетных данных глобального системного администратора Apigee Edge . Вызов API, который мы собираемся протестировать, может быть выполнен только системным администратором Edge.

    Важно : идентичные учетные данные должны существовать в вашей внешней учетной записи LDAP. Если нет, вам нужно добавить их сейчас. Обратите внимание, что имя пользователя обычно представляет собой адрес электронной почты; однако это зависит от того, как вы настроили внешнюю аутентификацию, как описано ранее в этом документе.
    > curl -v http://< IP-сервера управления >:8080/v1/o -u < Имя пользователя системного администратора >

    Например:
    > завиток -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. Введите свой пароль при появлении запроса.

    Если команда возвращает статус 200 и список организаций, конфигурация правильная. Эта команда проверяет, что вызов API к Edge Management Server был успешно аутентифицирован через внешнюю систему LDAP.