高度安全性的应用程式系统实作.ppt
《高度安全性的应用程式系统实作.ppt》由会员分享,可在线阅读,更多相关《高度安全性的应用程式系统实作.ppt(60页珍藏版)》请在三一办公上搜索。
1、高度安全性的應用程式系統實作,台灣微軟公司研發處開發工具部產品規劃經理 何銘哲,今日議程,範例實作架構簡介.NET Framework 安全機制範例實作驗證(Authentication).NET 的程式碼存取安全性 ASP.NET 中的驗證考量授權(Authorization)角色架構安全性授權管理員加密(Cryptography)Web 應用程式安全機制範例實作Web應用程式的安全性考量,範例實作架構簡介,範例實作架構 那裡要驗證?,Intranet,Internet,Web Form,Authentication,Smart Client,APP Server,SQL Server,We
2、b Server,ASP.NETCode Access Security,範例實作架構 何時需要授權?,今日議程,範例實作架構簡介.NET Framework 安全機制範例實作驗證(Authentication).NET 的程式碼存取安全性 ASP.NET 中的驗證考量授權(Authorization)角色架構安全性授權管理員加密(Cryptography)Web 應用程式安全機制範例實作Web應用程式的安全性考量,範例實作架構 程式碼存取安全性,什麼是程式碼存取安全性,控制程式碼要對保護資源存取或是執行特定作業的安全機制由 CLR 的安全性系統查核來檢查呼叫堆疊中每個呼叫端授與的使用權限和要
3、求的使用權限(Stack Walk)禁止低度受信任的程式碼呼叫高度受信任的程式碼進而使用它來執行未經授權的動作可使用 Demand 及 Assert 來實作程式碼存取安全性語法,什麼是舉證(Evidence)?,舉證(Evidence)是由應用程式組件的識別項及其出處資訊組成.NET Framework 安全系統會根據舉證項目來設定其權限,什麼是安全性原則(Policy)?,安全性原則控制程式碼存取資源的使用權限(permission)依據程式碼的 identity 及來源來決定可存取的項目有那些(Evidence based!)程式碼的 identity 及來源由舉證項目所組成安全性原則將各
4、類型的舉證對應到不同的使用權限集合(permission set)NothingExecutionInternetLocalIntranetEverythingFullTrustCustom-defined,什麼是程式碼群組?,Cond:All CodePSet:Nothing,Cond:Site=APSet:All Printer Access,Cond:Publisher=MicrosoftPSet:Read:C:Microsoft,Cond:Zone=InternetPSet:Internet,Cond:Zone=MyComputerPSet:Execution,Cond:SN Key=
5、25 98PSet:Read:C:Adatum,Cond:SN Key=9F ADSimple Name=Microsoft MoneyPSet:Read:C:Money,Cond:SN Key=9F ADSimple Name=Microsoft.AppPSet:Write:C:Microsoft,A hierarchy of code groups,Permission Grant,Evidence,Publisher=MicrosoftZone=InternetSNKey=9F AD,Read C:MicrosoftRead C:MoneyWrite:C:MicrosoftInterne
6、t,Publisher=AdatumSite=ASN Key=25 98,ExecutionRead:C:AdatumAll Printer Access,什麼是安全性原則等級?,安全性原則可被使用在不同的層級上 來控制存取資料的權限:企業(Enterprise)電腦(Machine)使用者(User)Application domain每一個原則層級中都含有一些程式碼群組、使用權限集合,以及原則組件清,當超過一個安全性原則生效時:Permission grant is the intersection of permissions allowed at each policy levelTh
7、e least common permission set is appliedExample:,判斷多個安全性原則等級,1.使用.NET Framework 組態工具修改安全性原則設定,今日議程,範例實作架構簡介.NET Framework 安全機制範例實作驗證(Authentication).NET 的程式碼存取安全性 ASP.NET 中的驗證考量授權(Authorization)角色架構安全性授權管理員加密(Cryptography)Web 應用程式安全機制範例實作Web應用程式的安全性考量,範例實作架構 ASP.NET 的驗證,Windows 驗證,Client Computer,/w
8、eb.config file,Forms 驗證,/web.config file,Anonymous,Passport 驗證,/web.config file,Anonymous,P,如何使用 Forms-Based 驗證,Configure IIS to use Anonymous accessSet forms-based authentication in Web.config Set up authorizationCreate a logon page,1,2,3,4,設定 web.config,/Web.config file,如何建立 Logon 網頁,Import the Sy
9、stem.Web.Security namespaceCreate a logon page that verifies and checks the credentials of a user and redirects if validRead user credentials from a cookieUser.Identity.Name returns the value saved by FormsAuthentication.RedirectFromLoginPage,If(bValidCredentials)FormsAuthentication.RedirectFromLogi
10、nPage _(strUserName,False)End If,2.在 ASP.NET 中使用 Windows based 以及 Forms based 驗證,今日議程,範例實作架構簡介.NET Framework 安全機制範例實作驗證(Authentication).NET 的程式碼存取安全性 ASP.NET 中的驗證考量授權(Authorization)角色架構安全性授權管理員加密(Cryptography)Web 應用程式安全機制範例實作Web應用程式的安全性考量,Intranet,Internet,Web Form,SQL Server,APP Server,Web Server,S
11、mart Client,Windows IntegratedRole-based securityAuthorization Manager,Authorization,範例實作架構 授權-角色架構安全性,什麼是角色架構(Role-Based)安全性?,什麼是 Identity?,Identity 物件封裝有關使用者或驗證過的實體的資訊 Identity 在.NET Framework 中可分為三大類:WindowsGenericCustomIdentity 類別均實作了 IIdentity interfaceName(使用者名稱或 Windows 帳戶名稱)IsAuthenticatedAu
12、thenticationType(所支援的登入通訊協定),什麼是 Principal?,Principal 則是結合了 identity 及此 Identity 的角色(Role)所執行的安全性內容.NET角色架構安全性支援了三種類型的principals:Windows principalGeneric principal Custom principalAll principal類別均實作了 IPrincipal interface,如何使用 WindowsIdentity 及 WindowsPrincipal 物件,/Single validationWindowsIdentity my
13、Identity=WindowsIdentity.GetCurrent();WindowsPrincipal myPrincipal=new WindowsPrincipal(myIdentity);/Repeated validation/呼叫 AppDomain.SetPrincipalPolicy 方法/並將新的 PrincipalPolicy 列舉型別值傳遞給它AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);/使用 CurrentPrincipal 擷取目前 Windows 的當事
14、人WindowsPrincipal myPrincipal=(WindowsPrincipal)System.Threading.Thread.CurrentPrincipal;,如何使用 GenericIdentity及GenericPrincipal 物件,可用 GenericIdentity 及 GenericPrincipal 來建立獨立存在於 Windows之外的授權配置:,/Create a generic identityGenericIdentity myIdentity=new GenericIdentity(User1);/Create a generic principa
15、lString myStringArray=Manager,Teller;GenericPrincipal myPrincipal=new GenericPrincipal(myIdentity,myStringArray);/Attach the generic principal to the threadSystem.Threading.Thread.CurrentPrincipal=myPrincipal;,檢查 Identity 以及群組的授權,/Check identity/Assume a valid Principal is in myPrincipalif(String.Co
16、mpare(myPrincipal.Identity.Name,DOMAINFred,true)=0)/Permit access to some code/Check role membership/Assume a valid Principal is in myPrincipalif(myPrincipal.IsInRole(BUILTINAdministrators)/Permit access to some code,3.使用 Windows 及 Generic 物件來檢查 Role-Based 的授權,今日議程,範例實作架構簡介.NET Framework 安全機制範例實作驗證(
17、Authentication).NET 的程式碼存取安全性 ASP.NET 中的驗證考量授權(Authorization)角色架構安全性授權管理員加密(Cryptography)Web 應用程式安全機制範例實作Web應用程式的安全性考量,範例實作架構 授權-授權管理員,授權管理員的概念,操作(Operation)Low-level application work-unit expressed in codeProcedure,function,method,LDAP or SQL query 工作(Task)High-level application work-unit expressed
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 高度 安全性 应用 程式 系统

链接地址:https://www.31ppt.com/p-5313543.html