Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-21500 "hbase.jetty.logs.serve.aliases" is broken with jetty 9.x… #5586

Merged
merged 2 commits into from Dec 18, 2023

Conversation

NihalJain
Copy link
Contributor

… version

@NihalJain
Copy link
Contributor Author

NihalJain commented Dec 16, 2023

Changing the property name to org.eclipse.jetty.servlet.Default.aliases does not solve the problem.

Upon investigating found that in Jetty#ContextHandler, SymlinkAllowedResourceAliasChecker is added by default, irrespective of whether hbase.jetty.logs.serve.aliases is set to true or false, allowing aliases for /logs always. Hence issue is revealed only if the value is set to false and even then aliases are not disabled due to this bug.

See serving-aliased-files for how this feature works.

Based on the docs, I have created a patch with fix.

To test the fix following steps were followed:

  1. Disallowed flow
  • Build code with assembly:single
  • Untar the tarball
  • Configure hbase.jetty.logs.serve.aliases to false and start hbase in local mode
    <property>
    <name>hbase.jetty.logs.serve.aliases</name>
    <value>false</value>
    </property>
    
  • Goto logs directory and run following:
    • touch /tmp/test.txt
    • ln -s /tmp/test.txt test.txt
  • Goto http://localhost:16010/logs/test.txt and a 404 error should be thrown. See Screenshot 2023-12-17 at 2 50 45 AM
  1. Allowed flow, which is current default behavior and works even without the patch
  • Repeat above steps with hbase.jetty.logs.serve.aliases set to true or just remove it.
  • We should be able to access symlinked file test.txt

CC: @Apache9

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 12s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 35s master passed
+1 💚 compile 0m 14s master passed
+1 💚 shadedjars 4m 47s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 13s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 20s the patch passed
+1 💚 compile 0m 16s the patch passed
+1 💚 javac 0m 16s the patch passed
+1 💚 shadedjars 4m 44s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s the patch passed
_ Other Tests _
+1 💚 unit 0m 46s hbase-http in the patch passed.
17m 22s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5586
Optional Tests javac javadoc unit shadedjars compile
uname Linux 60d2c420eba2 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/testReport/
Max. process+thread count 357 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 15s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 48s master passed
+1 💚 compile 0m 14s master passed
+1 💚 shadedjars 5m 8s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 33s the patch passed
+1 💚 compile 0m 14s the patch passed
+1 💚 javac 0m 14s the patch passed
+1 💚 shadedjars 5m 4s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 10s the patch passed
_ Other Tests _
+1 💚 unit 0m 49s hbase-http in the patch passed.
20m 22s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5586
Optional Tests javac javadoc unit shadedjars compile
uname Linux a3824748be38 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/testReport/
Max. process+thread count 343 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 41s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 10s master passed
+1 💚 compile 0m 20s master passed
+1 💚 checkstyle 0m 8s master passed
+1 💚 spotless 0m 43s branch has no errors when running spotless:check.
+1 💚 spotbugs 0m 24s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 48s the patch passed
+1 💚 compile 0m 19s the patch passed
+1 💚 javac 0m 19s the patch passed
+1 💚 checkstyle 0m 7s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 10m 38s Patch does not cause any errors with Hadoop 3.2.4 3.3.6.
+1 💚 spotless 0m 41s patch has no errors when running spotless:check.
+1 💚 spotbugs 0m 31s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 9s The patch does not generate ASF License warnings.
29m 14s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5586
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 3e5d68fe8173 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 79 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 11s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 19s master passed
+1 💚 compile 0m 15s master passed
+1 💚 shadedjars 4m 43s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 20s the patch passed
+1 💚 compile 0m 16s the patch passed
+1 💚 javac 0m 16s the patch passed
+1 💚 shadedjars 4m 44s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s the patch passed
_ Other Tests _
+1 💚 unit 0m 46s hbase-http in the patch passed.
16m 54s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5586
Optional Tests javac javadoc unit shadedjars compile
uname Linux 569d75ebd360 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/testReport/
Max. process+thread count 365 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 24s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 55s master passed
+1 💚 compile 0m 14s master passed
+1 💚 shadedjars 5m 6s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 39s the patch passed
+1 💚 compile 0m 14s the patch passed
+1 💚 javac 0m 14s the patch passed
+1 💚 shadedjars 5m 5s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 10s the patch passed
_ Other Tests _
+1 💚 unit 0m 49s hbase-http in the patch passed.
18m 40s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5586
Optional Tests javac javadoc unit shadedjars compile
uname Linux d895613670d5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/testReport/
Max. process+thread count 265 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 46s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 57s master passed
+1 💚 compile 0m 31s master passed
+1 💚 checkstyle 0m 12s master passed
+1 💚 spotless 0m 54s branch has no errors when running spotless:check.
+1 💚 spotbugs 0m 33s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 18s the patch passed
+1 💚 compile 0m 23s the patch passed
+1 💚 javac 0m 23s the patch passed
+1 💚 checkstyle 0m 9s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 11m 10s Patch does not cause any errors with Hadoop 3.2.4 3.3.6.
+1 💚 spotless 0m 41s patch has no errors when running spotless:check.
+1 💚 spotbugs 0m 29s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 8s The patch does not generate ASF License warnings.
29m 59s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5586
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 194b1714ac33 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / b7c3f8c
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 77 (vs. ulimit of 30000)
modules C: hbase-http U: hbase-http
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5586/2/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@NihalJain NihalJain merged commit 53e01b2 into apache:master Dec 18, 2023
1 check passed
NihalJain added a commit that referenced this pull request Dec 18, 2023
…ersion (#5586)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
NihalJain added a commit that referenced this pull request Dec 18, 2023
…ersion (#5586)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 53e01b2)
NihalJain added a commit that referenced this pull request Dec 18, 2023
…ersion (#5586)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 53e01b2)
kadirozde pushed a commit to kadirozde/hbase that referenced this pull request Jan 5, 2024
…ersion (apache#5586)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants