Web Client Software Factory - February 2008
Authorization

Authorization determines whether an identity should be granted access to a specific resource. ASP.NET maps users and roles to URLs in ASP.NET applications. With URL authorization, you explicitly allow or deny access to a particular directory by user name or role. When your application URL authorization requirements are satisfied by user name or role, you can use the ASP.NET authorization module.

Cc304795.note(en-us,MSDN.10).gifNote:
ASP.NET also supports file authorization. File authorization checks the access control list (ACL) of the .aspx or .asmx handler file to determine whether a user should have access to the file. For more information, see ASP.NET Authorization on MSDN.

The Composite Web Application Block includes two services that you can use to implement rule-based authorization for URLs:

  • IAuthorizationRulesService. This manages a mapping of rules to URLs.
  • IAuthoriza t ionService. This implements the authorization check for a rule.

Figure 1 illustrates the rule-based authorization HttpModule.

Cc304795.188436a6-d238-436b-a518-1073721d8fac(en-us,MSDN.10).png

Figure 1
Rule-based authorization module

The AuthorizationRules class implements the IAuthorizationRules service with a collection of URLs (strings) with each URL associated with a collection of rule identifiers (strings). Figure 2 illustrates the AuthorizationRulesService service.

Cc304795.41ea3dc6-9186-4c4e-8be6-40322255966d(en-us,MSDN.10).png

Figure 2
AuthorizationRulesService service

The Composite Web Application Block also includes an implementation of a service that uses the Enterprise Library Security Application Block. You can configure the Security Application Block to use Authorization Manager, a rule-based provider, or a custom authorization provider. Figure 3 illustrates the EnterpriseLibraryAuthorizationService.

Cc304795.fe5d9619-0fe5-4e77-998e-f1e8fc840530(en-us,MSDN.10).png

Figure 3
EnterpriseLibraryAuthorizationService

Page view tracker