एज पर बुनियादी पुष्टि को बंद करना

Edge for Private Cloud v. 4.17.09

Edge पर एसएएमएल चालू करने के बाद, बेसिक ऑथ को बंद किया जा सकता है. हालांकि, बेसिक ऑथेंटिकेशन को बंद करने से पहले:

मौजूदा सुरक्षा प्रोफ़ाइल देखना

Edge की सुरक्षा प्रोफ़ाइल देखकर, मौजूदा कॉन्फ़िगरेशन का पता लगाया जा सकता है. इससे यह पता चलता है कि बेसिक ऑथेंटिकेशन और एसएएमएल की सुविधा चालू है या नहीं. Edge में इस्तेमाल की जा रही मौजूदा सुरक्षा प्रोफ़ाइल देखने के लिए, Edge मैनेजमेंट सर्वर पर Edge मैनेजमेंट एपीआई कॉल का इस्तेमाल करें:

> curl -H "accept:application/xml" http://localhost:8080/v1/securityprofile -u sysAdminEmail:pWord

अगर आपने अब तक एसएएमएल को कॉन्फ़िगर नहीं किया है, तो आपको यहां दिखाया गया जवाब मिलेगा. इसका मतलब है कि बेसिक ऑथेंटिकेशन की सुविधा चालू है:

<SecurityProfile enabled="true" name="securityprofile">
    <UserAccessControl enabled="true">
    </UserAccessControl>
</SecurityProfile>

अगर आपने पहले से ही SAML को चालू किया हुआ है, तो आपको आउटपुट में <ssoserver> टैग दिखेगा:

<SecurityProfile enabled="true" name="securityprofile">
    <UserAccessControl enabled="true">
        <SSOServer>
            <BasicAuthEnabled>true</BasicAuthEnabled>
            <PublicKeyEndPoint>/token_key</PublicKeyEndPoint>
            <ServerUrl>http://35.197.37.220:9099</ServerUrl>
        </SSOServer>
    </UserAccessControl>
</SecurityProfile>

ध्यान दें कि एसएएमएल की सुविधा वाले वर्शन में, <BasicAuthEnabled>true</BasicAuthEnabled> भी दिखता है. इसका मतलब है कि बेसिक ऑथेंटिकेशन की सुविधा अब भी चालू है.

बुनियादी पुष्टि करने की सुविधा बंद करें

बेसिक ऑथेंटिकेशन की सुविधा बंद करने के लिए, Edge मैनेजमेंट सर्वर पर Edge मैनेजमेंट एपीआई कॉल का इस्तेमाल करें. ध्यान दें कि आपको पेलोड के तौर पर, पिछले सेक्शन में दिखाए गए एक्सएमएल ऑब्जेक्ट को पास करना होगा. सिर्फ़ एक अंतर है कि आपको <BasicAuthEnabled>false</BasicAuthEnabled> सेट करना होगा:

> curl -H "Content-Type: application/xml"
http://localhost:8080/v1/securityprofile  -u sysAdminEmail:pWord -d
 '<SecurityProfile enabled="true" name="securityprofile">
  <UserAccessControl enabled="true">
    <SSOServer>
      <BasicAuthEnabled>false</BasicAuthEnabled>
      <PublicKeyEndPoint>/token_key</PublicKeyEndPoint>
      <ServerUrl>http://35.197.37.220:9099</ServerUrl>
  </SSOServer>
 </UserAccessControl>
</SecurityProfile>'

बेसिक ऑथ को बंद करने के बाद, Edge मैनेजमेंट एपीआई का कोई भी ऐसा कॉल जो बेसिक ऑथ क्रेडेंशियल पास करता है, यह गड़बड़ी दिखाता है:

<Error>
    <Code>security.SecurityProfileBasicAuthDisabled</Code>
    <Message>Basic Authentication scheme not allowed</Message>
    <Contexts/>
</Error>

बुनियादी पुष्टि करने की सुविधा को फिर से चालू करना

अगर आपको किसी वजह से बेसिक ऑथेंटिकेशन को फिर से चालू करना है, तो यह तरीका अपनाएं:

चेतावनी: पुष्टि करने के बुनियादी तरीके को फिर से चालू करने के लिए, आपको Edge पर पुष्टि करने के सभी तरीकों को कुछ समय के लिए बंद करना होगा. इनमें एसएएमएल भी शामिल है.

  1. किसी भी Edge ZooKeeper नोड में लॉग इन करें.
  2. सभी सुरक्षा सुविधाएं बंद करने के लिए, यह बैश स्क्रिप्ट चलाएं:
    चेतावनी: यह तरीका, Edge पर पुष्टि करने की सभी सुविधाएं बंद कर देता है. इनमें एसएएमएल भी शामिल है.

    #! /bin/bash
    /opt/apigee/apigee-zookeeper/bin/zkCli.sh -server localhost:2181 <<EOF
    set /system/securityprofile <SecurityProfile></SecurityProfile>
    quit
    EOF

    आपको इस तरह का आउटपुट दिखेगा:
    Connecting to localhost:2181
    Welcome to ZooKeeper!
    JLine की सुविधा चालू है
    WATCHER::

    WatchedEvent state:SyncConnected type:None path:null
    [zk: localhost:2181(CONNECTED) 0] set /system/securityprofile <SecurityProfile></SecurityProfile>
    cZxid = 0x89
    ...
    [zk: localhost:2181(CONNECTED) 1] quit
    Quitting…
  3. बेसिक ऑथ और एसएएमएल ऑथेंटिकेशन को फिर से चालू करें:

    > curl -H "Content-Type: application/xml"
    http://localhost:8080/v1/securityprofile -u sysAdminEmail:pWord -d
    '<SecurityProfile enabled="true" name="securityprofile">

    <UserAccessControl enabled="true">
    <SSOServer>
    <BasicAuthEnabled>true</BasicAuthEnabled>
    <PublicKeyEndPoint>/token_key</PublicKeyEndPoint>
    <ServerUrl>http://35.197.37.220:9099</ServerUrl>
    </SSOServer>
    </UserAccessControl>
    </SecurityProfile>'

    अब बेसिक ऑथेंटिकेशन का इस्तेमाल फिर से किया जा सकता है.