Access Control
This section details the REST API operations for managing access control lists (ACLs) for files and directories in Azure Data Lake Storage Gen2.
ACLs define permissions for specific users and groups on files and directories. They are hierarchical, meaning permissions set on a directory are inherited by its contents, subject to the ACLs defined on those contents.
Retrieves the ACL for a specific file or directory.
Name | Type | Description |
---|---|---|
action |
String | Must be set to getAccessControl . |
directoryQueryParams |
String | Optional. Valid values include recursive for recursive retrieval. |
Returns an AccessControlList
object containing the ACL entries.
{
"entries": [
{
"type": "user",
"id": "owner-sid",
"permissions": "rwx"
},
{
"type": "group",
"id": "owning-group-sid",
"permissions": "rwx"
},
{
"type": "other",
"permissions": "r--"
},
{
"type": "user",
"id": "specific-user-sid",
"permissions": "rw-"
}
],
"defaultEntries": [
{
"type": "user",
"id": "owner-sid",
"permissions": "rwx"
}
]
}
Sets the ACL for a specific file or directory. This operation replaces the existing ACL.
Name | Type | Description |
---|---|---|
action |
String | Must be set to setAccessControl . |
directoryQueryParams |
String | Optional. Valid values include recursive for recursive application. |
A JSON object representing the new ACL:
{
"entries": [
{
"type": "user",
"id": "owner-sid",
"permissions": "rwx"
},
{
"type": "group",
"id": "owning-group-sid",
"permissions": "r--"
},
{
"type": "other",
"permissions": "---"
}
],
"defaultEntries": [
{
"type": "user",
"id": "owner-sid",
"permissions": "rwx"
}
]
}
Indicates the ACL was successfully updated. No response body is returned.
Returns an error code and message for failures.
Adds, modifies, or removes a single Access Control Entry (ACE) from the ACL of a file or directory. This is an efficient way to make granular changes.
Name | Type | Description |
---|---|---|
action |
String | Must be set to updateAccessControl . |
acl |
String | A base64 encoded string representing the ACE to add, modify, or remove.
Example ACE encoding: user:specific-user-sid:rw- (for adding/modifying)
To remove an ACE, you can often set its permissions to empty or use a specific "remove" action if supported by the SDK. For direct REST, the exact behavior might depend on the presence and format of the entry. |
directoryQueryParams |
String | Optional. Valid values include recursive for recursive application. |
Indicates the ACE was successfully updated. No response body is returned.