Edge para nuvem privada v. 4.17.09
Nesta seção, explicamos como receber, instalar e configurar os componentes necessários para integrar um serviço LDAP externo ao Apigee Edge para autenticação do usuário.
Pré-requisitos
- Você precisa ter uma instalação do Apigee Edge para nuvem privada 4.17.09.
- Você precisa ter credenciais globais de administrador do sistema na Apigee Edge para nuvem privada para realizar essa instalação.
- Você precisa saber o diretório raiz da sua instalação do Apigee Edge para nuvem privada. O diretório raiz padrão é /opt.
- Adicione as credenciais de administrador globais do sistema do Edge ao LDAP externo. Lembre-se de que, por padrão, as credenciais do sysadmin são armazenadas no LDAP interno do Edge. Depois de alternar para o LDAP externo, as credenciais do sysadmin serão autenticadas lá. Portanto, é preciso provisionar as credenciais para o sistema externo antes de ativar a autenticação externa no Edge.
Por exemplo, se você configurou e instalou o Apigee Edge para nuvem privada com credenciais de administrador global do sistema como:
nome de usuário: edgeuser@mydomain.com
password: Secret123
Em seguida, o usuário edgeuser@mydomain.com com a senha Secret123 também precisa estar presente no LDAP externo. - Se você estiver executando um cluster do servidor de gerenciamento, precisará executar todas as etapas deste documento para cada servidor de gerenciamento.
Como configurar a autenticação externa
A principal atividade que você executará é a configuração do arquivo management-server.properties. Essa atividade inclui interromper e iniciar o servidor de gerenciamento de borda, decidir se você quer usar vinculação direta ou indireta, criptografar credenciais confidenciais e outras tarefas relacionadas.
- Importante: decida se você pretende usar o método de autenticação de vinculação direta ou indireta. Essa decisão afetará alguns aspectos da configuração. Consulte Autenticação externa.
- Importante: execute estas etapas de configuração em cada servidor do Apigee Edge Management (se estiver executando mais de um).
- Abra /opt/apigee/customer/application/management-server.properties em um editor de texto. Se o arquivo não existir, crie-o.
- Adicione a linha a seguir. Observação: verifique se não há espaços à direita no final da linha.
conf_security_authentication.user.store=externalized.authentication
Essa linha adiciona o recurso de autenticação externa ao seu Edge para instalação de nuvem privada. - Para facilitar essa etapa, criamos duas configurações de amostra bem comentadas, uma para autenticação direta e outra para vinculação indireta. Consulte as amostras abaixo para ver a vinculação que você quer usar e conclua a configuração:
Amostra de configuração de BINDING DIRETO
Amostra de configuração de BINDING INDIRETA - Reinicie o servidor de gerenciamento:
> /opt/apigee/apigee-service/bin/Serviço de borda da Apigee, reinicialização do servidor - Verifique se o servidor está em execução:
> /opt/apigee/apigee-service/bin/apigee-all status - Importante: você precisará fazer uma configuração adicional em uma das (ou ambas) circunstâncias abaixo: (a) se você quiser que os usuários façam login usando nomes de usuário que não sejam endereços de e-mail. Nesse caso, o usuário sysadmin também precisará se autenticar com um nome de usuário e/ou (b) se a senha da sua conta de usuário sysadmin no LDAP externo for diferente da configurada quando você instalou o Apigee Edge para nuvem privada pela primeira vez. Consulte Configuração necessária para diferentes credenciais do sysadmin.
Amostra de configuração de 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}
Amostra de configuração de BINDING INDIRETO
## 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
Teste a instalação
- Verifique se o servidor está em execução:
> /opt/apigee/apigee-service/bin/apigee-all status - Execute este comando, fornecendo um conjunto de credenciais de administrador global do sistema da Apigee Edge. A chamada de API que vamos testar só pode ser executada por um administrador de sistema do Edge.
Importante: as credenciais idênticas precisam existir na sua conta LDAP externa. Caso contrário, você precisará adicioná-los agora. Observe que o nome de usuário geralmente é um endereço de e-mail. No entanto, isso depende de como você configurou a autenticação externa, conforme explicado anteriormente neste documento.
> curl -v http://<management-server-ip>:8080/v1/o -u <Nome de usuário Sysadmin>
Por exemplo:
> curl -v http://192.168.52.100:8080/v1/o -u .u. - Digite sua senha quando solicitado.
Se o comando retornar um status 200 e uma lista de organizações, a configuração estará correta. Esse comando verifica se a chamada de API para o servidor de gerenciamento de borda foi autenticada com êxito pelo sistema LDAP externo.