Edge for Private Cloud v4.19.01
Edge पर एसएएमएल चालू करने के बाद, बेसिक ऑथ को बंद किया जा सकता है. हालांकि, बेसिक ऑथेंटिकेशन को बंद करने से पहले:
- पक्का करें कि आपने Edge के सभी उपयोगकर्ताओं को अपने एसएएमएल आईडीपी में जोड़ा हो. इसमें सिस्टम एडमिन भी शामिल हैं.
- पक्का करें कि आपने Edge यूज़र इंटरफ़ेस (यूआई) और Edge मैनेजमेंट एपीआई पर, एसएएमएल ऑथेंटिकेशन की अच्छी तरह से जांच कर ली हो.
- अगर Apigee Developer Services पोर्टल (या सिर्फ़ पोर्टल) का इस्तेमाल किया जा रहा है, तो पोर्टल पर एसएएमएल को कॉन्फ़िगर करें और उसकी जांच करें. इससे यह पक्का किया जा सकेगा कि पोर्टल, Edge से कनेक्ट हो सकता है. 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>अगर आपने पहले से ही एसएएमएल को चालू किया हुआ है, तो आपको आउटपुट में <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 ZooKeeper नोड में लॉग इन करें.
- सभी सुरक्षा सुविधाएं बंद करने के लिए, यह bash स्क्रिप्ट चलाएं:
#! /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 support is enabled 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...
- बेसिक ऑथ और एसएएमएल ऑथेंटिकेशन को फिर से चालू करें:
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>'
अब बेसिक ऑथेंटिकेशन का इस्तेमाल फिर से किया जा सकता है.