Edge एसएसओ (SSO) इंस्टॉल और कॉन्फ़िगर करें

Edge for Private Cloud v4.19.01

Edge एसएसओ (SSO) मॉड्यूल को इंस्टॉल और कॉन्फ़िगर करने के लिए, आपको पहले TLS कुंजियों और सर्टिफ़िकेट के दो सेट जनरेट करने होंगे. Edge एसएसओ (SSO) मॉड्यूल, TLS का इस्तेमाल करता है, ताकि एसएएमएल आईडीपी (IdP) के साथ एसएएमएल हैंडशेकिंग की प्रोसेस के तहत जानकारी को एक जगह से दूसरी जगह भेजा जा सके.

TLS कुंजियां और सर्टिफ़िकेट बनाना

नीचे दिए गए तरीके से, खुद से हस्ताक्षर किए जाने वाले सर्टिफ़िकेट बनाए जाते हैं. हालांकि, ये सर्टिफ़िकेट आपके टेस्टिंग एनवायरमेंट के लिए ठीक हो सकते हैं. हालांकि, आम तौर पर प्रोडक्शन एनवायरमेंट के लिए, आपको सीए से हस्ताक्षर की ज़रूरत होती है.

पुष्टि और साइनिंग पासकोड और खुद हस्ताक्षर किया गया सर्टिफ़िकेट बनाने के लिए:

  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

एसएएमएल आईडीपी से बातचीत करने के लिए, बिना लंबे पासवर्ड के कुंजी और खुद हस्ताक्षर किया गया सर्टिफ़िकेट बनाने के लिए:

  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. सीए के लिए, सर्टिफ़िकेट पर हस्ताक्षर करने का अनुरोध जनरेट करें:
    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

अगर आपको Edge एसएसओ (SSO) मॉड्यूल पर TLS चालू करना है, तो SSO_TOMCAT_PROFILE को SSL_TERMINATION या SSL_PROXY पर सेट करके, आप खुद हस्ताक्षर किए गए सर्टिफ़िकेट का इस्तेमाल नहीं कर सकते. आपको सीए से सर्टिफ़िकेट जनरेट करना होगा. ज़्यादा जानकारी के लिए, एचटीटीपीएस ऐक्सेस के लिए apigee-sso कॉन्फ़िगर करना देखें.

एचटीटीपी ऐक्सेस के लिए, Edge एसएसओ (SSO) को इंस्टॉल और कॉन्फ़िगर करें

Edge एसएसओ (SSO) मॉड्यूल को इंस्टॉल करने के लिए apigee-sso, आपको वही प्रोसेस इस्तेमाल करनी होगी जिसका इस्तेमाल आपने Edge को इंस्टॉल करने के लिए किया था. apigee-sso को आरपीएम फ़ाइल से दिखाया जाता है. इसका मतलब है कि इंस्टॉल करने वाले उपयोगकर्ता को रूट उपयोगकर्ता होना चाहिए या उसे ऐसा उपयोगकर्ता होना चाहिए जिसके पास सूडो का पूरा ऐक्सेस हो. ज़्यादा जानकारी के लिए, 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. मैनेजमेंट सर्वर नोड में लॉग इन करें. उस नोड में apigee-service पहले से इंस्टॉल होना चाहिए, जैसा कि In the Edge apigee-setup उपयोगिता में बताए गए तरीके से बताया गया है.

    ध्यान दें कि 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 उपयोगिता जोड़ने के लिए, फिर से लॉग इन करें.

यूआरएल के बजाय मेटाडेटा फ़ाइल डालें

अगर आपका आईडीपी, एचटीटीपी/एचटीटीपीएस मेटाडेटा यूआरएल के साथ काम नहीं करता, तो एज एसएसओ (SSO) को कॉन्फ़िगर करने के लिए, मेटाडेटा की एक्सएमएल फ़ाइल का इस्तेमाल किया जा सकता है:

  1. मेटाडेटा एक्सएमएल के कॉन्टेंट को, अपने आईडीपी (IdP) से Edge एसएसओ (SSO) नोड पर मौजूद फ़ाइल में कॉपी करें. उदाहरण के लिए, एक्सएमएल को यहां कॉपी करें:
    /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://" लगाना होगा. इसके बाद, रूट (/) से ऐब्सलूट पाथ शुरू करना होगा.