Edge पर एसएएमएल या एलडीएपी चालू करने के बाद, बुनियादी पुष्टि की सुविधा को बंद किया जा सकता है. हालांकि, पुष्टि करने के बुनियादी तरीके को बंद करने से पहले:
- पक्का करें कि आपने Edge के सभी उपयोगकर्ताओं को अपने IDP में जोड़ा हो. इसमें सिस्टम एडमिन भी शामिल हैं.
- पक्का करें कि आपने Edge यूज़र इंटरफ़ेस (यूआई) और Edge मैनेजमेंट एपीआई पर, आईडीपी (IdP) की पुष्टि करने की सुविधा को अच्छी तरह से टेस्ट कर लिया हो.
- अगर Apigee Developer Services पोर्टल (या सिर्फ़ पोर्टल) का इस्तेमाल किया जा रहा है, तो पोर्टल पर अपने बाहरी आईडीपी को कॉन्फ़िगर करें और उसकी जांच करें. इससे यह पक्का किया जा सकेगा कि पोर्टल, Edge से कनेक्ट हो सकता है. बाहरी आईडीपी के लिए पोर्टल कॉन्फ़िगर करना देखें.
मौजूदा सुरक्षा प्रोफ़ाइल देखना
Edge की सुरक्षा प्रोफ़ाइल देखकर, मौजूदा कॉन्फ़िगरेशन का पता लगाया जा सकता है. इससे यह पता चलता है कि बुनियादी पुष्टि और बाहरी आईडीपी की सुविधा चालू है या नहीं. Edge में इस्तेमाल की जा रही मौजूदा सुरक्षा प्रोफ़ाइल देखने के लिए, Edge Management Server पर Edge Management API के इस कॉल का इस्तेमाल करें:
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 पर सेट करना होगा, जैसा कि इस उदाहरण में दिखाया गया है:
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 Management API का कोई भी ऐसा एपीआई कॉल जो पुष्टि करने के बुनियादी तरीके के क्रेडेंशियल पास करता है, यह गड़बड़ी दिखाता है:
<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>'
अब पुष्टि करने के बुनियादी तरीके का इस्तेमाल फिर से किया जा सकता है. ध्यान दें कि New Edge की सुविधा चालू होने पर, पुष्टि करने का बुनियादी तरीका काम नहीं करता.