IdentityTransformerInterfaceLocalIdentityTransformerpublic class IdentityTransformer extends java.lang.Object implements IdentityTransformerInterface
| Constructor | Description |
|---|---|
IdentityTransformer(org.apache.hadoop.conf.Configuration configuration) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
transformAclEntriesForGetRequest(java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclEntries,
java.lang.String localUser,
java.lang.String localGroup) |
Perform Identity transformation when calling GetAclStatus()
If the AclEntry type is a user or group, and its name is one of the following:
|
void |
transformAclEntriesForSetRequest(java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclEntries) |
Perform Identity transformation when calling setAcl(),removeAclEntries() and modifyAclEntries()
If the AclEntry type is a user or group, and its name is one of the following:
1.short name; 2.$superuser; 3.Fully qualified name; 4.
|
java.lang.String |
transformIdentityForGetRequest(java.lang.String originalIdentity,
boolean isUserName,
java.lang.String localIdentity) |
Perform identity transformation for the Get request results in AzureBlobFileSystemStore:
getFileStatus(), listStatus(), getAclStatus().
|
java.lang.String |
transformUserOrGroupForSetRequest(java.lang.String userOrGroup) |
Perform Identity transformation when setting owner on a path.
|
public IdentityTransformer(org.apache.hadoop.conf.Configuration configuration)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String transformIdentityForGetRequest(java.lang.String originalIdentity,
boolean isUserName,
java.lang.String localIdentity)
throws java.io.IOException
1. $superuser:
by default it will be transformed to local user/group, this can be disabled by setting
"fs.azure.identity.transformer.skip.superuser.replacement" to true.
2. User principal id:
can be transformed to localIdentity, if this principal id matches the principal id set in
"fs.azure.identity.transformer.service.principal.id" and localIdentity is stated in
"fs.azure.identity.transformer.service.principal.substitution.list"
3. User principal name (UPN):
can be transformed to a short name(localIdentity) if originalIdentity is owner name, and
"fs.azure.identity.transformer.enable.short.name" is enabled.
transformIdentityForGetRequest in interface IdentityTransformerInterfaceoriginalIdentity - the original user or group in the get request results: FileStatus, AclStatus.isUserName - indicate whether the input originalIdentity is an owner name or owning group name.localIdentity - the local user or group, should be parsed from UserGroupInformation.java.io.IOExceptionpublic java.lang.String transformUserOrGroupForSetRequest(java.lang.String userOrGroup)
short name could be transformed to:
- A service principal id or $superuser, if short name belongs a daemon service
stated in substitution list AND "fs.azure.identity.transformer.service.principal.id"
is set with $superuser or a principal id.
- Fully qualified name, if "fs.azure.identity.transformer.domain.name" is set in configuration.
$superuser, fully qualified name and principalId should not be transformed.
transformUserOrGroupForSetRequest in interface IdentityTransformerInterfaceuserOrGroup - the user or group to be set as owner.public void transformAclEntriesForSetRequest(java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclEntries)
Short name could be transformed to:
- A service principal id or $superuser, if short name belongs a daemon service
stated in substitution list AND "fs.azure.identity.transformer.service.principal.id"
is set with $superuser or a principal id.
- A fully qualified name, if the AclEntry type is User AND if "fs.azure.identity.transformer.domain.name"
is set in configuration. This is to make the behavior consistent with HDI.
$superuser, fully qualified name and principal id should not be transformed.
transformAclEntriesForSetRequest in interface IdentityTransformerInterfaceaclEntries - list of AclEntrypublic void transformAclEntriesForGetRequest(java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclEntries,
java.lang.String localUser,
java.lang.String localGroup)
throws java.io.IOException
1. $superuser:
by default it will be transformed to local user/group, this can be disabled by setting
"fs.azure.identity.transformer.skip.superuser.replacement" to true.
2. User principal id:
can be transformed to localUser/localGroup, if this principal id matches the principal id set in
"fs.azure.identity.transformer.service.principal.id" and localIdentity is stated in
"fs.azure.identity.transformer.service.principal.substitution.list"
3. User principal name (UPN):
can be transformed to a short name(local identity) if originalIdentity is owner name, and
"fs.azure.identity.transformer.enable.short.name" is enabled.
transformAclEntriesForGetRequest in interface IdentityTransformerInterfaceaclEntries - list of AclEntrylocalUser - local user namelocalGroup - local primary groupjava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.