私有雲 v4.18.01 的邊緣
如要安裝及設定 Edge SSO 模組,您必須先產生兩組 TLS 金鑰和憑證。Edge SSO 模組會使用傳輸層安全標準 (TLS),透過 SAML IDP 確保資訊傳輸作業安全無虞。
注意:根據預設,Edge SSO 模組可透過安裝在其安裝節點的通訊埠 9099 上存取。您可以在 Edge SSO 模組中啟用 TLS。如要這麼做,您必須建立第三組 Tomcat 用來支援傳輸層安全標準 (TLS) 的傳輸層安全標準 (TLS) 金鑰和憑證。詳情請參閱「為 HTTPS 存取權設定 apigee-sso」。
建立 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 天 expiry-time 的自行簽署憑證:
> 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.ic 自己簽署.crt
如果您想在 Edge SSO 模組中啟用 TLS,請將 SSO_TOMCAT_PROFILE 設為 SSL_TERMINATION 或 SSL_PROXY,因此無法使用自行簽署的憑證。您必須從 CA 產生憑證。詳情請參閱「為 HTTPS 存取權設定 apigee-sso」。
安裝並設定 Edge SSO 以使用 HTTP 存取權
如要安裝 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 模組:
- 登入 Management Server 節點。該節點應已安裝 apigee-service,詳情請參閱安裝 Edge apigee-setup 公用程式。
請注意,您可以在其他節點上安裝 Edge SSO。不過,該節點必須能透過通訊埠 8080 存取管理伺服器。 - 進入及設定 apigee-sso:
> /opt/apigee/apigee-setup/bin/setup.sh -p sso -f configFile
其中 configFile 是上述的設定檔。 - 推出 apigee-ssoadminapi.sh 公用程式,這個公用程式用於管理 apigee-sso 模組的管理員和機器使用者:
/opt/apigee/apigee-service/bin/apigee-service apigee-ssoadminapi install - 登出殼層,然後再次登入,將 apigee-ssoadminapi.sh 公用程式新增至路徑。
指定中繼資料檔案,而非網址
如果 IdP 不支援 HTTP/HTTPS 中繼資料網址,您可以使用中繼資料 XML 檔案設定 Edge SSO:
- 將 IdP 中的中繼資料 XML 內容,複製到 Edge SSO 節點上的檔案。例如,請將 XML 複製到:
/opt/apigee/customer/application/apigee-sso/saml/metadata.xml - 將檔案擁有權變更為 apigee:apigee:
> chown apigee: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://」,後面接著根路徑 (根路徑)。