Edge पर एसएएमएल या एलडीएपी चालू करने के बाद, बुनियादी पुष्टि की सुविधा को बंद किया जा सकता है. हालांकि, पुष्टि करने के बुनियादी तरीके को बंद करने से पहले:
- पक्का करें कि आपने Edge के सभी उपयोगकर्ताओं को अपने IDP में जोड़ा हो. इसमें सिस्टम एडमिन भी शामिल हैं.
- पक्का करें कि आपने New Edge यूज़र इंटरफ़ेस (यूआई) और Edge मैनेजमेंट एपीआई पर, आईडीपी (IdP) की पुष्टि करने की सुविधा को अच्छी तरह से टेस्ट कर लिया हो.
मौजूदा सुरक्षा प्रोफ़ाइल देखना
Edge की सुरक्षा प्रोफ़ाइल देखी जा सकती है. इससे मौजूदा कॉन्फ़िगरेशन के बारे में पता चलता है. साथ ही, यह भी पता चलता है कि बुनियादी पुष्टि करने की सुविधा और बाहरी आईडीपी की सुविधा चालू है या नहीं. Edge Management Server पर, Edge management API के इस एपीआई कॉल का इस्तेमाल करके, 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 पर सेट किया है. यहां दिए गए उदाहरण में यह दिखाया गया है:
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 UI को एसएसओ से वापस बुनियादी पुष्टि पर स्विच करने के लिए, New Edge UI कॉन्फ़िगरेशन फ़ाइल में AUTH_MODE=basic और MANAGEMENT_UI_SSO_ENABLED=n सेट करें. इसके बाद, /opt/apigee/apigee-service/bin/apigee-service edge-management-ui configure-sso -f configFile चलाएं. इसके बाद, /opt/apigee/apigee-service/bin/apigee-service edge-management-ui restart चलाएं या /opt/apigee/apigee-setup/bin/setup.sh -p ue -f configFile चलाएं.