System.Security.Permissions namespace By Venkata Krishna Date: Instructor 06/19/2007 Dr. Ravi Mukkamala.

Slides:



Advertisements
Similar presentations
Security for Developers Code Access Security Steven Borg & Richard Hundhausen Accentient, Inc.
Advertisements

Towards Remote Policy Enforcement for Runtime Protection of Mobile Code Using Trusted Computing Xinwen Zhang Francesco Parisi-Presicce Ravi Sandhu
Ahead of Time Dynamic Translation PreJit/NGEN by any other name George Bosworth Microsoft MRE04 March 21, 2004.
© 2003 School of Computing, University of Leeds SY32 Secure Computing, Lecture 17 Secure Coding in Java and.NET Part 2: Code Access Control.
.NET Framework Application Security Overview
Customizing.NET Security – Evidence and Code Identity.. B y, S rikanth Poluru Course: CS
DEV340.NET Framework Security Best Practices Sebastian Lange Program Manager Common Language Runtime Microsoft Corporation.
Introduction to Evidence-based security in.NET Framework Brad Merrill Program Manager.NET Frameworks Integration.
Security and the.NET Framework. Code Access Security Enforces security policy on code  Regardless of user running the code  Regardless of whether the.
Security in.NET Jørgen Thyme Microsoft Denmark. Topics & non-topics  Cryptography  App domains  Impersonation / delegation  Authentication  Authorization.
Code Access Security vs. Role-Based Security  RBS  Security identity attached to user accounts  Access to resources specified according to user’s group.
Security in.NET Framework Sergey Baidachni MCT, MCSD, MCDBA.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
Understanding Security Lesson 6. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding the System.Security Namespace Understand the.
.NET Code security including 4.0 & Tools Jon C. Arce
.NET Framework Introduction: Metadata
Appendix D: Microsoft.NET Framework Overview. Overview.NET Framework Architecture.NET Namespaces.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Blackboard Building Blocks Framework and Security Monday, September 14, 2015 Tracy Engwirda, Senior Consultant – Asia Pacific.
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
.NET Framework Danish Sami UG Lead.NetFoundry
Announcements Assignment 3 due. Invite friends, co-workers to your presentations. Course evaluations on Friday.
Basic Security: Java vs.NET Master Seminar Advanced Software Engineering Topics Prof. Jacques Pasquier-Rocha Software Engineering Group Department of Informatics.
Security in.NET. Objectives Security in.NET Basic concepts - permissions Using and Managing permissions Cryprography in.NET Administer.NET Security.
Sage ACT! 2013 SDK Update Brian P. Mowka March 23, 2012 Template date: October 2010.
.Net Security and performance
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
Code Access Security CS 795. Terminology--CLR Common Language Runtime: –The.NET Framework provides a runtime environment which runs the code and provides.
Exception Handling Unit-6. Introduction An exception is a problem that arises during the execution of a program. An exception can occur for many different.
G53SEC 1 Access Control principals, objects and their operations.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science.
ASP.Net Role-based Security Chapter 10 (Freeman and Jones) CS795/895.
.NET Security and MSIL Tom Roeder CS fa. MSIL Common intermediate language really CIL in ECMA standard MSIL is common name Very close to C# (and.
DEV240 Fundamentals of Code Access Security Sebastian Lange Program Manager Common Language Runtime Microsoft Corporation.
A Standards-Based Approach for Supporting Dynamic Access Policies for a Federated Digital Library K. Bhoopalam, K. Maly, F. McCown, R. Mukkamala, M. Zubair.
1 Access Control Policies: Modeling and Validation Luigi Logrippo & Mahdi Mankai Université du Québec en Outaouais.
Introduction to Object-Oriented Programming Lesson 2.
The SELinux of First Look. Prologue After many discussions with a lot of Linux users, I’ve come to realize that most of them seem to disable SELinux rather.
1.Net Framework.Net Framework.NET Architecture and Security By Prasad Sundararajan Jan
Common Language Runtime Introduction  The common language runtime is one of the most essential component of the.Net Framework.  It acts.
Understanding Security
DEVC02.NET Framework Security Best Practices Sebastian Lange Program Manager Common Language Runtime Microsoft Corporation.
System.Security.policy Namespace By: Marepalli Gayathri.
Understanding.NET Framework Security David LeBlanc Microsoft Office.
The Execution System1. 2 Introduction Managed code and managed data qualify code or data that executes in cooperation with the execution engine The execution.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Customizing.NET Security Permissions Nageswari Vallabhaneni.
Chapter 7. Permissions Programming.Net Security, O’Reilly Publishers.
Garbage Collection It Is A Way To Destroy The Unused Objects. To do so, we were using free() function in C language and delete() in C++. But, in java it.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Database Security Advanced Database Dr. AlaaEddin Almabhouh.
ClickOnce Deployment (One-click Deployment)
Subha Desikan CSE775 – Distributed Objects Spring 2003
Code Access Security Securing mobile code in the .NET Framework
.NET Security and MSIL Tom Roeder CS fa.
Using Application Domains Effectively
Code Access Security CS 795.
Security mechanisms and vulnerabilities in .NET
XAML User Interface Creation in C#
CS360 Windows Programming
Presented By - Avinash Pawar
Module 10: Implementing Managed Code in the Database
Chapter 29: Program Security
Chapter 8: Security Policy
Quiz Points 1 Rules Raise your hand if you know the question
Access Control What’s New?
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

System.Security.Permissions namespace By Venkata Krishna Date: Instructor 06/19/2007 Dr. Ravi Mukkamala

Overview Introduction Classes in System.Security.Permissions Namespace Permissions Code access security References

Introduction Permissions are the mechanism through which the.NET runtime enforces code-access security. The System.Security.Permissions namespace contains permission classes and their attributes.

There are a lot of classes and enumerations in this namespace. Few of the important classes are Classes EnvironmentPermission FileDialogPermission FileIOPermission IsolatedStorageFilePermission IsolatedStoragePermission ReflectionPermission RegistryPermission SecurityPermission UIPermission  Each of these classes have many methods. Classes in System.Security.Permissions Namespace

Permissions There are three distinct categories of permissions defined in the System.Security.Permissions namespace:  Code-Access Permissions,  Identity Permissions and  Role-based Permissions Code-Access Permissions: The Common Language Runtime (CLR) allows code to perform only those operations that the code has permission to perform. Restrict what your code can do Restrict which code can call your code Identify code

Identity Permissions: The identity permission classes represent the value of host evidence that an assembly or application domain presents to the runtime. Role-based Permissions: Permissions based on roles of a user on whose behalf code is running.

The elements of CAS are permissions permission sets code groups evidence policy Code access security

Demo Creating permission sets and code groups

Two different kinds of syntax when coding security are Declarative Declarative syntax uses attributes to mark the method, class or the assembly with the necessary security information. [FileIOPermission(SecurityAction.Demand, Unrestricted=true)] public calss MyClass { public MyClass() {...} // all these methods public void MyMethod_A() {...} // demands unrestricted access to public void MyMethod_B() {...} // the file system } Imperative Imperative syntax uses runtime method calls to create new instances of security classes. public calss MyClass { public MyClass() { } public void Method_A() { // Do Something FileIOPermission myPerm = new FileIOPermission(PermissionState.Unrestricted); myPerm.Demand(); // rest of the code won't get executed if this failed // Do Something } // No demands public void Method_B() { // Do Something }

Requesting Permissions An assembly can request permissions before it is loaded. RequestMinimum The code will be only allowed to run if all the required permissions are granted by the security policy. [assembly:RegistryPermission(SecurityAction.RequestMinimum, Write="HKEY_LOCAL_MACHINE\\Software")] RequestOptional Permissions that the code can use, but not required in order to run. [assembly:FileIOPermission(SecurityAction.RequestOptional, Write="C:\\")] RequestRefuse To specify the permissions that the assembly would never require. [assembly:FileIOPermission(SecurityAction.RequestRefuse, Write="C:\\")]

Overriding Security An assembly can override the permissions in three ways. Assert Assert method to stop the stack walk from going beyond the current stack frame. FileIOPermission myPerm = new FileIOPermission(FileIOPermissionAccess.Read, "C:\\"); myPerm.Assert(); // don't check above stack frames. Deny Deny the current set of permissions. WebPermission myWebPermission = new WebPermission(NetworkAccess.Connect, " myWebPermission.Deny(); PermitOnly PermitOnly in some situations when needed to restrict permissions granted by security policy. WebPermission myWebPermission = new WebPermission(NetworkAccess.Connect, " myWebPermission.PermitOnly();

References O’Reilly : Programming.NET Security By Adam Freeman, Allen Jones, June ’03 us/library/system.security.permissions.aspx us/library/system.security.permissions.aspx

Discussion