Harici kimlik doğrulama etkinleştiriliyor

Edge for Private Cloud 4.17.09 sürümü

Bu bölümde, kullanıcı kimlik doğrulaması için harici bir LDAP hizmetini Apigee Edge'e entegre etmek üzere 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.17.09 sürümünü yüklemiş olmanız gerekir.
  • Bu yükleme işlemini gerçekleştirmek için Apigee Edge for Private Cloud'da genel sistem yöneticisi kimlik bilgilerine sahip olmanız gerekir.
  • Apigee Edge for Private Cloud kurulumunuzun kök dizinini bilmeniz gerekir. Varsayılan kök dizin /opt'tur.
  • Edge genel sistem yöneticisi kimlik bilgilerinizi harici LDAP'ye eklemeniz gerekir. Varsayılan olarak, sysadmin kimlik bilgilerinin Edge dahili LDAP'sinde depolandığını unutmayın. Harici LDAP'ye geçtikten sonra sistem yöneticisi kimlik bilgileriniz burada doğrulanır. Bu nedenle, Edge'de harici kimlik doğrulamayı etkinleştirmeden önce kimlik bilgilerini harici sisteme sağlamanız gerekir.

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

    kullanıcı adı: edgeuser@mydomain.com
    şifre: Secret123

    Bu durumda, şifresi Secret123 olan edgeuser@mydomain.com kullanıcısı harici LDAP'de de bulunmalıdır.
  • Bir Yönetim Sunucusu kümesi çalıştırıyorsanız bu belgedeki tüm adımları her Yönetim Sunucusu için uygulamanız gerektiğini unutmayın.

Harici kimlik doğrulamayı yapılandırma

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

  1. Önemli: Dolaylı veya doğrudan bağlama kimlik doğrulama yöntemlerinden hangisini kullanacağınıza şimdi karar verin. Bu karar, yapılandırmanın bazı yönlerini etkiler. Harici Kimlik Doğrulama başlıklı makaleyi inceleyin.
  2. Önemli: Bu yapılandırma adımlarını her Apigee Edge Yönetim Sunucusu'nda (birden fazla sunucu çalıştırıyorsanız) yapmanı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. Not: Satırın sonunda boşluk olmadığından emin olun.

    conf_security_authentication.user.store=externalized.authentication

    Bu satır, Edge for Private Cloud kurulumunuza harici kimlik doğrulama özelliğini ekler.
  5. Bu adımı kolaylaştırmak için iyi yorumlanmış iki örnek yapılandırma oluşturduk: biri doğrudan, diğeri ise dolaylı bağlama kimlik doğrulaması için. Kullanmak istediğiniz bağlama için aşağıdaki örneklere bakın ve yapılandırmayı tamamlayın:

    DOĞRUDAN BAĞLAMA yapılandırma örneği
    DOLAYLI BAĞLAMA yapılandırma örneği
  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) geçerliyse ek bir yapılandırma yapmanız gerekir: (a) Kullanıcıların e-posta adresi olmayan kullanıcı adlarını kullanarak giriş yapmasını istiyorsanız. Bu durumda, sysadmin kullanıcınızın bir kullanıcı adı ile de kimlik doğrulaması yapması gerekir ve/veya (b) harici LDAP'nizdeki sysadmin kullanıcı hesabınızın şifresi, Private Cloud için Apigee Edge'i ilk yüklediğinizde yapılandırdığınız şifreden farklıysa. Farklı sysadmin kimlik bilgileri için gereken yapılandırma bölümüne bakın.

DOĞRUDAN BAĞLAMA 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, 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}

DOLAYLI BAĞLAMA 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. Apigee Edge genel sistem yöneticisi kimlik bilgilerini sağlayarak bu komutu yürütün. Test edeceğimiz API çağrısı yalnızca bir Edge sysadmin tarafından yürütülebilir.

    Önemli: Harici LDAP hesabınızda aynı kimlik bilgileri bulunmalıdır. Eklenmemişse şimdi eklemeniz gerekir. Kullanıcı adının genellikle bir e-posta adresi olduğunu unutmayın. Ancak bu, harici kimlik doğrulamayı nasıl yapılandırdığınıza bağlıdır. Bu konu, dokümanın önceki bölümlerinde açıklanmıştır.
    > 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 durumunu ve kuruluşların listesini döndürürse yapılandırma doğrudur. Bu komut, Edge Yönetim Sunucusu'na yapılan API çağrısının harici LDAP sistemi üzerinden başarıyla kimlik doğrulamasından geçtiğini doğrular.