Mengaktifkan autentikasi eksternal

Edge untuk Private Cloud v4.18.05

Bagian ini menjelaskan cara mendapatkan, menginstal, dan mengonfigurasi komponen yang diperlukan untuk mengintegrasikan layanan LDAP ke Apigee Edge untuk autentikasi pengguna.

Prasyarat

  • Anda harus memiliki Apigee Edge untuk penginstalan Private Cloud 4.18.05.
  • Anda harus memiliki kredensial administrator sistem global di Apigee Edge agar Private Cloud dapat menjalankan penginstalan ini.
  • Anda perlu mengetahui direktori utama Apigee Edge untuk penginstalan Private Cloud. Direktori utama default adalah /opt.
  • Anda harus menambahkan kredensial administrator sistem global Edge ke LDAP eksternal. Ingat bahwa secara default, kredensial sysadmin disimpan di LDAP internal Edge. Setelah Anda beralih ke LDAP eksternal, kredensial sysadmin Anda akan diautentikasi di sana. Oleh karena itu, Anda harus menyediakan kredensial ke sistem eksternal sebelum mengaktifkan autentikasi eksternal di Edge.

    Misalnya, jika Anda telah mengonfigurasi dan menginstal Apigee Edge untuk Private Cloud dengan kredensial administrator sistem global sebagai:

    username: edgeuser@mydomain.com
    password: Secret123

    Kemudian, pengguna edgeuser@mydomain.com dengan sandi Secret123 juga harus ada di LDAP eksternal.

  • Jika menjalankan cluster Server Pengelolaan, perhatikan bahwa Anda harus melakukan semua langkah dalam dokumen ini untuk setiap Server Pengelolaan.

Mengonfigurasi autentikasi eksternal

Aktivitas utama yang akan Anda lakukan adalah mengonfigurasi file management-server.properties. Aktivitas ini mencakup menghentikan dan memulai Server Pengelolaan Edge, memutuskan apakah Anda ingin menggunakan binding langsung atau tidak langsung, mengenkripsi kredensial sensitif, dan tugas terkait lainnya.

  1. Penting: Tentukan apakah Anda ingin menggunakan metode autentikasi binding langsung atau tidak langsung. Keputusan ini akan memengaruhi beberapa aspek konfigurasi. Lihat Autentikasi Eksternal.
  2. Penting: Anda harus melakukan langkah-langkah konfigurasi ini di setiap Server Pengelolaan Apigee Edge (jika Anda menjalankan lebih dari satu).
  3. Buka /opt/apigee/customer/application/management-server.properties di editor teks. Jika file tidak ada, buat file tersebut.
  4. Tambahkan baris berikut:
    conf_security_authentication.user.store=externalized.authentication

    Baris ini menambahkan fitur autentikasi eksternal ke Edge untuk penginstalan Private Cloud.

  5. Untuk memudahkan langkah ini, kami telah membuat dua konfigurasi contoh yang diberi komentar dengan baik -- satu untuk autentikasi langsung dan satu lagi untuk autentikasi binding tidak langsung. Lihat contoh di bawah untuk binding yang ingin Anda gunakan, dan selesaikan konfigurasi:
  6. Mulai ulang Server Pengelolaan:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. Pastikan server sedang berjalan:
    /opt/apigee/apigee-service/bin/apigee-all status
  8. Penting: Anda harus melakukan konfigurasi tambahan dalam salah satu (atau kedua) keadaan berikut:
    1. Jika Anda ingin pengguna login menggunakan nama pengguna yang bukan alamat email. Dalam hal ini, pengguna sysadmin Anda juga harus melakukan autentikasi dengan nama pengguna.

      DAN/ATAU

    2. Jika sandi untuk akun pengguna sysadmin di LDAP eksternal Anda berbeda dengan sandi yang dikonfigurasi saat pertama kali menginstal Apigee Edge untuk Private Cloud. Lihat Konfigurasi yang diperlukan untuk kredensial sysadmin yang berbeda.

Contoh konfigurasi MENGIKAT LANGSUNG

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

Contoh konfigurasi MENGIKAT LANGSUNG

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

Menguji penginstalan

  1. Pastikan server sedang berjalan:
    /opt/apigee/apigee-service/bin/apigee-all status
  2. Jalankan perintah ini, dengan menyediakan serangkaian kredensial admin sistem global Apigee Edge. Panggilan API yang akan kita uji hanya dapat dijalankan oleh sysadmin Edge.
    curl -v http://management-server-IP:8080/v1/o -u sysadmin_username

    Contoh:

    curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. Masukkan sandi jika diminta.

    Jika perintah menampilkan status 200 dan daftar organisasi, konfigurasinya sudah benar. Perintah ini memverifikasi bahwa panggilan API ke Edge Management Server berhasil diautentikasi melalui sistem LDAP eksternal.