Włączanie uwierzytelniania zewnętrznego

Edge for Private Cloud, wersja 4.18.01

Z tej sekcji dowiesz się, jak uzyskać, zainstalować i skonfigurować komponenty wymagane do integracji zewnętrznej usługi LDAP z Apigee Edge na potrzeby uwierzytelniania użytkowników.

Wymagania wstępne

  • Musisz zainstalować Apigee Edge dla instalacji Private Cloud 4.18.01.
  • Aby przeprowadzić tę instalację w chmurze prywatnej, musisz mieć globalne dane logowania administratora systemu w Apigee Edge.
  • Musisz znać katalog główny instalacji Apigee Edge na potrzeby instalacji Private Cloud. Domyślny katalog główny to /opt.
  • Do zewnętrznego LDAP musisz dodać dane logowania globalnego administratora systemu Edge. Pamiętaj, że domyślnie dane logowania sysadmin są przechowywane w wewnętrznym LDAP serwera Edge. Gdy przejdziesz na zewnętrzny LDAP, uwierzytelniane będą w nim dane logowania sysadmin. W związku z tym musisz udostępnić dane logowania w systemie zewnętrznym przed włączeniem uwierzytelniania zewnętrznego w Edge.

    Jeśli na przykład masz skonfigurowane i zainstalowane aplikacje Apigee Edge dla chmury prywatnej z globalnymi danymi logowania administratora, takie jak:

    nazwa_użytkownika: edgeuser@mojadomena.com
    hasło: Secret123

    Następnie w zewnętrznym LDAP musi znajdować się użytkownik edgeuser@mojadomena.com z hasłem Secret123.
  • Jeśli uruchamiasz klaster serwera zarządzania, musisz wykonać wszystkie czynności opisane w tym dokumencie dla każdego serwera zarządzania.

Konfigurowanie uwierzytelniania zewnętrznego

Najważniejsze czynności, które musisz wykonać, to skonfigurowanie pliku management-server.property. Obejmuje to zatrzymanie i uruchomienie serwera zarządzania brzegiem, podjęcie decyzji, czy chcesz używać bezpośredniego czy pośredniego wiązania, szyfrowanie poufnych danych logowania i inne powiązane zadania.

  1. Ważne: zdecyduj, czy chcesz używać metody uwierzytelniania pośredniego czy bezpośredniego. Ta decyzja będzie miała wpływ na niektóre aspekty konfiguracji. Zobacz Uwierzytelnianie zewnętrzne.
  2. Ważne: te czynności konfiguracyjne musisz wykonać na każdym serwerze Apigee Edge Management (jeśli używasz więcej niż 1 serwera).
  3. Otwórz plik /opt/apigee/customer/application/management-server.property w edytorze tekstu. Jeśli plik nie istnieje, utwórz go.
  4. Dodaj następujący wiersz. Uwaga: na końcu wiersza nie może być spacji.

    conf_security_Authentication.user.store=externalized.Authentication

    Ta linia dodaje funkcję uwierzytelniania zewnętrznego do instalacji Edge dla Private Cloud.
  5. Aby ułatwić ten krok, utworzyliśmy 2 dobrze skomentowane przykładowe konfiguracje – jedną do uwierzytelniania bezpośredniego i jedną do uwierzytelniania pośredniego. Zapoznaj się z przykładami poniżej dla wiązania, którego chcesz użyć, i dokończ konfigurację:

    Przykład konfiguracji WIĄŻENIA BEZPOŚREDNIEGO
    Przykład konfiguracji BINDING POŁĄCZENIA
  6. Ponowne uruchamianie serwera zarządzania:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. Sprawdź, czy serwer działa:
    > /opt/apigee/apigee-service/bin/apigee-all
  8. Ważne: jeśli chcesz, aby użytkownicy logowali się za pomocą nazw użytkowników, które nie są adresami e-mail, musisz wykonać dodatkową konfigurację zgodnie z jedną z tych okoliczności: W takim przypadku użytkownik sysadmin musi też uwierzytelnić się przy użyciu nazwy użytkownika i/lub (b) jeśli hasło do konta użytkownika sysadmin w zewnętrznym LDAP jest inne niż hasło skonfigurowane podczas pierwszej instalacji Apigee Edge dla chmury prywatnej. Zobacz Konfiguracja wymagana dla różnych danych logowania sysadmin.

Przykład konfiguracji 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ład konfiguracji POŁĄCZENIA POŚREDNIEJ

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

Testowanie instalacji

  1. Sprawdź, czy serwer działa:
    > /opt/apigee/apigee-service/bin/apigee-all
  2. Wykonaj to polecenie, aby udostępnić zestaw globalnych danych logowania administratora systemu Apigee Edge. Wywołanie interfejsu API, które chcemy przetestować, może wykonać tylko administrator granicy Edge.

    Ważne: na zewnętrznym koncie LDAP muszą istnieć identyczne dane logowania. Jeśli nie, musisz je dodać teraz. Nazwa użytkownika jest zwykle adresem e-mail, ale zależy to od skonfigurowanego zewnętrznego uwierzytelniania, które opisaliśmy wcześniej w tym dokumencie.
    > curl -v http://<management-server-ip>:8080/v1/o -u <Nazwa użytkownika serwera administratorów>

    Na przykład:
    > curl -v http://192.168.52.100:8080/v1/o -v1.o -v1/o -v1.o
  3. Po wyświetleniu prośby wpisz hasło.

    Jeśli polecenie zwróci stan 200 i listę organizacji, konfiguracja będzie prawidłowa. To polecenie sprawdza, czy wywołanie interfejsu API serwera granicznego zostało uwierzytelnione za pomocą zewnętrznego systemu LDAP.