پساز فعال کردن SAML یا LDAP در Edge، میتوانید «احراز هویت پایه» را غیرفعال کنید. بااینحال، قبلاز غیرفعال کردن «اصالتسنجی پایه»:
- مطمئن شوید که همه کاربران Edge، ازجمله سرپرستان سیستم، را به IDP خود اضافه کردهاید.
- مطمئن شوید که اصالتسنجی IDP خود را بهطور کامل در Edge UI و Edge management API آزمایش کردهاید.
- اگر از درگاه «خدمات توسعهدهنده Apigee» (یا بهطور ساده، درگاه) استفاده میکنید، IDP خارجی خود را در درگاه پیکربندی و آزمایش کنید تا مطمئن شوید که درگاه میتواند به Edge متصل شود. به پیکربندی درگاه برای ارائهدهندگان هویت خارجی مراجعه کنید.
مشاهده نمایه امنیتی فعلی
میتوانید نمایه امنیتی Edge را مشاهده کنید تا پیکربندی فعلی را تعیین کنید و ببینید آیا «احراز هویت پایه» و «ارائهدهنده هویت خارجی» درحالحاضر فعال هستند یا نه. برای مشاهده نمایه امنیتی کنونی که Edge استفاده میکند، از فراخوانی میانای برنامهسازی کاربردی مدیریت Edge زیر در «کارساز مدیریت Edge» استفاده کنید:
curl -H "accept:application/xml" http://localhost:8080/v1/securityprofile -u sysAdminEmail:pWord
اگر هنوز یک IDP خارجی را پیکربندی نکردهاید، پاسخ بهصورت زیر است، یعنی اصالتسنجی «پایه» فعال است:
<SecurityProfile enabled="true" name="securityprofile">
<UserAccessControl enabled="true">
</UserAccessControl>
</SecurityProfile>اگر قبلاً یک IDP خارجی را فعال کردهاید، عنصر <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>توجه داشته باشید که نسخه دارای IDP خارجی فعال نیز <BasicAuthEnabled>true</BasicAuthEnabled> را نشان میدهد، که به این معنی است که احراز هویت «پایه» همچنان فعال است.
غیرفعال کردن اصالتسنجی پایه
برای غیرفعال کردن اصالتسنجی «پایه»، از فراخوانی Edge management API زیر در «سرور مدیریت Edge» استفاده کنید.
برای غیرفعال کردن اصالتسنجی پایه، شیء XML برگشتی در بخش قبلی را بهعنوان پایهبار ارسال میکنید. تنها تفاوت این است که <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» که اطلاعات اعتباری اصالتسنجی پایه را ارسال میکند، خطای زیر را برمیگرداند:
<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>'
اکنون میتوانید دوباره از «اصالتسنجی پایه» استفاده کنید. توجه داشته باشید که وقتی تجربه «Edge جدید» فعال باشد، «اصالتسنجی پایه» کار نمیکند.