Code access security in SharePoint v3

Source: Internet
Author: User

What is the length of code access security schema?

======================

Provide an example. Pay attention to the highlighted yellow part.

 

Schema rules

  1. Each solution manifest can have only oneCodeaccesssecurityNode.
  2. PolicyitemYou can have any number of nodes.
  3. AnyPolicyitemOnly one node can exist.PermissionsetAndAssembliesNode.
  4. EveryPermissionsetNodes can have any numberIpermissionNode
  5. IpermissionThe schema of a node is defined by. NET Framework.
  6. EveryAssembliesNodes can contain any numberAssemblyNode.
  7. Codeaccesssecurity/policyitem/assemblies/assemblyNodes andSolution/assemblies/assemblyDifferent Nodes ..
  8. An assembly node can have any of the following attributes:
  • Name
  • Version
  • Publickeyblob

Add and deploy the solution command containing the code access security policy

==============================

Add:Stsadm.exe-O addsolution-FILENAME "installassemblies_solution_2052225630.cab"
Deploy:Stsadm.exe-O deploysolution-name "installassemblies_solution_2052225630.cab"-allcontenturls-local-force-Allowcaspolicies

 

Note that stsadm.exe uses the-allowcaspolicies flag for the solution package containing the CAS in CAS policy.

 

After solution is deployed, what is the length of the trust file?

==============================

 

What happened from manifest to trust file?

============================

  1. Permissionset in policyitem is directly inserted into the trust file (the first highlighted part ). in this example, permissionset is named "installassemblies_solution_2052225630.cab-b172f003-d6c7-3e13-f737-a5d84a02e3e5-1 ". this name is a combination, which consistsInstallation Package("Installassemblies_solution_2052225630.cab") addSolutionid("B172f003-d6c7-3e13-f737-a5d84a02e3e5") plusPolicyitem Index(In this example, there is only one policyitem ).
  2. In manifest, a codegroup (the second highlighted yellow part) is created for each Assembly associated with the given policyitem ). each codegroup references the associated permissionset in policyitem. in addition, each codegroup is inserted to the first position of the parent codegroup container. this ensures that the firstmatchcodegroup action allows custom protocols to be applied before the default WSS permission set is applied.

Now let's take a look at how codegroups is created based on the data in the manifest file.

==============================

As mentioned in the schema rules section, the solution \ codeaccesssecurity \ assemblies \ Assembly node can contain three attributes: name, version and publickeyblob. the combination of the three attributes determines which membership the class is using.

 

Only the name Attribute-> urlmembershipcondition

-------------------------

This format is used when assemblies has no signature and is only deployed in the bin directory.

 

Only publickeyblob properties-> strongnamemembershipcondition

----------------------------------

This format is used when you want to apply a policy to all the assembly using a signature in globally.

 

Publickeyblob + name-> strongnamemembershipcondition

-------------------------------

When you want to isolate a policy from a specific assembly, you can use this format. The policy will be applied to all versions.

 

Publickeyblob + name + version --> strongnamemembershipcondition

-------------------------------

This format is used when you want to isolate a policy to a specific, signed, or version of the Assembly.

 

Code access security vulnerabilities ies within SharePoint v3

Http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx? Id = 249

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.