This is an automated email from the ASF dual-hosted git repository.
frankgh pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-sidecar.git
The following commit(s) were added to refs/heads/trunk by this push:
new 20b0a5eb CASSSIDECAR-207: Upgrade Netty to 4.1.118.Final and Vert.x to
4.5.13 Version (#190)
20b0a5eb is described below
commit 20b0a5eba9fcd3e37cffbb7b0d9467d6dadeb73e
Author: Saranya Krishnakumar <[email protected]>
AuthorDate: Mon Feb 10 19:46:51 2025 -0800
CASSSIDECAR-207: Upgrade Netty to 4.1.118.Final and Vert.x to 4.5.13
Version (#190)
Patch by Saranya Krishnakumar; reviewed by Yifan Cai, Francisco Guerrero
for CASSSIDECAR-207
---
CHANGES.txt | 1 +
client-common/build.gradle | 4 ++--
client/build.gradle | 6 +++---
gradle.properties | 3 ++-
.../cassandra/sidecar/acl/authorization/DataResourceScope.java | 10 ++--------
.../cassandra/sidecar/routes/AccessProtectedRouteBuilder.java | 8 --------
.../cassandra/sidecar/acl/authorization/ResourceScopeTest.java | 2 +-
7 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index f5670bfa..e5a8fa7c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
1.0.0
-----
+ * Upgrade Netty to 4.1.118.Final and Vert.x to 4.5.13 Version
(CASSSIDECAR-207)
* Fix missing field for INDEX_STATUS in GossipInfo (CASSSIDECAR-195)
* Add feature level permissions to Sidecar (CASSSIDECAR-193)
* Sidecar schema initialization can be executed on multiple thread
(CASSSIDECAR-200)
diff --git a/client-common/build.gradle b/client-common/build.gradle
index 605c5d1a..61263b46 100644
--- a/client-common/build.gradle
+++ b/client-common/build.gradle
@@ -56,7 +56,7 @@ dependencies {
compileOnly(group: 'org.slf4j', name: 'slf4j-api', version:
"${project.slf4jVersion}")
compileOnly(group: 'com.fasterxml.jackson.core', name: 'jackson-databind',
version: "${project.jacksonVersion}")
compileOnly(group: 'org.jetbrains', name: 'annotations', version: '23.0.0')
- compileOnly(group: 'io.netty', name: 'netty-codec-http', version:
'4.1.69.Final')
+ compileOnly(group: 'io.netty', name: 'netty-codec-http', version:
"${project.nettyVersion}")
compileOnly(group: 'com.google.guava', name: 'guava', version:
"${project.guavaVersion}")
testImplementation(group: 'com.fasterxml.jackson.core', name:
'jackson-databind', version: "${project.jacksonVersion}")
@@ -65,7 +65,7 @@ dependencies {
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:${project.junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${project.junitVersion}")
- testImplementation(group: 'io.netty', name: 'netty-codec-http', version:
'4.1.69.Final')
+ testImplementation(group: 'io.netty', name: 'netty-codec-http', version:
"${project.nettyVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${project.junitVersion}")
}
diff --git a/client/build.gradle b/client/build.gradle
index 1f886038..6cf7784e 100644
--- a/client/build.gradle
+++ b/client/build.gradle
@@ -78,14 +78,14 @@ dependencies {
implementation("org.slf4j:slf4j-api:${project.slf4jVersion}")
compileOnly('org.jetbrains:annotations:23.0.0')
- compileOnly(group: 'io.netty', name: 'netty-codec-http', version:
'4.1.69.Final')
+ compileOnly(group: 'io.netty', name: 'netty-codec-http', version:
"${project.nettyVersion}")
testImplementation(platform('org.junit:junit-bom:5.9.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation('org.mockito:mockito-core:4.10.0')
testImplementation('com.squareup.okhttp3:mockwebserver:4.10.0')
- testImplementation(group: 'io.netty', name: 'netty-codec-http', version:
'4.1.69.Final')
+ testImplementation(group: 'io.netty', name: 'netty-codec-http', version:
"${project.nettyVersion}")
testFixturesImplementation(testFixtures(project(":client-common")))
testFixturesImplementation(platform('org.junit:junit-bom:5.9.2'))
@@ -94,7 +94,7 @@ dependencies {
testFixturesImplementation('org.mockito:mockito-core:4.10.0')
testFixturesImplementation('com.squareup.okhttp3:mockwebserver:4.10.0')
testFixturesImplementation(group: 'com.fasterxml.jackson.core', name:
'jackson-databind', version: "${project.jacksonVersion}")
- testFixturesCompileOnly(group: 'io.netty', name: 'netty-codec-http',
version: '4.1.69.Final')
+ testFixturesCompileOnly(group: 'io.netty', name: 'netty-codec-http',
version: "${project.nettyVersion}")
}
java {
diff --git a/gradle.properties b/gradle.properties
index c14be226..eb6cbc28 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,7 +18,8 @@
version=1.0-SNAPSHOT
junitVersion=5.9.2
-vertxVersion=4.5.7
+vertxVersion=4.5.13
+nettyVersion=4.1.118.Final
guavaVersion=27.0.1-jre
slf4jVersion=1.7.36
jacksonVersion=2.14.3
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/DataResourceScope.java
b/server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/DataResourceScope.java
index 64be5025..67f8d00e 100644
---
a/server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/DataResourceScope.java
+++
b/server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/DataResourceScope.java
@@ -53,14 +53,8 @@ public class DataResourceScope implements ResourceScope
*/
public static final String DATA_WITH_KEYSPACE = String.format("data/{%s}",
KEYSPACE);
- // TODO remove this hack once VariableAwareExpression bug is fixed
- // VariableAwareExpression in vertx-auth-common package has a bug during
String.substring() call, hence
- // we cannot set resources that do not end in curly braces (e.g.
data/keyspace/*) in
- // PermissionBasedAuthorizationImpl or
WildcardPermissionBasedAuthorizationImpl. data/{%s}/{TABLE_WILDCARD} treats
- // TABLE_WILDCARD as a variable. This hack allows to read resource level
permissions that could be set for all
- // tables through data/<keyspace_name>/*. Bug should be fixed in 4.5.12
- // Note: DATA_WITH_KEYSPACE_ALL_TABLES authorizes for all tables under the
keyspace excluding the keyspace itself
- public static final String DATA_WITH_KEYSPACE_ALL_TABLES =
String.format("data/{%s}/{TABLE_WILDCARD}", KEYSPACE);
+ // DATA_WITH_KEYSPACE_ALL_TABLES authorizes for all tables under the
keyspace excluding the keyspace itself
+ public static final String DATA_WITH_KEYSPACE_ALL_TABLES =
String.format("data/{%s}/*", KEYSPACE);
public static final String DATA_WITH_KEYSPACE_TABLE =
String.format("data/{%s}/{%s}", KEYSPACE, TABLE);
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/routes/AccessProtectedRouteBuilder.java
b/server/src/main/java/org/apache/cassandra/sidecar/routes/AccessProtectedRouteBuilder.java
index 601f3620..4a507e3e 100644
---
a/server/src/main/java/org/apache/cassandra/sidecar/routes/AccessProtectedRouteBuilder.java
+++
b/server/src/main/java/org/apache/cassandra/sidecar/routes/AccessProtectedRouteBuilder.java
@@ -208,14 +208,6 @@ public class AccessProtectedRouteBuilder
{
authZContext.variables().add(TABLE, table);
}
-
- // TODO remove this hack once VariableAwareExpression bug is fixed
- // VariableAwareExpression in vertx-auth-common package has a bug
during String.substring() call, hence
- // we cannot set resources that do not end in curly braces (e.g.
data/keyspace/*) in
- // PermissionBasedAuthorizationImpl or
WildcardPermissionBasedAuthorizationImpl. hence we treat
- // TABLE_WILDCARD as a variable and set it always. This hack
allows to read
- // resource level permissions that could be set for all tables
through data/<keyspace_name>/*
- authZContext.variables().add("TABLE_WILDCARD", "*");
};
}
}
diff --git
a/server/src/test/java/org/apache/cassandra/sidecar/acl/authorization/ResourceScopeTest.java
b/server/src/test/java/org/apache/cassandra/sidecar/acl/authorization/ResourceScopeTest.java
index 9fbec06f..cbb12597 100644
---
a/server/src/test/java/org/apache/cassandra/sidecar/acl/authorization/ResourceScopeTest.java
+++
b/server/src/test/java/org/apache/cassandra/sidecar/acl/authorization/ResourceScopeTest.java
@@ -80,7 +80,7 @@ class ResourceScopeTest
assertThat(TABLE_SCOPE.expandedResources()).hasSize(4)
.contains("data",
"data/{keyspace}",
-
"data/{keyspace}/{TABLE_WILDCARD}",
+
"data/{keyspace}/*",
"data/{keyspace}/{table}");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]