| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
USE_REAL_ACLS |
|
static java.lang.String |
WILDCARD_ACL_VALUE |
| Constructor | Description |
|---|---|
AccessControlList() |
This constructor exists primarily for AccessControlList to be Writable.
|
AccessControlList(java.lang.String aclString) |
Construct a new ACL from a String representation of the same.
|
AccessControlList(java.lang.String users,
java.lang.String groups) |
Construct a new ACL from String representation of users and groups
The arguments are comma separated lists
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addGroup(java.lang.String group) |
Add group to the names of groups allowed for this service.
|
void |
addUser(java.lang.String user) |
Add user to the names of users allowed for this service.
|
java.lang.String |
getAclString() |
Returns the access control list as a String that can be used for building a
new instance by sending it to the constructor of
AccessControlList. |
java.util.Collection<java.lang.String> |
getGroups() |
Get the names of user groups allowed for this service.
|
java.util.Collection<java.lang.String> |
getUsers() |
Get the names of users allowed for this service.
|
boolean |
isAllAllowed() |
|
boolean |
isUserAllowed(UserGroupInformation ugi) |
|
boolean |
isUserInList(UserGroupInformation ugi) |
Checks if a user represented by the provided
UserGroupInformation
is a member of the Access Control List. |
void |
readFields(java.io.DataInput in) |
Deserializes the AccessControlList object
|
void |
removeGroup(java.lang.String group) |
Remove group from the names of groups allowed for this service.
|
void |
removeUser(java.lang.String user) |
Remove user from the names of users allowed for this service.
|
java.lang.String |
toString() |
Returns descriptive way of users and groups that are part of this ACL.
|
void |
write(java.io.DataOutput out) |
Serializes the AccessControlList object
|
public static final java.lang.String WILDCARD_ACL_VALUE
public static final java.lang.String USE_REAL_ACLS
public AccessControlList()
public AccessControlList(java.lang.String aclString)
aclString - String representation of the ACLpublic AccessControlList(java.lang.String users,
java.lang.String groups)
users - comma separated list of usersgroups - comma separated list of groupspublic boolean isAllAllowed()
public void addUser(java.lang.String user)
user - The user namepublic void addGroup(java.lang.String group)
group - The group namepublic void removeUser(java.lang.String user)
user - The user namepublic void removeGroup(java.lang.String group)
group - The group namepublic java.util.Collection<java.lang.String> getUsers()
public java.util.Collection<java.lang.String> getGroups()
public final boolean isUserInList(UserGroupInformation ugi)
UserGroupInformation
is a member of the Access Control List. If user was proxied and
USE_REAL_ACLS + the real user name is in the control list, then treat this
case as if user were in the ACL list.ugi - UserGroupInformation to check if contained in the ACLpublic boolean isUserAllowed(UserGroupInformation ugi)
public java.lang.String toString()
getAclString() to get the exact String that can be given to
the constructor of AccessControlList to create a new instance.toString in class java.lang.Objectpublic java.lang.String getAclString()
AccessControlList.public void write(java.io.DataOutput out)
throws java.io.IOException
public void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in interface Writablein - DataInput to deseriablize this object from.java.io.IOException - any other problem for readFields.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.