2 .\" caspol manual page.
3 .\" Copyright (C) 2004 Novell, Inc (http://www.novell.com)
5 .\" Sebastien Pouliot (sebastien@ximian.com)
9 caspol \- Command line tool to modify Code Access Security policies.
12 .B caspol [options] [policy level] [actions] [parameters] ...
14 This tools allow to list and modify the different policy levels (user,
15 machine and enterprise).
19 Do not ask confirmation to change the policy level.
22 Caspol.exe is a managed tool. Changing the security policies could affect
23 it's ability to work properly. This option permit changes that could
24 disallow caspol.exe from working properly.
27 Display help about the Code Access Security policies tool
32 Use the enterprise policy level for the next actions
35 Use the machine policy level for the next actions. This is the default
36 level for administrators (i.e. with write access to the machine policy
40 Use the user policy level for the next actions. This is the default
41 level for users (i.e. without write access to the machine policy files).
43 .I -ca policyfile | -customall policyfile
44 Use the specified file as the machine policy level for other arguments
45 Use the policy levels Enterprise, Machine and the custom (specified)
46 user policy level for the next actions
48 .I -cu[stomuser] policyfile
49 Use the specified file as the user policy level for next actions
52 Use all the policy levels (Enterprise, Machine and User) for the next
57 List all code groups in their hierarchical structure, all named
58 permissions sets and all fully trusted assemblies
60 .I -ld | -listdescription
61 List all code groups, in their hierarchical structure, with their
65 List all the code groups in their hierarchical structure
68 List all the permission sets including their names and XML representation
70 .I -lf | -listfulltrust
71 List all fully trusted assemblies
74 .I -rsg | -resolvegroup assemblyname
75 List all code groups that the assembly is part of for the policy level
77 .I -rsp | -resolveperm assemblyname
78 List all permissions granted to the specified assembly by the policy level
81 .I -ap | -addpset namedxmlfile | (xmlfile name)
82 Add a named permission set to the policy level
84 .I -cp | -chgpset xmlfile psetname
85 Change a named permission set in the policy level
87 .I -rp | -rempset psetname
88 Remove the specified named permission set from the policy level
91 .I -af | -addfulltrust assemblyname
92 Add the specified assembly to the fully trusted assembly list in the
93 policy level. If a policy use some custom security permissions then the
94 assembly containing the custom permissions must be in the fully trusted
95 list. Note that this requirement is recursive (all assemblies required
96 by the specified assembly must also be in the list). The assembly must be
97 strongnamed to be included in the fully trusted list
99 .I -rf | -remfulltrust assemblyname
100 Remove the specified assembly from the fully trusted assembly list in the
104 .I -ag | -addgroup label|name membership psetname flag
105 Add the specified code group with the supplied membership, permissions and
108 .I -cg | -chggroup label|name membership|psetname|flag
109 Change the specified code group with the supplied informations
111 .I -rg | -remgroup label|name
112 Remove the specified code group
116 Recover from previous version of the policy level (if available)
119 Reset the current policy level to it's default - or to the .default file
122 .SH CONFIGURATION SETTINGS
124 .I -s[ecurity] on | off
125 Turn Code Access Security (CAS) on or off. Note: This doesn't affect
128 .I -e[xecution] on | off
129 Turn execution rights on or off
132 Build a cache (serialized version) of the policy level (.CCH files)
134 .I -pp | -polchgprompt on | off
135 Turn on or off policy changes prompt for future commands
137 .SH GROUPS SUB OPTIONS - MEMBERSHIP
140 This condition applies to all code.
143 This condition applies only for assemblies that URL evidence match the
144 application directory.
147 Use the option to load a custom condition into the policy. The class that
148 will deserialize the XML policy must be in a fully trusted assembly.
150 .I -hash algo [-hex hash | -file assemblyname]
151 This condition specify a specific hash that an assembly must generate
152 (from itself) to be satisfied. Any change to the assembly will require the
153 policy to be updated (as the hash value will have changed).
155 .I -pub [-cert certificate | -file signedfile | -hex rawdata]
156 This condition specify a X.509 Authenticode(r) certificate that must have
157 signed an assembly in order to be satisfied. The certificate can be referenced
158 as a file (binary DER), a signed file (containing the certificate) or with
159 the hexadecimal value of the certificate. Note that files outside the
160 policy must also be protected against tempering.
162 .I -strong -file filename [name | -noname] [version | -noversion]
163 This condition specify a specific StrongName that must have signed an
164 assembly to be satisfied. Use -noname if the assembly name isn't known
165 (or important) and -version if the version isn't known (or important) in
169 This condition specify the site from where the assembly must come from to
173 This condition specify the URL from where the assembly must come from to
177 This condition specify the zone from where the assembly must come from to
178 be satisfied. Existing zones are MyComputer, Internet, Intranet, Trusted
181 .SH GROUPS SUB OPTIONS - FLAGS
183 .I -d[escription] description
184 Add (-ag) or change (-cg) the description for the specified code group
186 .I -exclusive on | off
187 If on (default is off) then only this permission set will be processed
188 for this code group (on this level).
190 .I -levelfinal on | off
191 If on (default is off) then no other level will be processed for this
195 Add (-ag) or change (-cg) the name of the specified code group. A code
196 group can be found by using it's name or it's label - but the later can
197 change as it is based on it's position in the policy level hierarchy.
201 It is possible to chain several commands with the tool, like:
203 .B caspol -m -lg -rg 1.6 -lg -rs -lg
205 This will list all machine level code groups, then remove the code group
206 labeled 1.6, list again all code groups (missing 1.6), reset the policy
207 and finally showing all code groups (where 1.6 is back).
211 .B Hash Membership Condition
212 Mono implementation of the Hash evidence isn't compatible with Fx 1.0/1.1.
213 However it seems compatible with Fx 2.0. You are suggested to use a
214 StrongName evidence if comptaibility is an issue for your policy.
217 Written by Sebastien Pouliot
219 Copyright (C) 2004 Novell, Inc (http://www.novell.com)
221 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
223 Visit http://www.mono-project.com for details