Skip to content

HDDS-16403. Replace deprecated java.security.AccessControlException in HttpFSServer - #11231

Open
sravani-revuri wants to merge 2 commits into
apache:masterfrom
sravani-revuri:HDDS-16403
Open

HDDS-16403. Replace deprecated java.security.AccessControlException in HttpFSServer#11231
sravani-revuri wants to merge 2 commits into
apache:masterfrom
sravani-revuri:HDDS-16403

Conversation

@sravani-revuri

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

CI / basic (pmd) / pmd: hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java#L491
java.security.AccessControlException in java.security has been deprecated and marked for removal

CI / build / build: hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java#L491
java.security.AccessControlException in java.security has been deprecated and marked for removal

CI / javadoc / javadoc: hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java#L491
java.security.AccessControlException in java.security has been deprecated and marked for removal

CI / repro / repro: hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java#L491
java.security.AccessControlException in java.security has been deprecated and marked for removal

CI / compile (17) / compile (17)
java.security.AccessControlException in java.security has been deprecated and marked for removal

CI / integration (filesystem) / integration (filesystem): hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java#L491
java.security.AccessControlException in java.security has been deprecated and marked for removal

Ref: https://github.com/apache/ozone/actions/runs/33722833918?pr=11180

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16403

How was this patch tested?

Without change:

ozone % mvn -pl :ozone-httpfsgateway -am clean compile -DskipTests -DskipShade -DskipRecon -DskipDocs 2>&1 \
  | grep -i "AccessControlException.*deprecated" || echo "No deprecation warning — good"
[WARNING] /Users/vrevuri/ozone/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java:[491,17] java.security.AccessControlException in java.security has been deprecated and marked for removal

After change:

vrevuri@KJ3K6CH6Q1 ozone % mvn -pl :ozone-httpfsgateway -am clean compile -DskipTests -DskipShade -DskipRecon -DskipDocs 2>&1 \
  | grep -i "AccessControlException.*deprecated" || echo "No deprecation warning — good"
No deprecation warning — good

CI: https://github.com/sravani-revuri/ozone/actions/runs/34606041894

@chihsuan chihsuan 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.

Thanks for the patch @sravani-revuri

I used Claude Code to double-check this one and tested it locally. I noticed the old exception is a SecurityException, which the exception mapper turns into 401, while the new one is an IOException, which becomes 500.

So a non-admin user calling the instrumentation endpoint may now get 500 instead of 401. Should we keep the 401 behavior here? Happy to hear your thoughts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants