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
Extend permission checks in MessageTasks and add a test coverage [HZ-2090] #25509
Extend permission checks in MessageTasks and add a test coverage [HZ-2090] #25509
Conversation
ad85ee5
to
18a0a59
Compare
7ba726d
to
0372936
Compare
run-ee-nightly-tests |
run-ee-tests |
The job Click to expand the log file---------ERRORS----------- -------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project hazelcast-enterprise-native-memory: -------------------------- [ERROR] -------------------------- [ERROR] Please refer to /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory/target/surefire-reports for the individual test results. -------------------------- [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. -------------------------- [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called? -------------------------- [ERROR] Command was /bin/sh -c cd '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory' && '/usr/share/jdks/oracle-11/bin/java' '-Xms1g' '-Xmx1g' '-verbose:gc' '-Xloggc:/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/test_gc.log' '--add-exports' 'java.base/jdk.internal.ref=ALL-UNNAMED' '--add-opens' 'java.base/java.nio=ALL-UNNAMED' '--add-opens' 'java.base/sun.nio.ch=ALL-UNNAMED' '--add-opens' 'java.base/java.lang=ALL-UNNAMED' '--add-opens' 'jdk.management/com.sun.management.internal=ALL-UNNAMED' '--add-opens' 'java.management/sun.management=ALL-UNNAMED' '--add-exports' 'jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED' '--illegal-access=warn' '-ea' '-Dhazelcast.hidensity.check.freememory=false' '-Dhazelcast.phone.home.enabled=false' '-Dhazelcast.logging.type=none' '-Dhazelcast.test.use.network=false' '-Dlog4j.skipJansi=true' '-jar' '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory/target/surefire/surefirebooter-20230922092346642_3.jar' '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory/target/surefire' '2023-09-22T09-23-46_449-jvmRun1' 'surefire-20230922092346642_1tmp' 'surefire_0-20230922092346642_2tmp' -------------------------- [ERROR] Error occurred in starting fork, check output in log -------------------------- [ERROR] Process Exit Code: 134 -------------------------- [ERROR] Crashed tests: -------------------------- [ERROR] com.hazelcast.internal.memory.GlobalPoolingMemoryManagerStressTest -------------------------- [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? -------------------------- [ERROR] Command was /bin/sh -c cd '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory' && '/usr/share/jdks/oracle-11/bin/java' '-Xms1g' '-Xmx1g' '-verbose:gc' '-Xloggc:/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/test_gc.log' '--add-exports' 'java.base/jdk.internal.ref=ALL-UNNAMED' '--add-opens' 'java.base/java.nio=ALL-UNNAMED' '--add-opens' 'java.base/sun.nio.ch=ALL-UNNAMED' '--add-opens' 'java.base/java.lang=ALL-UNNAMED' '--add-opens' 'jdk.management/com.sun.management.internal=ALL-UNNAMED' '--add-opens' 'java.management/sun.management=ALL-UNNAMED' '--add-exports' 'jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED' '--illegal-access=warn' '-ea' '-Dhazelcast.hidensity.check.freememory=false' '-Dhazelcast.phone.home.enabled=false' '-Dhazelcast.logging.type=none' '-Dhazelcast.test.use.network=false' '-Dlog4j.skipJansi=true' '-jar' '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory/target/surefire/surefirebooter-20230922092346642_3.jar' '/home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder-ee-nightly-tests_2/hazelcast-enterprise/hazelcast-enterprise-native-memory/target/surefire' '2023-09-22T09-23-46_449-jvmRun1' 'surefire-20230922092346642_1tmp' 'surefire_0-20230922092346642_2tmp' -------------------------- [ERROR] Error occurred in starting fork, check output in log -------------------------- [ERROR] Process Exit Code: 134 -------------------------- [ERROR] Crashed tests: -------------------------- [ERROR] com.hazelcast.internal.memory.GlobalPoolingMemoryManagerStressTest -------------------------- [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:643) -------------------------- [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285) -------------------------- [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250) -------------------------- [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1203) -------------------------- [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1055) -------------------------- [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:871) -------------------------- [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:342) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:330) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:175) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:76) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:163) -------------------------- [ERROR] at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:160) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) -------------------------- [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) -------------------------- [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) -------------------------- [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) -------------------------- [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) -------------------------- [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:910) -------------------------- [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) -------------------------- [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) -------------------------- [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) -------------------------- [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) -------------------------- [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) -------------------------- [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) -------------------------- [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283) -------------------------- [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226) -------------------------- [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407) -------------------------- [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348) -------------------------- [ERROR] -> [Help 1] -------------------------- [ERROR] -------------------------- [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. -------------------------- [ERROR] Re-run Maven using the -X switch to enable full debug logging. -------------------------- [ERROR] -------------------------- [ERROR] For more information about the errors and possible solutions, please read the following articles: -------------------------- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException -------------------------- [ERROR] -------------------------- [ERROR] After correcting the problems, you can resume the build with the command -------------------------- [ERROR] mvn -rf :hazelcast-enterprise-native-memory -------------------------- |
The job Click to expand the log file---------ERRORS----------- -------------------------- [ERROR] Tests run: 13, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.075 s <<< FAILURE! -- in com.hazelcast.internal.tpcengine.nio.NioAsyncServerSocketTest -------------------------- [ERROR] com.hazelcast.internal.tpcengine.nio.NioAsyncServerSocketTest.test_createCloseLoop_withSameReactor -- Time elapsed: 0.219 s <<< ERROR! -------------------------- [ERROR] Errors: -------------------------- [ERROR] NioAsyncServerSocketTest>AsyncServerSocketTest.test_createCloseLoop_withSameReactor:255 ? UncheckedIO Failed to bind to /127.0.0.1:5001 -------------------------- [ERROR] Tests run: 292, Failures: 0, Errors: 1, Skipped: 0 -------------------------- [ERROR] -------------------------- |
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review, Serkan.
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
hazelcast/src/test/java/com/hazelcast/client/protocol/MessageTaskSecurityTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- just minor note on Throwable -> Exception
@@ -98,8 +100,8 @@ private static Set<Map.Entry<Data, Data>> fetchMapSnapshotFrom(List<Future> futu | |||
Object result; | |||
try { | |||
result = future.get(); | |||
} catch (Throwable t) { | |||
throw ExceptionUtil.rethrow(t); | |||
} catch (Exception e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is now more specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our Sonar gatekeeper was unhappy about the changed file (even the given try block was not touched). So I tried to make Sonar happier after checking the file history.
Thanks for the (re)reviews, guys. 🙇 |
run-lab-run |
…2090] (hazelcast#25509) This change extends permission checks in client messages and adds a basic test coverage.
…2090] (hazelcast#25509) This change extends permission checks in client messages and adds a basic test coverage.
…sks [HZ-2090] (hazelcast#25529) Permission type fixes. Follow up for hazelcast#25509
…sks [HZ-2090] (hazelcast#25529) Permission type fixes. Follow up for hazelcast#25509
…sks [HZ-2090] (hazelcast#25529) Permission type fixes. Follow up for hazelcast#25509
…2090] (hazelcast#25509) This change extends permission checks in client messages and adds a basic test coverage.
…sks [HZ-2090] (hazelcast#25529) Permission type fixes. Follow up for hazelcast#25509
…eProxiesMessageTask [HZ-3464] (#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to #25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] [5.3.3] (#25711) Backport of #25703 Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to #25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] [5.3.z] (#25710) Backport of #25703 Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to #25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
…eProxiesMessageTask [HZ-3464] (hazelcast#25703) Fixes https://hazelcast.atlassian.net/browse/HZ-3464 Follow-up to hazelcast#25509 This PR aligns check permission behavior in the message task with the message description in the [protocol definition](https://github.com/hazelcast/hazelcast-client-protocol/blob/master/protocol-definitions/Client.yaml#L721): ``` Any proxy creation failure is logged on the server side. Exceptions related to a proxy creation failure is not send to the client. A proxy creation failure does not cancel this operation, all proxies will be attempted to be created. ```
This PR extends permission checks in client messages and adds basic test coverage.