Custom Principal Permission (non-CodeAccessPermission derived) not working

From: Olivier Haddad (olivier.hadad_at_emblaze.com)
Date: 06/25/03


Date: Wed, 25 Jun 2003 14:44:47 +0300


I wrote a simple class implementing IPermission and a corresponding
attribute class deriving from SecurityAttribute.

My permission class does not derive from CodeAccessPermission as I am not
interested in a stack walk (like PrincipalPermission).

I didn't add the assembly to the Security Policy as MSDN states that it is
not needed for non-CAS permissions.

Imperative permission works fine, but declarative permission is ignored.
Checking the compiled file with ILDasm and Permview revealed that no XML
permission metadata was added.

How do I get my Security Attribute derivated class to work?

The MSDN documentation only gives proper examples for CodeAccessSecurity
derived classes.



Relevant Pages

  • Re: Server Reports empty
    ... Security Exception ... To grant this application the required permission ... The server will start to collect new counter value from ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Code Access Security, Evidence Based Security, Code Access Permission, Role Based Permission, et
    ... confused on the relationship between Code Access Security, Evidence Based ... Security, Code Access Permission, Role Based Permission, Declarative and ... user running it (if this is true, then only the Identity Permission Code ...
    (microsoft.public.dotnet.security)
  • RE: Do all three permission classes (Identity Permission, Code Access Permission and Role Based Perm
    ... That is correct -- the inputs to CAS for each assembly are that assembly's evidence and the current security policy. ... classify them as a code access permission and an identity permission, since StrongNameIdentityPermission is also a code access security ...
    (microsoft.public.dotnet.security)
  • [NT] Windows 2000 Weak Default Permission on System Partitions
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The system partition by default has Everyone/Full Control access ... permission settings of Everyone/Full Control or Authenticated Users/Full ...
    (Securiteam)
  • Re: [Keyrings] [PATCH] Keys: Add LSM hooks for key management
    ... > for the key being instantiated and Write permission on that key. ... >> security module to inspect the key data and set a label based on data? ... > Whether the security module should use it to impose a lable, probably not, I ... Yes, thanks, I missed the rka instantiation at first. ...
    (Linux-Kernel)