Edge SSO 설치 및 구성

프라이빗 클라우드용 Edge v4.18.05

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

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_PROFILE을 SSL_TERMINATION 또는 SSL_PROXY로 설정하여 Edge SSO 모듈에서 TLS를 사용 설정하려면 자체 서명 인증서를 사용할 수 없습니다. CA에서 인증서를 생성해야 합니다. 자세한 내용은 HTTPS 액세스를 위한 apigee-sso 구성을 참조하세요.

HTTP 액세스를 위한 Edge 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

# 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

# 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. Management Server 노드에 로그인합니다. 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 파일을 사용하여 Edge 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://'를 붙이고 루트 (/)의 절대 경로를 추가해야 합니다.