Harici kimlik doğrulama etkinleştiriliyor

Bu bölümde, kullanıcı kimlik doğrulaması amacıyla bir LDAP hizmetini Apigee Edge'e entegre etmek için gereken bileşenlerin nasıl edinileceği, yükleneceği ve yapılandırılacağı açıklanmaktadır.

Ön koşullar

  • Apigee Edge for Private Cloud 4.18.05 yüklemeniz olmalıdır.
  • Bu yüklemeyi gerçekleştirebilmek için Apigee Edge for Private Cloud'da genel sistem yöneticisi kimlik bilgilerine sahip olmanız gerekir.
  • Private Cloud yüklemeniz için Apigee Edge'in kök dizinini bilmeniz gerekir. Varsayılan kök dizin /opt'dir.
  • Edge global sistem yöneticisi kimlik bilgilerinizi harici LDAP'ye eklemeniz gerekir. sysadmin kimlik bilgilerinin varsayılan olarak Edge dahili LDAP'de depolandığını unutmayın. Harici LDAP'ye geçtiğinizde, sysadmin kimlik bilgileriniz doğrulanır. Bu nedenle, Edge'de harici kimlik doğrulamayı etkinleştirmeden önce kimlik bilgilerini harici sisteme sağlamanız gerekir.

    Örneğin, Private Cloud için Apigee Edge'i global sistem yöneticisi kimlik bilgileriyle şu şekilde yapılandırıp yüklediyseniz:

    username: edgeuser@mydomain.com
    password: Secret123

    Bu durumda Secret123 şifresine sahip edgeuser@mydomain.com kullanıcısının harici LDAP'de de mevcut olması gerekir.

  • Bir Yönetim Sunucusu kümesi çalıştırıyorsanız her bir Yönetim Sunucusu için bu belgedeki tüm adımları uygulamanız gerektiğini unutmayın.

Harici kimlik doğrulamayı yapılandırma

Gerçekleştireceğiniz ana etkinlik, management-server.properties dosyasının yapılandırılmasıdır. Bu etkinlik, Uç Yönetim Sunucusu'nu durdurup başlatmayı, doğrudan veya dolaylı bağlamayı kullanmak isteyip istemediğinize karar vermeyi, hassas kimlik bilgilerini şifrelemeyi ve diğer ilgili görevleri içerir.

  1. Önemli: Dolaylı kimlik doğrulama yöntemini mi yoksa doğrudan bağlamayı mı kullanmak istediğinize şimdi karar verin. Bu karar, yapılandırmanın bazı yönlerini etkileyecektir. Harici Kimlik Doğrulama sayfasını inceleyin.
  2. Önemli: Bu yapılandırma adımlarını her Apigee Edge Yönetim Sunucusu'nda (birden fazla çalıştırıyorsanız) uygulamanız gerekir.
  3. /opt/apigee/customer/application/management-server.properties dosyasını bir metin düzenleyicide açın. Dosya yoksa oluşturun.
  4. Aşağıdaki satırı ekleyin:
    conf_security_authentication.user.store=externalized.authentication

    Bu satır, Private Cloud kurulumu için Edge'inize harici kimlik doğrulama özelliğini ekler.

  5. Bu adımı kolaylaştırmak için biri doğrudan, diğeri dolaylı bağlama kimlik doğrulaması için olmak üzere, iyi yorum yapılan iki örnek yapılandırma oluşturduk. Kullanmak istediğiniz bağlama için aşağıdaki örneklere bakın ve yapılandırmayı tamamlayın:
  6. Yönetim Sunucusu'nu yeniden başlatın:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. Sunucunun çalıştığını doğrulayın:
    /opt/apigee/apigee-service/bin/apigee-all status
  8. Önemli: Aşağıdaki durumlardan biri (veya her ikisi) altında ek yapılandırma yapmanız gerekir:
    1. Kullanıcıların e-posta adresi olmayan kullanıcı adları kullanarak giriş yapmasını istiyorsanız. Bu durumda, sistem yöneticisi kullanıcınız da bir kullanıcı adıyla kimlik doğrulaması yapmalıdır.

      VE/VEYA

    2. Harici LDAP'nizdeki sistem yöneticisi kullanıcı hesabınızın şifresi, Private Cloud için Apigee Edge'i ilk kez yüklediğinizde yapılandırdığınız şifreden farklıysa. Farklı sysadmin kimlik bilgileri için yapılandırma gerekli başlıklı makaleye bakın.

DIRECT BINDING yapılandırma örneği

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

DOLAYLI BINDING yapılandırma örneği

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

Kurulumu test etme

  1. Sunucunun çalıştığını doğrulayın:
    /opt/apigee/apigee-service/bin/apigee-all status
  2. Bir dizi Apigee Edge global sistem yöneticisi kimlik bilgileri sağlayarak bu komutu yürütün. Test edeceğimiz API çağrısı yalnızca bir Edge sistem yöneticisi tarafından yürütülebilir.
    curl -v http://management-server-IP:8080/v1/o -u sysadmin_username

    Örneğin:

    curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. İstendiğinde şifrenizi girin.

    Komut, 200 durumu ve bir kuruluş listesi döndürürse yapılandırma doğrudur. Bu komut, Uç Yönetim Sunucusu'na yapılan API çağrısının harici LDAP sistemi üzerinden başarıyla doğrulandığını doğrular.