Edge SSO 설치 및 구성

Private Cloud용 Edge v4.19.01

Edge SSO 모듈을 설치하고 구성하려면 먼저 두 개의 TLS 키와 인증서 세트를 생성해야 합니다. Edge SSO 모듈은 SAML IDP를 통한 SAML 핸드셰이크 프로세스의 일부로 TLS를 사용하여 정보 전송을 보호합니다.

TLS 키 및 인증서 만들기

아래 단계에서는 자체 서명 인증서를 만듭니다. 이 인증서는 테스트 환경에 적합할 수 있지만 일반적으로 프로덕션 환경의 경우 CA에서 서명한 인증서가 필요합니다.

확인, 서명 키와 자체 서명 인증서를 만들려면 다음 안내를 따르세요.

  1. 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. sudo chown apigee:apigee *.pem

SAML IDP와 통신하기 위해 암호 없이 키와 자체 서명 인증서를 만들려면 다음 단계를 따르세요.

  1. sudo mkdir -p /opt/apigee/customer/application/apigee-sso/saml/
  2. cd /opt/apigee/customer/application/apigee-sso/saml/
  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. sudo chown apigee:apigee server.key
  8. sudo chown apigee:apigee selfsigned.crt

SSO_TOMCAT_PROFILESSL_TERMINATION 또는 SSL_PROXY로 설정하여 에지 SSO 모듈에서 TLS를 사용 설정하려면 자체 서명 인증서를 사용할 수 없습니다. CA에서 인증서를 생성해야 합니다. 자세한 내용은 HTTPS 액세스를 위해 apigee-sso 구성을 참고하세요.

HTTP 액세스를 위해 에지 SSO 설치 및 구성

Edge SSO 모듈(apigee-sso)을 설치하려면 Edge를 설치할 때 사용한 것과 동일한 프로세스를 사용해야 합니다. apigee-sso는 RPM 파일로 표시되므로 설치를 수행하는 사용자는 루트 사용자이거나 전체 sudo 액세스 권한을 가진 사용자여야 합니다. 자세한 내용은 Edge 설치 개요를 참조하세요.

구성 파일을 설치 프로그램에 전달합니다. 구성 파일의 형식은 다음과 같습니다.

IP1=hostname_or_ip_of_management_server
IP2=hostname_or_ip_of_UI_and_apigge_sso

## Management Server configuration.
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.
PG_HOST=$IP1
PG_PORT=5432
# Postgres username and password as set when you installed Edge.
PG_USER=apigee
PG_PWD=postgres

# apigee-sso configuration.
SSO_PROFILE="saml"
# Externally accessible IP or DNS name of apigee-sso.
SSO_PUBLIC_URL_HOSTNAME=$IP2
# Default port is 9099. If changing, set both properties to the same value.
SSO_PUBLIC_URL_PORT=9099
SSO_TOMCAT_PORT=9099
# 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

# Name of SAML IDP. For example, okta or adfs.
SSO_SAML_IDP_NAME=okta
# Text displayed to user when they attempt to access Edge UI.
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

# Specifies to skip TLS validation for the URL specified
# by SSO_SAML_IDP_METADATA_URL. Necessary if URL uses a self-signed cert. 
# 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.
SSO_SAML_SIGNED_ASSERTIONS=y

# Must configure an SMTP server so Edge SSO 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
SMTPMAILFROM="My Company <myco@company.com>"

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

  1. 관리 서버 노드에 로그인합니다. Edge Apigee-setup 유틸리티 설치에 설명된 대로 이 노드에는 이미 apigee-service가 설치되어 있어야 합니다.

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

  2. apigee-sso를 설치하고 구성합니다.
    /opt/apigee/apigee-setup/bin/setup.sh -p sso -f configFile

    여기서 configFile은 위에 표시된 구성 파일입니다.

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

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

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

  1. IDP에서 메타데이터 XML의 콘텐츠를 Edge SSO 노드의 파일로 복사합니다. 예를 들어 XML을 다음 위치에 복사합니다.
    /opt/apigee/customer/application/apigee-sso/saml/metadata.xml
  2. 파일의 소유권을 apigee: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://'라는 프리픽스를 추가하고 그 뒤에 루트 (/)의 절대 경로를 붙여야 합니다.