Mengaktifkan autentikasi eksternal

Edge for Private Cloud v. 4.17.01

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

Prasyarat

  • Anda harus memiliki penginstalan Apigee Edge untuk Private Cloud 4.17.01.
  • Anda harus memiliki kredensial administrator sistem global di Apigee Edge agar Private Cloud melakukan instalasi ini.
  • Anda perlu mengetahui direktori utama Apigee Edge untuk penginstalan Private Cloud. Tujuan direktori utama default-nya adalah /opt.
  • Anda harus menambahkan kredensial administrator sistem global Edge ke LDAP eksternal. Ingat bahwa secara {i>default<i}, kredensial {i>sysadmin<i} disimpan di Edge LDAP internal. Setelah Anda beralih ke LDAP eksternal, kredensial sysadmin Anda akan diotentikasi di sana. Oleh karena itu, Anda harus menyediakan kredensial untuk sistem eksternal sebelum mengaktifkan autentikasi eksternal di Edge.

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

    nama pengguna: edgeuser@mydomain.com
    sandi: Secret123

    Kemudian, pengguna edgeuser@mydomain.com dengan sandi Secret123 juga harus ada dalam LDAP eksternal.
  • Jika menjalankan cluster Server Pengelolaan, 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 termasuk menghentikan dan memulai Server Pengelolaan Edge, memutuskan apakah Anda ingin menggunakan pengikatan langsung atau tidak langsung, mengenkripsi kredensial sensitif, dan masalah tugas klasifikasi.

  1. Penting: Tentukan sekarang apakah Anda akan menggunakan layanan tidak langsung atau langsung metode otentikasi binding. Keputusan ini akan memengaruhi beberapa aspek konfigurasi. Lihat Autentikasi Eksternal.
  2. Penting: Anda harus melakukan langkah-langkah konfigurasi ini di setiap Pengelolaan Apigee Edge Server (jika Anda menjalankan lebih dari satu server).
  3. Buka /opt/apigee/customer/application/management-server.properties di editor teks. Jika file tidak ada, buat file tersebut.
  4. Tambahkan baris berikut. Catatan: Pastikan tidak ada spasi di bagian akhir garis.

    conf_security_authentication.user.store=externalized.authentication

    Baris ini menambahkan fitur autentikasi eksternal ke Edge untuk Private Cloud Anda penginstalan.
  5. Untuk mempermudah langkah ini, kami telah membuat dua contoh konfigurasi yang telah dikomentari dengan baik, satu untuk autentikasi binding langsung dan satu lagi untuk autentikasi binding tidak langsung. Lihat contoh di bawah untuk binding yang ingin Anda gunakan, dan menyelesaikan konfigurasi:

    LANGSUNG Contoh konfigurasi BINDING
    TIDAK LANGSUNG Contoh konfigurasi BINDING
  6. Mulai ulang Server Pengelolaan:
    &gt; /opt/apigee/apigee-service/bin/apigee-service edge-management-server mulai ulang
  7. Pastikan server sedang berjalan:
    &gt; /opt/apigee/apigee-service/bin/apigee-all
  8. Penting: Anda harus melakukan konfigurasi tambahan di salah satu (atau keduanya) dari keadaan berikut: (a) jika Anda bermaksud meminta pengguna untuk masuk menggunakan nama pengguna yang bukan alamat email. Dalam hal ini, pengguna {i>sysadmin<i} Anda juga harus mengotentikasi dengan nama pengguna dan/atau (b) jika sandi untuk akun pengguna sysadmin di akun eksternal LDAP berbeda dengan sandi yang Anda konfigurasi saat pertama kali menginstal Apigee Edge untuk di Cloud Private Cloud. Lihat Konfigurasi yang diperlukan untuk kredensial admin sistem yang berbeda.

MENGIKAT LANGSUNG contoh konfigurasi

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

MENGIKAT TIDAK LANGSUNG contoh konfigurasi

## 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:
    &gt; /opt/apigee/apigee-service/bin/apigee-all status
  2. Jalankan perintah ini, dengan menyediakan kumpulan admin sistem global Apigee kredensial. Panggilan API yang akan kita uji hanya dapat dijalankan oleh Edge sysadmin.

    Penting: Kredensial yang sama harus ada di akun LDAP eksternal Anda. Jika tidak, Anda harus menambahkannya sekarang. Perhatikan bahwa nama pengguna biasanya berupa alamat email; namun, tergantung pada bagaimana Anda mengkonfigurasi otentikasi eksternal, seperti yang dijelaskan sebelumnya dokumen.
    &gt; {i>curl -v<i} http://<management-server-ip>:8080/v1/o -u <Nama Pengguna Administrator Sistem>

    Contoh:
    &gt; {i>curl -v<i} 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, konfigurasi sudah benar. Perintah ini memverifikasi bahwa panggilan API ke Server Pengelolaan Edge berhasil diotentikasi melalui sistem LDAP eksternal.