Skip to content

Commit

Permalink
[CALCITE-6590] Remove use of Java SecurityManager in Avatica
Browse files Browse the repository at this point in the history
Also bump ByteBuddy version to 1.15.1
  • Loading branch information
stoty committed Sep 24, 2024
1 parent fe12aea commit b375a32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ allprojects {
options.encoding = "UTF-8"
}
withType<Test>().configureEach {
if (JavaVersion.current() >= JavaVersion.VERSION_23) {
jvmArgs("-Djava.security.manager=allow")
}
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public DoAsAvaticaHttpClient(AvaticaHttpClient wrapped, KerberosConnection kerbe
this.kerberosUtil = Objects.requireNonNull(kerberosUtil);
}

@Override public byte[] send(final byte[] request) {
// See CALCITE-6590
@Override @SuppressWarnings("removal")
public byte[] send(final byte[] request) {
return Subject.doAs(kerberosUtil.getSubject(), new PrivilegedAction<byte[]>() {
@Override public byte[] run() {
return wrapped.send(request);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spotbugs.version=3.1.11

asm.version=7.1
bouncycastle.version=1.70
bytebuddy.version=1.14.10
bytebuddy.version=1.15.1
dropwizard-metrics.version=4.0.5
# We support Guava versions as old as 14.0.1 (the version used by Hive)
# but prefer more recent versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ public static void writeSpnegoConf(File configFile, File serverKeytab)
}
}

// See CALCITE-6590
@SuppressWarnings("removal")
public static void refreshJaasConfiguration() {
// This is *extremely* important to make sure we get the right Configuration instance.
// Configuration keeps a static instance of Configuration that it will return once it
Expand Down

0 comments on commit b375a32

Please sign in to comment.