10.3 Declarative and Imperative Security

 < Day Day Up > 



If a programmer specifies security requirements directly inside an assembly's metadata, he or she is implementing what is known as declarative security. All of the security settings are specified as customized attributes in the code and classes; methods and properties are used to fine-tune these permissions. A typical use of declarative security would be if a method needed to have write access to a specific disk location since the permissions and required actions will be known when the assembly is compiled.

Alternatively, imperative security would be used if the location of the write access changes. Imperative security is when the security is implemented within the code. All security tasks are undertaken programmatically, and appropriate rights are granted or denied based upon the security stack state.



 < Day Day Up > 



Microsoft  .NET. Jumpstart for Systems Administrators and Developers
Microsoft .NET: Jumpstart for Systems Administrators and Developers (Communications (Digital Press))
ISBN: 1555582850
EAN: 2147483647
Year: 2003
Pages: 136
Authors: Nigel Stanley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net