Book description
With the spread of web-enabled desktop clients and web-server based applications, developers can no longer afford to treat security as an afterthought. It's one topic, in fact, that .NET forces you to address, since Microsoft has placed security-related features at the core of the .NET Framework. Yet, because a developer's carelessness or lack of experience can still allow a program to be used in an unintended way, Programming .NET Security shows you how the various tools will help you write secure applications.The book works as both a comprehensive tutorial and reference to security issues for .NET application development, and contains numerous practical examples in both the C# and VB.NET languages. With Programming .NET Security, you will learn to apply sound security principles to your application designs, and to understand the concepts of identity, authentication and authorization and how they apply to .NET security. This guide also teaches you to:
- use the .NET run-time security features and .NET security namespaces and types to implement best-practices in your applications, including evidence, permissions, code identity and security policy, and role based and Code Access Security (CAS) use the .NET cryptographic APIs , from hashing and common encryption algorithms to digital signatures and cryptographic keys, to protect your data.
- use COM+ component services in a secure manner
Publisher resources
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Preface
-
I. Fundamentals
- 1. Security Fundamentals
- 2. Assemblies
- 3. Application Domains
- 4. The Lifetime of a Secure Application
-
II. .NET Security
- 5. Introduction to Runtime Security
-
6. Evidence and Code Identity
- 6.1. Evidence Explained
- 6.2. Programming Evidence
- 6.3. Extending the .NET Framework
-
7. Permissions
- 7.1. Permissions Explained
- 7.2. Programming Code-Access Security
-
7.3. Extending the .NET Framework
-
7.3.1. Creating Custom Code-Access Permissions
- 7.3.1.1. Designing the RadioPermission class
- 7.3.1.2. Defining imports and assembly scope attributes
- 7.3.1.3. Defining the RadioAction enumeration
- 7.3.1.4. Defining the RadioPermission class
- 7.3.1.5. Implementing the IUnrestrictedPermission interface
- 7.3.1.6. Implementing the IPermission interface
- 7.3.1.7. Implementing the ISecurityEncodable interface
- 7.3.1.8. Defining the RadioPermissionAttribute class
- 7.3.1.9. Building the Radio.dll library
- 7.3.1.10. Using RadioPermission to enforce security
-
7.3.1. Creating Custom Code-Access Permissions
-
8. Security Policy
- 8.1. Security Policy Explained
- 8.2. Programming Security Policy
- 8.3. Extending the .NET Framework
-
9. Administering Code-Access Security
- 9.1. Default Security Policy
- 9.2. Inspecting Declarative Security Statements
- 9.3. Using the .NET Framework Configuration Tool
- 9.4. Using the Code-Access Security Policy Tool
-
10. Role-Based Security
- 10.1. Role-Based Security Explained
- 10.2. Programming Role-Based Security
- 11. Isolated Storage
-
III. .NET Cryptography
- 12. Introduction to Cryptography
-
13. Hashing Algorithms
- 13.1. Hashing Algorithms Explained
- 13.2. Programming Hashing Algorithms
- 13.3. Keyed Hashing Algorithms Explained
- 13.4. Programming Keyed Hashing Algorithms
- 13.5. Extending the .NET Framework
- 14. Symmetric Encryption
-
15. Asymmetric Encryption
- 15.1. Asymmetric Encryption Explained
- 15.2. Programming Asymmetrical Encryption
-
15.3. Extending the .NET Framework
- 15.3.1. The ElGamal Algorithm Explained
- 15.3.2. Processing Large Integer Values
- 15.3.3. Defining the Abstract Class
- 15.3.4. Defining the Implementation Class
- 15.3.5. Defining the Abstract Cipher Function Class
- 15.3.6. Defining the Encryption Class
- 15.3.7. Defining the Decryption Class
- 15.3.8. Testing the Algorithm
-
16. Digital Signatures
- 16.1. Digital Signatures Explained
- 16.2. Programming Digital Signatures
- 16.3. Programming XML Signatures
-
16.4. Extending the .NET Framework
- 16.4.1. The ElGamal Signature Functions Explained
- 16.4.2. Defining the Signature Function Class
- 16.4.3. Implementing the Managed Class Methods
- 16.4.4. Defining the PKCS #1 Helper Class
- 16.4.5. Defining the Signature Formatter Class
- 16.4.6. Defining the Signature Deformatter Class
- 16.4.7. Testing the Algorithm
- 17. Cryptographic Keys
-
IV. .NET Application Frameworks
- 18. ASP.NET Application Security
- 19. COM+ Security
- 20. The Event Log Service
-
V. API Quick Reference
- 21. How to Use This Quick Reference
- 22. Converting from C# to VB Syntax
-
23. The System.Security Namespace
- AllowPartiallyTrustedCallersAttribute
- CodeAccessPermission
- IEvidenceFactory
- IPermission
- ISecurityEncodable
- ISecurityPolicyEncodable
- IStackWalk
- NamedPermissionSet
- PermissionSet
- PolicyLevelType
- SecurityElement
- SecurityException
- SecurityManager
- SecurityZone
- SuppressUnmanagedCodeSecurityAttribute
- UnverifiableCodeAttribute
- VerificationException
- XmlSyntaxException
-
24. The System.Security.Cryptography Namespace
- AsymmetricAlgorithm
- AsymmetricKeyExchangeDeformatter
- AsymmetricKeyExchangeFormatter
- AsymmetricSignatureDeformatter
- AsymmetricSignatureFormatter
- CipherMode
- CryptoAPITransform
- CryptoConfig
- CryptographicException
- CryptographicUnexpectedOperationException
- CryptoStream
- CryptoStreamMode
- CspParameters
- CspProviderFlags
- DeriveBytes
- DES
- DESCryptoServiceProvider
- DSA
- DSACryptoServiceProvider
- DSAParameters
- DSASignatureDeformatter
- DSASignatureFormatter
- FromBase64Transform
- FromBase64TransformMode
- HashAlgorithm
- HMACSHA1
- ICryptoTransform
- KeyedHashAlgorithm
- KeySizes
- MACTripleDES
- MaskGenerationMethod
- MD5
- MD5CryptoServiceProvider
- PaddingMode
- PasswordDeriveBytes
- PKCS1MaskGenerationMethod
- RandomNumberGenerator
- RC2
- RC2CryptoServiceProvider
- Rijndael
- RijndaelManaged
- RNGCryptoServiceProvider
- RSA
- RSACryptoServiceProvider
- RSAOAEPKeyExchangeDeformatter
- RSAOAEPKeyExchangeFormatter
- RSAParameters
- RSAPKCS1KeyExchangeDeformatter
- RSAPKCS1KeyExchangeFormatter
- RSAPKCS1SignatureDeformatter
- RSAPKCS1SignatureFormatter
- SHA1
- SHA1CryptoServiceProvider
- SHA1Managed
- SHA256
- SHA256Managed
- SHA384
- SHA384Managed
- SHA512
- SHA512Managed
- SignatureDescription
- SymmetricAlgorithm
- ToBase64Transform
- TripleDES
- TripleDESCryptoServiceProvider
- 25. The System.Security.Cryptography.X509Certificates Namespace
-
26. The System.Security.Cryptography.Xml Namespace
- DataObject
- DSAKeyValue
- KeyInfo
- KeyInfoClause
- KeyInfoName
- KeyInfoNode
- KeyInfoRetrievalMethod
- KeyInfoX509Data
- Reference
- RSAKeyValue
- Signature
- SignedInfo
- SignedXml
- Transform
- TransformChain
- XmlDsigBase64Transform
- XmlDsigC14NTransform
- XmlDsigC14NWithCommentsTransform
- XmlDsigEnvelopedSignatureTransform
- XmlDsigXPathTransform
- XmlDsigXsltTransform
-
27. The System.Security.Permissions Namespace
- CodeAccessSecurityAttribute
- EnvironmentPermission
- EnvironmentPermissionAccess
- EnvironmentPermissionAttribute
- FileDialogPermission
- FileDialogPermissionAccess
- FileDialogPermissionAttribute
- FileIOPermission
- FileIOPermissionAccess
- FileIOPermissionAttribute
- IsolatedStorageContainment
- IsolatedStorageFilePermission
- IsolatedStorageFilePermissionAttribute
- IsolatedStoragePermission
- IsolatedStoragePermissionAttribute
- IUnrestrictedPermission
- PermissionSetAttribute
- PermissionState
- PrincipalPermission
- PrincipalPermissionAttribute
- PublisherIdentityPermission
- PublisherIdentityPermissionAttribute
- ReflectionPermission
- ReflectionPermissionAttribute
- ReflectionPermissionFlag
- RegistryPermission
- RegistryPermissionAccess
- RegistryPermissionAttribute
- ResourcePermissionBase
- ResourcePermissionBaseEntry
- SecurityAction
- SecurityAttribute
- SecurityPermission
- SecurityPermissionAttribute
- SecurityPermissionFlag
- SiteIdentityPermission
- SiteIdentityPermissionAttribute
- StrongNameIdentityPermission
- StrongNameIdentityPermissionAttribute
- StrongNamePublicKeyBlob
- UIPermission
- UIPermissionAttribute
- UIPermissionClipboard
- UIPermissionWindow
- UrlIdentityPermission
- UrlIdentityPermissionAttribute
- ZoneIdentityPermission
- ZoneIdentityPermissionAttribute
-
28. The System.Security.Policy Namespace
- AllMembershipCondition
- ApplicationDirectory
- ApplicationDirectoryMembershipCondition
- CodeGroup
- Evidence
- FileCodeGroup
- FirstMatchCodeGroup
- Hash
- HashMembershipCondition
- IIdentityPermissionFactory
- IMembershipCondition
- NetCodeGroup
- PermissionRequestEvidence
- PolicyException
- PolicyLevel
- PolicyStatement
- PolicyStatementAttribute
- Publisher
- PublisherMembershipCondition
- Site
- SiteMembershipCondition
- StrongName
- StrongNameMembershipCondition
- UnionCodeGroup
- Url
- UrlMembershipCondition
- Zone
- ZoneMembershipCondition
- 29. The System.Security.Principal Namespace
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Programming .NET Security
- Author(s):
- Release date: June 2003
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596004422
You might also like
book
.NET Framework Security
In 1997, Microsoft embarked on a "bet the company" strategy that was to reinvent the way …
book
The .NET Developer's Guide to Windows Security
"As usual, Keith masterfully explains complex security issues in down-to-earth and easy-to-understand language. I bet you'll …
book
DevSecOps for .NET Core: Securing Modern Software Applications
Automate core security tasks by embedding security controls and processes early in the DevOps workflow through …
book
Programming WCF Services, 4th Edition
Programming WCF Services is the authoritative, bestselling guide to Microsoft’s unified platform for developing modern, service-oriented …