Apigee SSO 설치 및 구성

외부 IDP를 사용하여 Apigee SSO 모듈을 설치하고 구성하려면 다음을 수행해야 합니다. 있습니다.

  1. 키 및 인증서 생성.
  2. 기본 Apigee SSO 구성을 설정합니다. 기본 파일에는 모든 SSO 구성에 공통된 속성이 포함되어야 합니다.
  3. IDP 관련 구성 속성 추가: 다음 중 하나를 사용합니다. 구성 파일의 구성 속성에 대한 IDP 관련 블록은 다음과 같습니다. <ph type="x-smartling-placeholder">
  4. Apigee SSO 설치: Apigee SSO 모듈을 설치하고 설치 프로그램에 추가해야 합니다

다음 섹션에서 각 단계를 설명합니다.

키 및 인증서 만들기

이 섹션에서는 여러분의 조직에 적합할 수 있는 자체 서명 인증서를 만드는 방법을 설명합니다. 인증 기관 (CA)에서 서명한 인증서를 빌드되었습니다

인증을 위해 서명할 키 쌍을 만들려면 다음 단계를 따르세요.

  1. sudo 사용자로 다음과 같은 새 디렉터리를 만듭니다.
    sudo mkdir -p /opt/apigee/customer/application/apigee-sso/jwt-keys
  2. 새 디렉터리로 변경합니다.
    cd /opt/apigee/customer/application/apigee-sso/jwt-keys/
  3. 다음 명령어를 사용하여 비공개 키를 생성합니다.
    sudo openssl genrsa -out privkey.pem 2048
  4. 다음 명령어를 사용하여 비공개 키에서 공개 키를 생성합니다.
    sudo openssl rsa -pubout -in privkey.pem -out pubkey.pem
  5. 출력 PEM 파일의 소유자를 'Apigee'로 변경하세요. 사용자:
    sudo chown apigee:apigee *.pem

키 및 자체 서명 인증서를 암호 없이 만들고 IDP:

  1. sudo 사용자로 새 디렉터리를 만듭니다.
    sudo mkdir -p /opt/apigee/customer/application/apigee-sso/idp/
  2. 새 디렉터리로 변경합니다.
    cd /opt/apigee/customer/application/apigee-sso/idp/
  3. 암호로 비공개 키를 생성합니다.
    sudo openssl genrsa -aes256 -out server.key 1024
  4. 키에서 암호를 삭제합니다.
    sudo openssl rsa -in server.key -out server.key
  5. CA에 대한 인증서 서명 요청을 생성합니다.
    sudo openssl req -x509 -sha256 -new -key server.key -out server.csr
  6. 만료 시간이 365일인 자체 서명 인증서 생성:
    sudo openssl x509 -sha256 -days 365 -in server.csr -signkey server.key -out selfsigned.crt
  7. 키 및 crt 파일의 소유자를 'apigee'로 변경하세요. 소유자:
    sudo chown apigee:apigee server.key
    sudo chown apigee:apigee selfsigned.crt

Apigee SSO 모듈에서 TLS를 사용 설정하려면 다음을 실행합니다. SSO_TOMCAT_PROFILESSL_TERMINATION로 설정 또는 SSL_PROXY로 전환하는 경우 자체 서명 인증서를 사용할 수 없습니다. 다음과 같이 생성해야 합니다. 인증서를 발급하는 것입니다. 다음을 참조하세요. Apigee SSO 구성 HTTPS 액세스를 참고하세요.

Apigee SSO 구성 설정

Apigee SSO 모듈을 설치하려면 먼저 구성 파일을 정의해야 합니다. 이 구성 파일을 설치 프로그램에 업로드합니다.

구성 파일의 형식은 다음과 같습니다.

IP1=hostname_or_IP_of_apigee_SSO
IP2=hostname_or_IP_of_apigee_SSO

## Management Server configuration.
# Management Server IP address and port
MSIP=$IP1
MGMT_PORT=8080
# Edge sys admin username and password as set when you installed Edge.
ADMIN_EMAIL=opdk@google.com
APIGEE_ADMINPW=Secret123
# Set the protocol for the Edge management API. Default is http.
# Set to https if you enabled TLS on the management API.
MS_SCHEME=http

## Postgres configuration.
# Postgres IP address and port
PG_HOST=$IP1
PG_PORT=5432
# Postgres username and password as set when you installed Edge.
# If these credentials change, they must be updated and setup rerun.
PG_USER=apigee
PG_PWD=postgres

## Apigee SSO module configuration.
# Choose either "saml" or "ldap".
SSO_PROFILE="[saml|ldap]"
# Externally accessible IP or DNS name of apigee-sso.
SSO_PUBLIC_URL_HOSTNAME=$IP2
SSO_PG_DB_NAME=database_name_for_sso

# Default port is 9099. If changing, set both properties to the same value.
SSO_PUBLIC_URL_PORT=9099
SSO_TOMCAT_PORT=9099
# Uncomment the following line to set specific SSL cipher using OpenSSL syntax
# SSL_CIPHERS=HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!kRSA
# Set Tomcat TLS mode to DEFAULT to use HTTP access to apigee-sso.
SSO_TOMCAT_PROFILE=DEFAULT
SSO_PUBLIC_URL_SCHEME=http

# SSO admin user name. The default is ssoadmin.
SSO_ADMIN_NAME=ssoadmin
# SSO admin password using uppercase, lowercase, number, and special chars.
SSO_ADMIN_SECRET=Secret123

# Enable the ability to sign an authentication request with SAML SSO.
SSO_SAML_SIGN_REQUEST=y

# Path to signing key and secret from Create the TLS keys and certificates above.
SSO_JWT_SIGNING_KEY_FILEPATH=/opt/apigee/customer/application/apigee-sso/jwt-keys/privkey.pem
SSO_JWT_VERIFICATION_KEY_FILEPATH=/opt/apigee/customer/application/apigee-sso/jwt-keys/pubkey.pem

###########################################################
#                 Define External IDP                     #
# Use one of the following configuration blocks to        #
# define your IDP settings:                               #
#  - SAML configuration properties                     #
#  - LDAP Direct Binding configuration properties        #
#  - LDAP Indirect Binding configuration properties       #
###########################################################

INSERT_IDP_CONFIG_BLOCK_HERE (SAML, LDAP direct, or LDAP indirect, below)

# Configure an SMTP server so that the Apigee SSO module can send emails to users
SKIP_SMTP=n
SMTPHOST=smtp.example.com
SMTPUSER=smtp@example.com
# omit for no username
SMTPPASSWORD=smtppwd
# omit for no password
SMTPSSL=n
SMTPPORT=25
# The address from which emails are sent
SMTPMAILFROM="My Company <myco@company.com>"

SAML SSO 구성 속성

IDP에 SAML을 사용하는 경우 구성 파일 (위에서 정의)을 포함해야 합니다.

## SAML Configuration Properties
# Insert this section into your base configuration file, as described previously.

# Name of SAML IDP. For example, okta or adfs.
SSO_SAML_IDP_NAME=okta
# Text displayed on the SSO sign-in page after being redirected by either the New or Classic Edge UI for SAML logins.
# Note: Installing SSO does not depend on the Edge UI or which version of the UI you are using.
SSO_SAML_IDP_LOGIN_TEXT="Please log in to your IDP"

# The metadata URL from your IDP.
# If you have a metadata file, and not a URL,
# see "Specifying a metadata file instead of a URL" below.
SSO_SAML_IDP_METADATA_URL=https://dev-343434.oktapreview.com/app/exkar20cl/sso/saml/metadata

# Determines whether to skip TLS validation for the URL specified
# by SSO_SAML_IDP_METADATA_URL.
# This is necessary if the URL uses a self-signed certificate.
# The default value is "n".
SSO_SAML_IDPMETAURL_SKIPSSLVALIDATION=n

# SAML service provider key and cert from Create the TLS keys and certificates above.
SSO_SAML_SERVICE_PROVIDER_KEY=/opt/apigee/customer/application/apigee-sso/saml/server.key
SSO_SAML_SERVICE_PROVIDER_CERTIFICATE=/opt/apigee/customer/application/apigee-sso/saml/selfsigned.crt

# The passphrase used when you created the SAML cert and key.
# The section "Create the TLS keys and certificates" above removes the passphrase,
# but this property is available if you require a passphrase.
# SSO_SAML_SERVICE_PROVIDER_PASSWORD=samlSP123

# Requires that SAML responses be signed by your IDP.
# This property is enabled by default since release 4.50.00.05.
SSO_SAML_SIGNED_ASSERTIONS=y

LDAP 직접 바인딩 구성 속성

IDP에 LDAP 직접 바인딩을 사용하는 경우 다음 구성 블록을 사용하세요. 속성을 설정합니다.

## LDAP Direct Binding configuration
# Insert this section into your base configuration file, as described previously.

# The type of LDAP profile; in this case, "direct"
SSO_LDAP_PROFILE=direct

# The base URL to which SSO connects; in the form: "ldap://hostname_or_IP:port
SSO_LDAP_BASE_URL=LDAP_base_URL

# Attribute name used by the LDAP server to refer to the user's email address; for example, "mail"
SSO_LDAP_MAIL_ATTRIBUTE=LDAP_email_attribute

# Pattern of the user's DN; for example: =cn={0},ou=people,dc=example,dc=org
# If there is more than one pattern, separate with semicolons (";"); for example:
# =cn={0},ou=people,dc=example,dc=org;=cn={0},ou=people,dc=example,dc=com
SSO_LDAP_USER_DN_PATTERN=LDAP_DN_pattern

# Set true to allow users to login with non-email usernames
SSO_ALLOW_NON_EMAIL_USERNAME=false

LDAP 간접 바인딩 구성 속성

IDP에 LDAP 간접 바인딩을 사용하는 경우 다음 구성 블록을 사용하세요. 속성을 설정합니다.

## LDAP Indirect Binding configuration
# Insert this section into your base configuration file, as described previously.

# Type of LDAP profile; in this case, "indirect"
SSO_LDAP_PROFILE=indirect

# Base URL to which SSO connects; in the form: "ldap://hostname_or_IP:port
SSO_LDAP_BASE_URL=LDAP_base_URL

# DN and password of the LDAP server's admin user
SSO_LDAP_ADMIN_USER_DN=LDAP_admin_DN
SSO_LDAP_ADMIN_PWD=LDAP_admin_password

# LDAP search base; for example, "dc=example,dc=org"
SSO_LDAP_SEARCH_BASE=LDAP_search_base

# LDAP search filter; for example, "cn={0}"
SSO_LDAP_SEARCH_FILTER=LDAP_search_filter

# Attribute name used by the LDAP server to refer to the user's email address; for example, "mail"
SSO_LDAP_MAIL_ATTRIBUTE=LDAP_email_attribute

Apigee SSO 모듈 설치

키를 만들고 구성 파일을 설정하면 Apigee 되었습니다.

Apigee SSO 모듈을 설치하려면 다음 안내를 따르세요.

  1. 관리 서버 노드에 로그인합니다. 해당 노드에는 다음에 설명된 대로 apigee-service 설치됨 Edge Apigee-setup 유틸리티를 설치합니다.

    또는 다른 노드에 Apigee SSO 모듈을 설치할 수 있습니다. 하지만 해당 노드는 포트 8080을 통해 관리 서버에 액세스할 수 있어야 합니다.

  2. 다음 명령어를 실행하여 apigee-sso를 설치하고 구성합니다.
    /opt/apigee/apigee-setup/bin/setup.sh -p sso -f configFile

    여기서 configFile는 위에서 정의한 구성 파일입니다.

  3. 관리자 및 컴퓨터를 관리하는 데 사용되는 apigee-ssoadminapi.sh 유틸리티를 설치합니다. apigee-sso 모듈의 사용자:
    /opt/apigee/apigee-service/bin/apigee-service apigee-ssoadminapi install
  4. 셸에서 로그아웃했다가 다시 로그인하여 apigee-ssoadminapi.sh를 추가합니다. 유틸리티를 추가합니다

URL 대신 메타데이터 파일 지정

IDP가 HTTP/HTTPS 메타데이터 URL을 지원하지 않는 경우 메타데이터 XML 파일을 사용하여 Apigee SSO를 구성합니다.

URL 대신 메타데이터 파일을 사용하여 Apigee SSO를 구성하려면 다음 안내를 따르세요.

  1. IDP의 메타데이터 XML 콘텐츠를 Apigee SSO 노드의 파일에 복사합니다. 대상 예를 들어 XML을 다음 위치에 복사합니다.
    /opt/apigee/customer/application/apigee-sso/saml/metadata.xml
    드림
  2. XML 파일의 소유권을 'Apigee'로 변경하세요. 사용자:
    chown apigee:apigee /opt/apigee/customer/application/apigee-sso/saml/metadata.xml
  3. SSO_SAML_IDP_METADATA_URL의 값을 절대 파일 경로로 설정합니다.
    SSO_SAML_IDP_METADATA_URL=file:///opt/apigee/customer/application/apigee-sso/saml/metadata.xml

    파일 경로 앞에 'file://'와 다음 파일의 절대 경로를 붙여야 합니다. 루트 (/)로 변경합니다.