Como ativar a autenticação externa

Edge for Private Cloud v. 4.17.09

Esta seção explica como adquirir, instalar e configurar os componentes necessários para integrar um serviço LDAP externo ao Apigee Edge para autenticação de usuários.

Pré-requisitos

  • Você precisa ter o Apigee Edge para a instalação da nuvem privada 4.17.09.
  • Você precisa ter credenciais de administrador de sistema global no Apigee Edge para nuvem privada para faça a instalação.
  • Você precisa saber o diretório raiz do Apigee Edge para instalação de nuvem privada. A diretório raiz padrão é /opt.
  • É necessário adicionar suas credenciais de administrador do sistema global do Edge ao LDAP externo. Por padrão, as credenciais do sysadmin são armazenadas no Edge, LDAP interno. Depois de mudar para o LDAP externo, suas credenciais do sysadmin serão autenticados lá. Portanto, você deve provisionar as credenciais para o sistema externo antes de ativar a autenticação externa no Edge.

    Por exemplo, se você tiver configurado e instalado o Apigee Edge para nuvem privada com credenciais de administrador do sistema como:

    nome de usuário: edgeuser@mydomain.com
    senha: Secret123

    Depois, o usuário edgeuser@mydomain.com com a senha O Secret123 também precisa estar presente no LDAP externo.
  • Se você estiver executando um cluster do servidor de gerenciamento, observe que é necessário seguir todas as etapas neste documento para cada servidor de gerenciamento.

Como configurar a autenticação externa

A principal atividade que você vai realizar é configurar o arquivo management-server.properties. Essa atividade inclui interromper e iniciar o Edge Management Server, decidir se você quiser usar vinculação direta ou indireta, criptografia de credenciais confidenciais e outras tarefas.

  1. Importante: decida se você pretende usar a abordagem indireta ou direta método de autenticação de vinculação. Essa decisão vai afetar alguns aspectos da configuração. Consulte Autenticação externa.
  2. Importante: você precisa seguir estas etapas de configuração em cada gerenciamento do Apigee Edge Server (se estiver executando mais de um).
  3. Abra /opt/apigee/customer/application/management-server.properties em um editor de texto. Crie o arquivo se ele não existir.
  4. Adicione a linha a seguir. Observação: não deixe espaços no final da string da linha.

    conf_security_authentication.user.store=externalized.authentication

    Esta linha adiciona o recurso de autenticação externa ao Edge para nuvem privada e instalação.
  5. Para facilitar essa etapa, criamos duas configurações de exemplo bem comentadas: uma para autenticação de vinculação direta e outra para autenticação de vinculação indireta. Confira os exemplos abaixo para a vinculação que você quer usar e conclua a configuração:

    DIRETO Exemplo de configuração de BINDING
    DIRETO Exemplo de configuração de VINCULAÇÃO
  6. Reinicie o servidor de gerenciamento:
    > /opt/apigee/apigee-service/bin/apigee-service Edge-management-server reinicialização
  7. Verifique se o servidor está em execução:
    > /opt/apigee/apigee-service/bin/apigee-all status
  8. Importante: é necessário fazer uma configuração adicional em um (ou ambos) das seguintes circunstâncias: (a) se você pretende que os usuários façam login usando nomes de usuário que são e não endereços de e-mail. Nesse caso, o usuário do sysadmin também precisa se autenticar com um nome de usuário e/ou (b) se a senha da sua conta de usuário sysadmin no ambiente O LDAP é diferente da senha que você configurou quando instalou o Apigee Edge pela primeira vez para de nuvem privada virtual. Consulte Configuração necessária para credenciais sysadmin diferentes.

VINCULAÇÃO DIRETA exemplo de configuração

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

VINCULAÇÃO INDIRETA exemplo de configuração

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

Como testar a instalação

  1. Verifique se o servidor está em execução:
    > /opt/apigee/apigee-service/bin/apigee-all Status
  2. Execute este comando, fornecendo um conjunto de administradores do sistema global do Apigee Edge credenciais. A chamada de API que vamos testar só pode ser executada por um Edge sysadmin.

    Importante: as credenciais idênticas precisam existir na sua conta LDAP externa. Caso contrário, será necessário adicioná-las agora. Observe que o nome de usuário geralmente é um endereço de e-mail; No entanto, depende de como você configurou a autenticação externa, como explicado anteriormente documento.
    &gt; curl -v http://<management-server-ip>:8080/v1/o -u <Nome de usuário do sysadmin>

    Por exemplo:
    &gt; curl -v http://192.168.52.100:8080/v1/o -u jdoe@meudominio.com
  3. Digite sua senha quando solicitado.

    Se o comando retornar um status 200 e uma lista de organizações, a configuração está correta. Esse comando verifica se a chamada de API para o servidor de gerenciamento de borda foi realizada com sucesso autenticados por meio do sistema LDAP externo.