Edge for Private Cloud نسخه ۴.۱۹.۰۱
پساز فعال کردن SAML در Edge، میتوانید «احراز هویت پایه» را غیرفعال کنید. بااینحال، پیشاز غیرفعال کردن «اصالتسنجی پایه»:
- مطمئن شوید که همه کاربران Edge، ازجمله سرپرستان سیستم، را به SAML IDP خود اضافه کردهاید.
- مطمئن شوید اصالتسنجی SAML را در Edge UI و Edge management API بهطور کامل آزمایش کردهاید.
- اگر از درگاه Apigee Developer Services (یا بهطور خلاصه، درگاه) استفاده میکنید، SAML را در درگاه پیکربندی و آزمایش کنید تا مطمئن شوید درگاه میتواند به Edge متصل شود. پیکربندی درگاه برای استفاده از SAML جهت برقراری ارتباط با Edge را ببینید.
درحال مشاهده نمایه امنیتی فعلی
میتوانید نمایه امنیتی Edge را مشاهده کنید تا پیکربندی فعلی را تعیین کنید و ببینید آیا Basic Auth و SAML درحالحاضر فعال است یا نه. از فراخوانی میانای برنامهسازی کاربردی مدیریت Edge زیر در Edge Management Server برای مشاهده نمایه امنیتی فعلی مورداستفاده Edge استفاده کنید:
curl -H "accept:application/xml" http://localhost:8080/v1/securityprofile -u sysAdminEmail:pWord
اگر هنوز SAML را پیکربندی نکردهاید، پاسخ بهصورت زیر نشان داده میشود، یعنی «احراز هویت پایه» فعال است:
<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>توجه داشته باشید که نسخه با SAML فعالشده نیز <BasicAuthEnabled>true</BasicAuthEnabled> را نشان میدهد، یعنی Basic Auth هنوز فعال است.
غیرفعال کردن «احراز هویت پایه»
از فراخوانی API مدیریت Edge زیر در Edge Management Server برای غیرفعال کردن Basic Auth استفاده کنید. توجه داشته باشید که شیء XML برگرداندهشده در بخش قبلی را بهعنوان پایهبار ارسال میکنید. تنها تفاوت این است که شما <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>'پساز غیرفعال کردن Basic Auth، هر فراخوانی API مدیریت Edge که اطلاعات اعتباری Basic Auth را ارسال میکند خطای زیر را برمیگرداند:
<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...
- فعال کردن مجدد اصالتسنجی Basic Auth و SAML:
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>'
اکنون میتوانید دوباره از «احراز هویت پایه» استفاده کنید.