|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.management.snmp.uacl.JdmkUserAcl
Defines an implementation of the UserAcl interface.
In this implementation the ACL information is stored on a flat file and its default location is specified in the following order:
jdmk.uacl.file property.
getEtcDir("conf" + File.separator + "jdmk.uacl")
in class DefaultPaths.
| Constructor Summary | |
JdmkUserAcl(String name)
Constructs the Java Dynamic Management(TM) Access Control List based on user names. |
|
JdmkUserAcl(String name,
String fileName)
Constructs the Java Dynamic Management(TM) Access Control List based on user names. |
|
| Method Summary | |
boolean |
checkContextName(String context)
Checks whether or not a context name is defined. |
boolean |
checkReadPermission(String user)
Checks whether or not the specified user has READ access. |
boolean |
checkReadPermission(String user,
String context,
int securityLevel)
Checks whether or not the specified user and context name have READ access. |
boolean |
checkWritePermission(String user)
Checks whether or not the specified user has WRITE access. |
boolean |
checkWritePermission(String user,
String context,
int securityLevel)
Checks whether or not the specified user and context name have WRITE access. |
Enumeration |
entries()
Returns an enumeration of the entries in this ACL. |
String |
getAuthorizedListFile()
Returns the full path of the file used to get ACL information. |
String |
getName()
Returns the name of the ACL. |
static com.sun.management.snmp.uacl.PermissionImpl |
getREAD()
Returns the read permission instance used. |
static com.sun.management.snmp.uacl.PermissionImpl |
getWRITE()
Returns the write permission instance used. |
void |
rereadTheFile()
Resets this ACL to the values contained in the configuration file. |
void |
setAuthorizedListFile(String filename)
Sets the full path of the file containing the ACL information. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JdmkUserAcl(String name,
String fileName)
throws IllegalArgumentException
name - The name of the ACL.fileName - The name of the ACL file.
IllegalArgumentException - If the ACL file doesn't exist.
public JdmkUserAcl(String name)
throws IllegalArgumentException
name - The name of the ACL.
IllegalArgumentException - If the ACL file doesn't exist.| Method Detail |
public Enumeration entries()
java.security.acl.AclEntry.
public String getName()
getName in interface UserAclpublic static com.sun.management.snmp.uacl.PermissionImpl getREAD()
public static com.sun.management.snmp.uacl.PermissionImpl getWRITE()
public void setAuthorizedListFile(String filename)
throws IllegalArgumentException,
NotOwnerException
IllegalArgumentException is thrown, the previous existing ACL configuration is not cleared.
filename - The full path of the file containing the ACL information.
IllegalArgumentException - If the passed ACL file is null or doesn't exist.
NotOwnerException - This exception is never thrown.
public void rereadTheFile()
throws NotOwnerException
NotOwnerException - If the principal attempting the reset is not an owner of this ACL.public String getAuthorizedListFile()
public boolean checkReadPermission(String user)
READ access.
checkReadPermission in interface UserAcluser - The user name to check.
true if the host has read permission, false otherwise.
public boolean checkReadPermission(String user,
String context,
int securityLevel)
READ access.
checkReadPermission in interface UserAcluser - The user name to check.context - The context name associated with the user.securityLevel - The request security level.
true if the pair (user, context) has read permission, false otherwise.public boolean checkContextName(String context)
checkContextName in interface UserAclcontext - The context to check.
true if the context is known, false otherwise.public boolean checkWritePermission(String user)
WRITE access.
checkWritePermission in interface UserAcluser - The user to check.
true if the user has write permission, false otherwise.
public boolean checkWritePermission(String user,
String context,
int securityLevel)
WRITE access.
checkWritePermission in interface UserAcluser - The user name to check.context - The context name associated with the user.securityLevel - The request security level.
true if the pair (user, context) has write permission, false otherwise.
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||