외부 인증 사용 설정

이 섹션에서는 사용자 인증을 위해 LDAP 서비스를 Apigee Edge에 통합하는 데 필요한 구성요소를 가져오고, 설치하고, 구성하는 방법을 설명합니다.

기본 요건

  • Private Cloud용 Apigee Edge 4.18.05가 설치되어 있어야 합니다.
  • 이 설치를 수행하려면 Private Cloud용 Apigee Edge에 전역 시스템 관리자 사용자 인증 정보가 있어야 합니다.
  • 프라이빗 클라우드 설치용 Apigee Edge의 루트 디렉터리를 알아야 합니다. 기본 루트 디렉터리는 /opt입니다.
  • Edge 전역 시스템 관리자 사용자 인증 정보를 외부 LDAP에 추가해야 합니다. 기본적으로 시스템 관리자 사용자 인증 정보는 Edge 내부 LDAP에 저장됩니다. 외부 LDAP로 전환하면 시스템 관리자 사용자 인증 정보가 대신 인증됩니다. 따라서 Edge에서 외부 인증을 사용 설정하기 전에 외부 시스템에 사용자 인증 정보를 프로비저닝해야 합니다.

    예를 들어 다음과 같이 전역 시스템 관리자 사용자 인증 정보를 사용하여 Private Cloud용 Apigee Edge를 구성하고 설치한 경우

    username: edgeuser@mydomain.com
    password: Secret123

    그러면 사용자 edgeuser@mydomain.com(비밀번호가 Secret123)도 외부 LDAP에 있어야 합니다.

  • 관리 서버 클러스터를 실행하는 경우 각 관리 서버에 이 문서의 모든 단계를 수행해야 합니다.

외부 인증 구성

실행할 기본 활동은 management-server.properties 파일을 구성하는 것입니다. 이 활동에는 에지 관리 서버 중지 및 시작, 직접 바인딩을 사용할지 간접 바인딩을 사용할지 결정, 민감한 사용자 인증 정보 암호화, 기타 관련 작업이 포함됩니다.

  1. 중요: 이제 간접 바인딩 인증 방법을 사용할지, 직접 바인딩 인증 방법을 사용할지 결정하세요. 이 결정은 구성의 일부 측면에 영향을 미칩니다. 외부 인증을 참조하세요.
  2. 중요: Apigee 에지 관리 서버 두 개 이상을 실행하는 경우 각 서버에서 다음 구성 단계를 수행해야 합니다.
  3. 텍스트 편집기에서 /opt/apigee/customer/application/management-server.properties을 엽니다. 파일이 없으면 새로 만듭니다.
  4. 다음 줄을 추가합니다.
    conf_security_authentication.user.store=externalized.authentication

    이 줄은 Private Cloud 설치용 Edge에 외부 인증 기능을 추가합니다.

  5. 이 단계를 쉽게 수행할 수 있도록 설명이 잘 작성된 샘플 구성 두 개를 만들었습니다. 하나는 직접 바인딩 인증용이고 다른 하나는 간접 바인딩 인증용입니다. 사용하려는 결합에 관한 아래 샘플을 참조하고 구성을 완료합니다.
  6. 관리 서버를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. 서버가 실행 중인지 확인합니다.
    /opt/apigee/apigee-service/bin/apigee-all status
  8. 중요: 다음 상황 중 하나 (또는 둘 다)에서 추가 구성을 수행해야 합니다.
    1. 사용자가 이메일 주소가 아닌 사용자 이름을 사용하여 로그인하도록 하려는 경우 이 경우 시스템 관리자도 사용자 이름으로 인증해야 합니다.

      그리고/또는

    2. 외부 LDAP의 시스템 관리자 사용자 계정 비밀번호가 Private Cloud용 Apigee Edge를 처음 설치할 때 구성한 비밀번호와 다른 경우. 다른 시스템 관리자 사용자 인증 정보에 필요한 구성을 참고하세요.

직접 바인딩 구성 샘플

## 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 in Microsoft Active Directory, this would be
## 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 with AD, 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}

INDIRECT BINDING 구성 샘플

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

설치 테스트

  1. 서버가 실행 중인지 확인합니다.
    /opt/apigee/apigee-service/bin/apigee-all status
  2. 이 명령어를 실행하여 Apigee Edge 전역 시스템 관리자 사용자 인증 정보 집합을 제공합니다. 테스트할 API 호출은 Edge 시스템 관리자만 실행할 수 있습니다.
    curl -v http://management-server-IP:8080/v1/o -u sysadmin_username

    예를 들면 다음과 같습니다.

    curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
  3. 메시지가 표시되면 비밀번호를 입력합니다.

    명령어가 200 상태와 조직 목록을 반환하면 구성이 올바른 것입니다. 이 명령어는 에지 관리 서버에 대한 API 호출이 외부 LDAP 시스템을 통해 성공적으로 인증되었는지 확인합니다.