Edge for Private Cloud v4.19.01
Edge SSO モジュールをインストールして構成するには、まず 2 組の TLS 鍵と証明書を生成する必要があります。Edge SSO モジュールは、SAML が SAML IDP との間で行う handshake プロセスの一環として、TLS を使用して情報の送信を保護します。
TLS 鍵と証明書を作成する
次の手順で作成する自己署名証明書はテスト環境には適していますが、本番環境では通常 CA による署名付きの証明書が必要です。
検証と署名鍵、および自己署名証明書を作成するには、以下を実行します。
sudo mkdir -p /opt/apigee/customer/application/apigee-sso/jwt-keys
cd /opt/apigee/customer/application/apigee-sso/jwt-keys/
sudo openssl genrsa -out privkey.pem 2048
sudo openssl rsa -pubout -in privkey.pem -out pubkey.pem
sudo chown apigee:apigee *.pem
SAML IDP と通信するために、パスフレーズのない鍵と自己署名証明書を作成するには、以下を実行します。
sudo mkdir -p /opt/apigee/customer/application/apigee-sso/saml/
cd /opt/apigee/customer/application/apigee-sso/saml/
- パスフレーズ付きの秘密鍵を生成します。
sudo openssl genrsa -aes256 -out server.key 1024
- 作成した秘密鍵からパスフレーズを削除します。
sudo openssl rsa -in server.key -out server.key
- CA の証明書署名リクエストを生成します。
sudo openssl req -x509 -sha256 -new -key server.key -out server.csr
- 有効期限が 365 日の自己署名証明書を生成します。
sudo openssl x509 -sha256 -days 365 -in server.csr -signkey server.key -out selfsigned.crt
sudo chown apigee:apigee server.key
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 ファイルであるため、インストールするユーザーは root ユーザーであるか、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_SIGNINIG_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 モジュールをインストールするには:
- Management Server ノードにログインします。このノードには、Edge apigee-setup ユーティリティをインストールするの手順に従って
apigee-service
がインストールされている必要があります。Edge SSO を別のノードにインストールすることもできます。ただし、そのノードがポート 8080 を通って Management Server にアクセスできる必要があります。
apigee-sso
をインストールして構成します。/opt/apigee/apigee-setup/bin/setup.sh -p sso -f configFile
configFile は、前述の構成ファイルになります。
apigee-sso
モジュールの管理者とマシンユーザーを管理するためのapigee-ssoadminapi.sh
ユーティリティをインストールします。/opt/apigee/apigee-service/bin/apigee-service apigee-ssoadminapi install
- Shell からログアウトし、再度ログインして
apigee-ssoadminapi.sh
ユーティリティをパスに追加します。
URL の代わりにメタデータ ファイルを指定する
IDP が HTTP / HTTPS メタデータ URL をサポートしていない場合、メタデータ XML ファイルを使用して Edge SSO を構成できます。
- IDP のメタデータ XML の内容を、Edge SSO ノードのファイルにコピーします。たとえば、XML を次のディレクトリにコピーします。
/opt/apigee/customer/application/apigee-sso/saml/metadata.xml
- ファイルの所有者を apigee:apigee に変更します。
chown apigee:apigee /opt/apigee/customer/application/apigee-sso/saml/metadata.xml
SSO_SAML_IDP_METADATA_URL
の値を絶対ファイルパスに設定します。SSO_SAML_IDP_METADATA_URL=file:///opt/apigee/customer/application/apigee-sso/saml/metadata.xml
ファイルパスの先頭に「
file://
」を付け、その後に root(/)からの絶対パスを続ける必要があります。