Edge dla chmury prywatnej w wersji 4.17.05
W tej sekcji wyjaśniamy, jak uzyskać, zainstalować i skonfigurować komponenty wymagane do zintegrowania zewnętrznej usługi LDAP z Apigee Edge na potrzeby uwierzytelniania użytkowników.
Wymagania wstępne
- Musisz mieć zainstalowaną usługę Apigee Edge dla chmury prywatnej w wersji 4.17.05.
- Aby przeprowadzić tę instalację, musisz mieć dane logowania globalnego administratora systemu w Apigee Edge dla chmury prywatnej.
- Musisz znać katalog główny instalacji Apigee Edge dla chmury prywatnej. Domyślny katalog główny to /opt.
- Musisz dodać dane logowania globalnego administratora systemu Edge do zewnętrznego serwera LDAP. Pamiętaj, że domyślnie dane logowania administratora systemu są przechowywane w wewnętrznym katalogu LDAP Edge. Gdy przełączysz się na zewnętrzny serwer LDAP, Twoje dane logowania sysadmina będą uwierzytelniane na tym serwerze. Dlatego musisz udostępnić dane logowania systemowi zewnętrznemu, zanim włączysz uwierzytelnianie zewnętrzne w Edge.
Jeśli na przykład skonfigurujesz i zainstalujesz Apigee Edge dla chmury prywatnej z globalnymi danymi logowania administratora systemu:
nazwa użytkownika: edgeuser@mydomain.com
hasło: Secret123
użytkownik edgeuser@mydomain.com z hasłem Secret123 musi również znajdować się w zewnętrznym katalogu LDAP. - Jeśli używasz klastra serwerów zarządzania, pamiętaj, że musisz wykonać wszystkie czynności opisane w tym dokumencie na każdym serwerze zarządzania.
Konfigurowanie uwierzytelniania zewnętrznego
Główną czynnością, którą wykonasz, będzie skonfigurowanie pliku management-server.properties. Obejmuje to zatrzymywanie i uruchamianie serwera zarządzania Edge, decydowanie, czy chcesz używać wiązania bezpośredniego czy pośredniego, szyfrowanie poufnych danych logowania i inne powiązane zadania.
- Ważne: zdecyduj teraz, czy chcesz używać metody uwierzytelniania z powiązaniem pośrednim czy bezpośrednim. Ta decyzja wpłynie na niektóre aspekty konfiguracji. Zapoznaj się z artykułem Uwierzytelnianie zewnętrzne.
- Ważne: te czynności konfiguracyjne musisz wykonać na każdym serwerze zarządzania Apigee Edge (jeśli masz ich więcej niż 1).
- Otwórz plik /opt/apigee/customer/application/management-server.properties w edytorze tekstu. Jeśli plik nie istnieje, utwórz go.
- Dodaj ten wiersz. Uwaga: upewnij się, że na końcu wiersza nie ma spacji.
conf_security_authentication.user.store=externalized.authentication
Ten wiersz dodaje funkcję uwierzytelniania zewnętrznego do instalacji Edge dla chmury prywatnej. - Aby ułatwić ten krok, utworzyliśmy 2 dobrze skomentowane przykładowe konfiguracje – jedną dla uwierzytelniania z powiązaniem bezpośrednim i jedną dla uwierzytelniania z powiązaniem pośrednim. Zapoznaj się z poniższymi przykładami powiązań, których chcesz użyć, i dokończ konfigurację:
Przykładowa konfiguracja POWIĄZANIA BEZPOŚREDNIEGO
Przykładowa konfiguracja POWIĄZANIA POŚREDNIEGO - Uruchom ponownie serwer zarządzania:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart - Sprawdź, czy serwer działa:
> /opt/apigee/apigee-service/bin/apigee-all status - Ważne: musisz przeprowadzić dodatkową konfigurację, jeśli: (a) chcesz, aby użytkownicy logowali się przy użyciu nazw użytkowników, które nie są adresami e-mail; W takim przypadku użytkownik sysadmin musi również uwierzytelnić się za pomocą nazwy użytkownika lub (b) jeśli hasło do konta użytkownika sysadmin w zewnętrznym katalogu LDAP różni się od hasła skonfigurowanego podczas pierwszej instalacji Apigee Edge dla chmury prywatnej. Zobacz Konfiguracja wymagana w przypadku różnych danych logowania administratora systemu.
Przykładowa konfiguracja DIRECT BINDING
## 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}
Przykładowa konfiguracja WIĄZANIA POŚREDNIEGO
## 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 "Indirect binding only: Encrypting the external LDAP user’s password". 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
Testowanie instalacji
- Sprawdź, czy serwer działa:
> /opt/apigee/apigee-service/bin/apigee-all status - Wykonaj to polecenie, podając zestaw danych logowania administratora systemu globalnego Apigee Edge. Wywołanie interfejsu API, które będziemy testować, może wykonać tylko administrator systemu Edge.
Ważne: na zewnętrznym koncie LDAP muszą istnieć identyczne dane logowania. Jeśli nie, musisz je teraz dodać. Pamiętaj, że nazwa użytkownika jest zwykle adresem e-mail, ale zależy to od sposobu skonfigurowania uwierzytelniania zewnętrznego, jak wyjaśniono wcześniej w tym dokumencie.
> curl -v http://<management-server-ip>:8080/v1/o -u <Sysadmin Username>
Na przykład:
> curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com - Gdy pojawi się prośba, wpisz hasło.
Jeśli polecenie zwraca stan 200 i listę organizacji, konfiguracja jest prawidłowa. To polecenie sprawdza, czy wywołanie interfejsu API do serwera zarządzania Edge zostało pomyślnie uwierzytelnione przez zewnętrzny system LDAP.