Skip to content

HADOOP-19940. [ABFS] Add no op support for set permission for RBAC and HNS enabled#8607

Open
anmolanmol1234 wants to merge 2 commits into
apache:trunkfrom
anmolanmol1234:HADOOP-19940
Open

HADOOP-19940. [ABFS] Add no op support for set permission for RBAC and HNS enabled#8607
anmolanmol1234 wants to merge 2 commits into
apache:trunkfrom
anmolanmol1234:HADOOP-19940

Conversation

@anmolanmol1234

@anmolanmol1234 anmolanmol1234 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Customers running Spark and Hadoop workloads on ADLS Gen2 with an RBAC-only authorization model (no ACLs assigned, all data access governed by Azure RBAC role assignments) are frequently blocked by framework-generated setPermission() calls.

setPermission() is invoked implicitly by:

Hadoop commit protocols (v1 and v2)
Spark's FileOutputCommitter on job commit
distcp when preserving permissions
Hive/Impala when writing partitions
Various other job-orchestration paths

On HNS-enabled accounts, setPermission() translates to a SetAccessControl request on the ADLS Gen2 REST surface, which requires ACL-management permissions (Microsoft.Storage/storageAccounts/blobServices/containers/blobs/manageOwnership/action or equivalent via a POSIX ACL entry granting the caller ACL modification rights).

In RBAC-only deployments, callers typically have full data-plane RBAC roles (e.g. Storage Blob Data Contributor) but do not have — and by design do not want — ACL-management permissions. As a result, these framework-generated setPermission() calls fail with 403 AuthorizationPermissionMismatch, breaking otherwise well-configured workloads.

There is currently no way to disable this driver-side behavior without also disabling the explicit ACL management APIs, which some customers still rely on.

Proposed change :-

Introduce an opt-in ABFS configuration:

fs.azure.rbac.only
true

When enabled on an HNS-enabled account, AzureBlobFileSystem#setPermission() is treated as a pure no-op: the call returns successfully without contacting the backend.

Disabled by default — no behavior change for existing deployments.
HNS-only — on non-HNS accounts the flag has no effect; existing driver semantics are preserved.
Scoped strictly to setPermission() — no other API is gated by this flag.

Principal Flag OFF (today) Flag ON
No RBAC roles All operations fail with 403, including FS initialization. Cannot initialize FS. If FS were somehow initialized, only setPermission() returns success as a no-op that touches nothing. All other operations still fail with 403.
Storage Blob Data Reader Reads succeed; writes, deletes, setPermission(), and ACL APIs fail with 403. Same as OFF, except setPermission() returns success as a no-op. Reader still cannot read anything they couldn't already read.
Storage Blob Data Contributor Data-plane operations succeed; setPermission() and ACL APIs fail with 403. Data-plane operations succeed. setPermission() succeeds as a no-op. ACL APIs still fail with 403. This is the target use case.
Storage Blob Data Owner (or ACL-management rights) All operations, including setPermission(), succeed and are applied. All operations succeed. setPermission() is a no-op (does not apply). ACL APIs, setOwner(), reads, and writes all continue to work normally.

@anmolanmol1234

Copy link
Copy Markdown
Contributor Author

============================================================
HNS-OAuth-DFS

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 873, Failures: 0, Errors: 0, Skipped: 174
[WARNING] Tests run: 170, Failures: 0, Errors: 0, Skipped: 8
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 23

============================================================
HNS-SharedKey-DFS

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 4
[WARNING] Tests run: 876, Failures: 0, Errors: 0, Skipped: 124
[WARNING] Tests run: 170, Failures: 0, Errors: 0, Skipped: 8
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 10

============================================================
AppendBlob-HNS-OAuth-DFS

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 873, Failures: 0, Errors: 0, Skipped: 185
[WARNING] Tests run: 147, Failures: 0, Errors: 0, Skipped: 9
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 23

============================================================
NonHNS-SharedKey-Blob

[ERROR] org.apache.hadoop.fs.azurebfs.services.TestAbfsInputStream.testAdaptiveInputStream -- Time elapsed: 1.382 s <<< FAILURE!

[ERROR] Tests run: 237, Failures: 1, Errors: 0, Skipped: 10
[WARNING] Tests run: 723, Failures: 0, Errors: 0, Skipped: 155
[WARNING] Tests run: 170, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 11

============================================================
NonHNS-OAuth-Blob

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 10
[WARNING] Tests run: 720, Failures: 0, Errors: 0, Skipped: 167
[WARNING] Tests run: 170, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 24

============================================================
AppendBlob-NonHNS-OAuth-Blob

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 10
[WARNING] Tests run: 715, Failures: 0, Errors: 0, Skipped: 188
[WARNING] Tests run: 147, Failures: 0, Errors: 0, Skipped: 4
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 24

============================================================
HNS-Oauth-DFS-IngressBlob

[WARNING] Tests run: 237, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 747, Failures: 0, Errors: 0, Skipped: 183
[WARNING] Tests run: 170, Failures: 0, Errors: 0, Skipped: 8
[WARNING] Tests run: 272, Failures: 0, Errors: 0, Skipped: 23

@anmolanmol1234 anmolanmol1234 changed the title Add no op support for set permission for RBAC and HNS enabled HADOOP-19940. [ABFS] Add no op support for set permission for RBAC and HNS enabled Jul 15, 2026
@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 7m 15s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 25m 35s trunk passed
+1 💚 compile 0m 38s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 0m 42s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 0m 39s trunk passed
+1 💚 mvnsite 0m 43s trunk passed
+1 💚 javadoc 0m 40s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 38s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 1m 2s trunk passed
+1 💚 shadedclient 16m 9s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 23s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 14s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 4 new + 10 unchanged - 0 fixed = 14 total (was 10)
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 0m 44s the patch passed
+1 💚 shadedclient 15m 10s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 42s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 24s The patch does not generate ASF License warnings.
75m 43s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/1/artifact/out/Dockerfile
GITHUB PR #8607
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint
uname Linux 8c11883d0f16 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 14e08a0
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/1/testReport/
Max. process+thread count 642 (vs. ulimit of 10000)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 21s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 25m 16s trunk passed
+1 💚 compile 0m 38s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 0m 39s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 0m 37s trunk passed
+1 💚 mvnsite 0m 43s trunk passed
+1 💚 javadoc 0m 38s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 40s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 0m 59s trunk passed
+1 💚 shadedclient 16m 25s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 20s the patch passed
+1 💚 compile 0m 22s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 22s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 17s the patch passed
+1 💚 mvnsite 0m 25s the patch passed
+1 💚 javadoc 0m 20s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 20s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 0m 45s the patch passed
+1 💚 shadedclient 15m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 41s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 23s The patch does not generate ASF License warnings.
68m 59s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/2/artifact/out/Dockerfile
GITHUB PR #8607
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint
uname Linux e8e7e5f19b6b 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 6bff107
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/2/testReport/
Max. process+thread count 614 (vs. ulimit of 10000)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8607/2/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@bhattmanish98 bhattmanish98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants