This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 974afa23d5e KAFKA-19584 add SecurityManager shim support to native 
image (#22379)
974afa23d5e is described below

commit 974afa23d5ef942feace0cd24c2ae5a801833421
Author: Gaurav Narula <[email protected]>
AuthorDate: Tue Jul 21 13:19:44 2026 +0100

    KAFKA-19584 add SecurityManager shim support to native image (#22379)
    
    KAFKA-17078 introduced a shim for SecurityManager to handle the removal
    of SecurityManager from JDK 23.
    
    This shim relies on reflection to load `legacy` and `modern` classes at
    runtime. Unfortunately, the native image's reachability metadata was not
    updated to account for this reflective access.
    
    This change fixes the regression and updates reflect-config.json
    appropriately.
    
    Reviewers: Jose Ignacio Gil Jaldo <[email protected]>, Chia-Ping Tsai
     <[email protected]>
---
 docker/native/native-image-configs/reflect-config.json | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/docker/native/native-image-configs/reflect-config.json 
b/docker/native/native-image-configs/reflect-config.json
index 53a5f4a9579..1dd72ae79b9 100644
--- a/docker/native/native-image-configs/reflect-config.json
+++ b/docker/native/native-image-configs/reflect-config.json
@@ -640,6 +640,13 @@
 {
   "name":"java.rmi.server.UID"
 },
+{
+  "name":"java.security.AccessControlContext"
+},
+{
+  "name":"java.security.AccessController",
+  
"methods":[{"name":"doPrivileged","parameterTypes":["java.security.PrivilegedAction"]
 }, {"name":"getContext","parameterTypes":[] }]
+},
 {
   "name":"java.security.AlgorithmParametersSpi"
 },
@@ -795,6 +802,10 @@
   "name":"javax.management.remote.rmi.RMIServerImpl_Stub",
   "methods":[{"name":"<init>","parameterTypes":["java.rmi.server.RemoteRef"] }]
 },
+{
+  "name":"javax.security.auth.Subject",
+  
"methods":[{"name":"callAs","parameterTypes":["javax.security.auth.Subject","java.util.concurrent.Callable"]
 }, {"name":"current","parameterTypes":[] }, 
{"name":"doAs","parameterTypes":["javax.security.auth.Subject","java.security.PrivilegedExceptionAction"]
 }, 
{"name":"getSubject","parameterTypes":["java.security.AccessControlContext"] }]
+},
 {
   "name":"javax.security.auth.x500.X500Principal",
   "fields":[{"name":"thisX500Name"}],

Reply via email to