author | mullan |
Mon, 19 Aug 2013 17:17:17 -0400 | |
changeset 19439 | 57876ed3c426 |
parent 18830 | 90956ead732f |
child 22334 | e86fef5f34cb |
permissions | -rw-r--r-- |
2 | 1 |
/* |
18830 | 2 |
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package javax.security.auth; |
|
27 |
||
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
28 |
import java.security.Security; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
29 |
import sun.security.util.Debug; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
30 |
|
2 | 31 |
/** |
32 |
* <p> This is an abstract class for representing the system policy for |
|
33 |
* Subject-based authorization. A subclass implementation |
|
34 |
* of this class provides a means to specify a Subject-based |
|
18830 | 35 |
* access control {@code Policy}. |
2 | 36 |
* |
18830 | 37 |
* <p> A {@code Policy} object can be queried for the set of |
2 | 38 |
* Permissions granted to code running as a |
18830 | 39 |
* {@code Principal} in the following manner: |
2 | 40 |
* |
41 |
* <pre> |
|
42 |
* policy = Policy.getPolicy(); |
|
43 |
* PermissionCollection perms = policy.getPermissions(subject, |
|
44 |
* codeSource); |
|
45 |
* </pre> |
|
46 |
* |
|
18830 | 47 |
* The {@code Policy} object consults the local policy and returns |
48 |
* and appropriate {@code Permissions} object with the |
|
2 | 49 |
* Permissions granted to the Principals associated with the |
50 |
* provided <i>subject</i>, and granted to the code specified |
|
51 |
* by the provided <i>codeSource</i>. |
|
52 |
* |
|
18830 | 53 |
* <p> A {@code Policy} contains the following information. |
2 | 54 |
* Note that this example only represents the syntax for the default |
18830 | 55 |
* {@code Policy} implementation. Subclass implementations of this class |
2 | 56 |
* may implement alternative syntaxes and may retrieve the |
18830 | 57 |
* {@code Policy} from any source such as files, databases, |
2 | 58 |
* or servers. |
59 |
* |
|
18830 | 60 |
* <p> Each entry in the {@code Policy} is represented as |
2 | 61 |
* a <b><i>grant</i></b> entry. Each <b><i>grant</i></b> entry |
62 |
* specifies a codebase, code signers, and Principals triplet, |
|
63 |
* as well as the Permissions granted to that triplet. |
|
64 |
* |
|
65 |
* <pre> |
|
66 |
* grant CodeBase ["URL"], Signedby ["signers"], |
|
67 |
* Principal [Principal_Class] "Principal_Name" { |
|
68 |
* Permission Permission_Class ["Target_Name"] |
|
69 |
* [, "Permission_Actions"] |
|
70 |
* [, signedBy "SignerName"]; |
|
71 |
* }; |
|
72 |
* </pre> |
|
73 |
* |
|
74 |
* The CodeBase and Signedby components of the triplet name/value pairs |
|
75 |
* are optional. If they are not present, then any any codebase will match, |
|
76 |
* and any signer (including unsigned code) will match. |
|
77 |
* For Example, |
|
78 |
* |
|
79 |
* <pre> |
|
80 |
* grant CodeBase "foo.com", Signedby "foo", |
|
81 |
* Principal com.sun.security.auth.SolarisPrincipal "duke" { |
|
82 |
* permission java.io.FilePermission "/home/duke", "read, write"; |
|
83 |
* }; |
|
84 |
* </pre> |
|
85 |
* |
|
86 |
* This <b><i>grant</i></b> entry specifies that code from "foo.com", |
|
18830 | 87 |
* signed by "foo', and running as a {@code SolarisPrincipal} with the |
88 |
* name, duke, has one {@code Permission}. This {@code Permission} |
|
2 | 89 |
* permits the executing code to read and write files in the directory, |
90 |
* "/home/duke". |
|
91 |
* |
|
18830 | 92 |
* <p> To "run" as a particular {@code Principal}, |
93 |
* code invokes the {@code Subject.doAs(subject, ...)} method. |
|
2 | 94 |
* After invoking that method, the code runs as all the Principals |
18830 | 95 |
* associated with the specified {@code Subject}. |
96 |
* Note that this {@code Policy} (and the Permissions |
|
97 |
* granted in this {@code Policy}) only become effective |
|
98 |
* after the call to {@code Subject.doAs} has occurred. |
|
2 | 99 |
* |
100 |
* <p> Multiple Principals may be listed within one <b><i>grant</i></b> entry. |
|
101 |
* All the Principals in the grant entry must be associated with |
|
18830 | 102 |
* the {@code Subject} provided to {@code Subject.doAs} |
103 |
* for that {@code Subject} to be granted the specified Permissions. |
|
2 | 104 |
* |
105 |
* <pre> |
|
106 |
* grant Principal com.sun.security.auth.SolarisPrincipal "duke", |
|
107 |
* Principal com.sun.security.auth.SolarisNumericUserPrincipal "0" { |
|
108 |
* permission java.io.FilePermission "/home/duke", "read, write"; |
|
109 |
* permission java.net.SocketPermission "duke.com", "connect"; |
|
110 |
* }; |
|
111 |
* </pre> |
|
112 |
* |
|
113 |
* This entry grants any code running as both "duke" and "0" |
|
114 |
* permission to read and write files in duke's home directory, |
|
115 |
* as well as permission to make socket connections to "duke.com". |
|
116 |
* |
|
117 |
* <p> Note that non Principal-based grant entries are not permitted |
|
18830 | 118 |
* in this {@code Policy}. Therefore, grant entries such as: |
2 | 119 |
* |
120 |
* <pre> |
|
121 |
* grant CodeBase "foo.com", Signedby "foo" { |
|
122 |
* permission java.io.FilePermission "/tmp/scratch", "read, write"; |
|
123 |
* }; |
|
124 |
* </pre> |
|
125 |
* |
|
126 |
* are rejected. Such permission must be listed in the |
|
18830 | 127 |
* {@code java.security.Policy}. |
2 | 128 |
* |
14775
2ed01c760aea
8004064: Downgrade normative references to ${java.home}/lib/security/java.security
mullan
parents:
7291
diff
changeset
|
129 |
* <p> The default {@code Policy} implementation can be changed by |
2ed01c760aea
8004064: Downgrade normative references to ${java.home}/lib/security/java.security
mullan
parents:
7291
diff
changeset
|
130 |
* setting the value of the {@code auth.policy.provider} security property to |
2ed01c760aea
8004064: Downgrade normative references to ${java.home}/lib/security/java.security
mullan
parents:
7291
diff
changeset
|
131 |
* the fully qualified name of the desired {@code Policy} implementation class. |
2 | 132 |
* |
133 |
* @deprecated as of JDK version 1.4 -- Replaced by java.security.Policy. |
|
134 |
* java.security.Policy has a method: |
|
135 |
* <pre> |
|
136 |
* public PermissionCollection getPermissions |
|
137 |
* (java.security.ProtectionDomain pd) |
|
138 |
* |
|
139 |
* </pre> |
|
140 |
* and ProtectionDomain has a constructor: |
|
141 |
* <pre> |
|
142 |
* public ProtectionDomain |
|
143 |
* (CodeSource cs, |
|
144 |
* PermissionCollection permissions, |
|
145 |
* ClassLoader loader, |
|
146 |
* Principal[] principals) |
|
147 |
* </pre> |
|
148 |
* |
|
149 |
* These two APIs provide callers the means to query the |
|
150 |
* Policy for Principal-based Permission entries. |
|
151 |
* |
|
14775
2ed01c760aea
8004064: Downgrade normative references to ${java.home}/lib/security/java.security
mullan
parents:
7291
diff
changeset
|
152 |
* @see java.security.Security security properties |
2 | 153 |
*/ |
154 |
@Deprecated |
|
155 |
public abstract class Policy { |
|
156 |
||
157 |
private static Policy policy; |
|
158 |
private static ClassLoader contextClassLoader; |
|
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
159 |
private final static String AUTH_POLICY = |
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
160 |
"sun.security.provider.AuthPolicyFile"; |
2 | 161 |
|
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
162 |
// true if a custom (not AUTH_POLICY) system-wide policy object is set |
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
163 |
private static boolean isCustomPolicy; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
164 |
|
2 | 165 |
static { |
166 |
contextClassLoader = java.security.AccessController.doPrivileged |
|
167 |
(new java.security.PrivilegedAction<ClassLoader>() { |
|
168 |
public ClassLoader run() { |
|
169 |
return Thread.currentThread().getContextClassLoader(); |
|
170 |
} |
|
171 |
}); |
|
172 |
}; |
|
173 |
||
174 |
/** |
|
175 |
* Sole constructor. (For invocation by subclass constructors, typically |
|
176 |
* implicit.) |
|
177 |
*/ |
|
178 |
protected Policy() { } |
|
179 |
||
180 |
/** |
|
181 |
* Returns the installed Policy object. |
|
182 |
* This method first calls |
|
18830 | 183 |
* {@code SecurityManager.checkPermission} with the |
184 |
* {@code AuthPermission("getPolicy")} permission |
|
2 | 185 |
* to ensure the caller has permission to get the Policy object. |
186 |
* |
|
187 |
* <p> |
|
188 |
* |
|
189 |
* @return the installed Policy. The return value cannot be |
|
18830 | 190 |
* {@code null}. |
2 | 191 |
* |
192 |
* @exception java.lang.SecurityException if the current thread does not |
|
193 |
* have permission to get the Policy object. |
|
194 |
* |
|
195 |
* @see #setPolicy |
|
196 |
*/ |
|
197 |
public static Policy getPolicy() { |
|
198 |
java.lang.SecurityManager sm = System.getSecurityManager(); |
|
199 |
if (sm != null) sm.checkPermission(new AuthPermission("getPolicy")); |
|
200 |
return getPolicyNoCheck(); |
|
201 |
} |
|
202 |
||
203 |
/** |
|
204 |
* Returns the installed Policy object, skipping the security check. |
|
205 |
* |
|
206 |
* @return the installed Policy. |
|
207 |
* |
|
208 |
*/ |
|
209 |
static Policy getPolicyNoCheck() { |
|
210 |
if (policy == null) { |
|
211 |
||
212 |
synchronized(Policy.class) { |
|
213 |
||
214 |
if (policy == null) { |
|
215 |
String policy_class = null; |
|
216 |
policy_class = java.security.AccessController.doPrivileged |
|
217 |
(new java.security.PrivilegedAction<String>() { |
|
218 |
public String run() { |
|
219 |
return java.security.Security.getProperty |
|
220 |
("auth.policy.provider"); |
|
221 |
} |
|
222 |
}); |
|
223 |
if (policy_class == null) { |
|
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
224 |
policy_class = AUTH_POLICY; |
2 | 225 |
} |
226 |
||
227 |
try { |
|
228 |
final String finalClass = policy_class; |
|
229 |
policy = java.security.AccessController.doPrivileged |
|
230 |
(new java.security.PrivilegedExceptionAction<Policy>() { |
|
231 |
public Policy run() throws ClassNotFoundException, |
|
232 |
InstantiationException, |
|
233 |
IllegalAccessException { |
|
234 |
return (Policy) Class.forName |
|
235 |
(finalClass, |
|
236 |
true, |
|
237 |
contextClassLoader).newInstance(); |
|
238 |
} |
|
239 |
}); |
|
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
240 |
isCustomPolicy = !finalClass.equals(AUTH_POLICY); |
2 | 241 |
} catch (Exception e) { |
242 |
throw new SecurityException |
|
243 |
(sun.security.util.ResourcesMgr.getString |
|
7179
4afb81e50183
6987827: security/util/Resources.java needs improvement
weijun
parents:
5506
diff
changeset
|
244 |
("unable.to.instantiate.Subject.based.policy")); |
2 | 245 |
} |
246 |
} |
|
247 |
} |
|
248 |
} |
|
249 |
return policy; |
|
250 |
} |
|
251 |
||
252 |
||
253 |
/** |
|
254 |
* Sets the system-wide Policy object. This method first calls |
|
18830 | 255 |
* {@code SecurityManager.checkPermission} with the |
256 |
* {@code AuthPermission("setPolicy")} |
|
2 | 257 |
* permission to ensure the caller has permission to set the Policy. |
258 |
* |
|
259 |
* <p> |
|
260 |
* |
|
261 |
* @param policy the new system Policy object. |
|
262 |
* |
|
263 |
* @exception java.lang.SecurityException if the current thread does not |
|
264 |
* have permission to set the Policy. |
|
265 |
* |
|
266 |
* @see #getPolicy |
|
267 |
*/ |
|
268 |
public static void setPolicy(Policy policy) { |
|
269 |
java.lang.SecurityManager sm = System.getSecurityManager(); |
|
270 |
if (sm != null) sm.checkPermission(new AuthPermission("setPolicy")); |
|
271 |
Policy.policy = policy; |
|
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
272 |
// all non-null policy objects are assumed to be custom |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
273 |
isCustomPolicy = policy != null ? true : false; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
274 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
275 |
|
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
276 |
/** |
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
277 |
* Returns true if a custom (not AUTH_POLICY) system-wide policy object |
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
278 |
* has been set or installed. This method is called by |
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
279 |
* SubjectDomainCombiner to provide backwards compatibility for |
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
280 |
* developers that provide their own javax.security.auth.Policy |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
281 |
* implementations. |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
282 |
* |
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
283 |
* @return true if a custom (not AUTH_POLICY) system-wide policy object |
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
284 |
* has been set; false otherwise |
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
285 |
*/ |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
286 |
static boolean isCustomPolicySet(Debug debug) { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
287 |
if (policy != null) { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
288 |
if (debug != null && isCustomPolicy) { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
289 |
debug.println("Providing backwards compatibility for " + |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
290 |
"javax.security.auth.policy implementation: " + |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
291 |
policy.toString()); |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
292 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
293 |
return isCustomPolicy; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
294 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
295 |
// check if custom policy has been set using auth.policy.provider prop |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
296 |
String policyClass = java.security.AccessController.doPrivileged |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
297 |
(new java.security.PrivilegedAction<String>() { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
298 |
public String run() { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
299 |
return Security.getProperty("auth.policy.provider"); |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
300 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
301 |
}); |
19439
57876ed3c426
8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
mullan
parents:
18830
diff
changeset
|
302 |
if (policyClass != null && !policyClass.equals(AUTH_POLICY)) { |
7291
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
303 |
if (debug != null) { |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
304 |
debug.println("Providing backwards compatibility for " + |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
305 |
"javax.security.auth.policy implementation: " + |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
306 |
policyClass); |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
307 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
308 |
return true; |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
309 |
} |
9fefa2786251
6995424: Eliminate dependency to a deprecated API com.sun.security.auth.PolicyFile
mullan
parents:
7179
diff
changeset
|
310 |
return false; |
2 | 311 |
} |
312 |
||
313 |
/** |
|
314 |
* Retrieve the Permissions granted to the Principals associated with |
|
18830 | 315 |
* the specified {@code CodeSource}. |
2 | 316 |
* |
317 |
* <p> |
|
318 |
* |
|
18830 | 319 |
* @param subject the {@code Subject} |
2 | 320 |
* whose associated Principals, |
321 |
* in conjunction with the provided |
|
18830 | 322 |
* {@code CodeSource}, determines the Permissions |
2 | 323 |
* returned by this method. This parameter |
18830 | 324 |
* may be {@code null}. <p> |
2 | 325 |
* |
18830 | 326 |
* @param cs the code specified by its {@code CodeSource} |
2 | 327 |
* that determines, in conjunction with the provided |
18830 | 328 |
* {@code Subject}, the Permissions |
2 | 329 |
* returned by this method. This parameter may be |
18830 | 330 |
* {@code null}. |
2 | 331 |
* |
332 |
* @return the Collection of Permissions granted to all the |
|
18830 | 333 |
* {@code Subject} and code specified in |
2 | 334 |
* the provided <i>subject</i> and <i>cs</i> |
335 |
* parameters. |
|
336 |
*/ |
|
337 |
public abstract java.security.PermissionCollection getPermissions |
|
338 |
(Subject subject, |
|
339 |
java.security.CodeSource cs); |
|
340 |
||
341 |
/** |
|
342 |
* Refresh and reload the Policy. |
|
343 |
* |
|
344 |
* <p>This method causes this object to refresh/reload its current |
|
345 |
* Policy. This is implementation-dependent. |
|
346 |
* For example, if the Policy object is stored in |
|
18830 | 347 |
* a file, calling {@code refresh} will cause the file to be re-read. |
2 | 348 |
* |
349 |
* <p> |
|
350 |
* |
|
351 |
* @exception SecurityException if the caller does not have permission |
|
352 |
* to refresh the Policy. |
|
353 |
*/ |
|
354 |
public abstract void refresh(); |
|
355 |
} |