systemalchemy commented on issue #3495:
URL: https://github.com/apache/polaris/issues/3495#issuecomment-3780819124

   Hi Dmitri, thanks for your response. Here is the stack trace. 
   
   ### Actual Server Stack Trace
   
   
   ```
   2026-01-21 19:37:45,261 ERROR 
[io.qua.ver.htt.run.sec.AbstractHttpAuthorizer] [,] [,,,] 
(vert.x-eventloop-thread-1) Exception occurred during authorization:
   jakarta.enterprise.context.ContextNotActiveException: RequestScoped context 
was not active when trying to obtain a bean instance for a client proxy of 
PRODUCER_METHOD bean [class=org.apache.polaris.service.config.ServiceProducers, 
id=qqpjKw_IGybuFcj0RdqnWquPB6g]
        - you can activate the request context for a specific method using the 
@ActivateRequestContext interceptor binding
        at io.quarkus.arc.impl.ClientProxies.notActive(ClientProxies.java:76)
        at 
io.quarkus.arc.impl.ClientProxies.getSingleContextDelegate(ClientProxies.java:32)
        at 
org.apache.polaris.service.auth.ServiceProducers_ProducerMethod_realmAuthConfig_tFNnkziPu0lX3VErYmDto1gEwfU_ClientProxy.arc$delegate(Unknown
 Source)
        at 
org.apache.polaris.service.auth.ServiceProducers_ProducerMethod_realmAuthConfig_tFNnkziPu0lX3VErYmDto1gEwfU_ClientProxy.type(Unknown
 Source)
        at 
org.apache.polaris.service.auth.internal.InternalAuthenticationMechanism.authenticate(InternalAuthenticationMechanism.java:77)
        at 
org.apache.polaris.service.auth.internal.InternalAuthenticationMechanism_ClientProxy.authenticate(Unknown
 Source)
        at 
io.quarkus.vertx.http.runtime.security.HttpAuthenticator.createSecurityIdentity(HttpAuthenticator.java:197)
        at 
io.quarkus.vertx.http.runtime.security.HttpAuthenticator.attemptAuthentication(HttpAuthenticator.java:131)
        at 
io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$AuthenticationHandler.lambda$handle$0(HttpSecurityRecorder.java:440)
        at 
io.smallrye.context.impl.wrappers.SlowContextualFunction.apply(SlowContextualFunction.java:21)
        at 
io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.performInnerSubscription(UniOnItemTransformToUni.java:68)
        ... (additional Mutiny/Vert.x stack frames)
   ```
   Summary
   The stack trace confirms that the ContextNotActiveException occurs in the 
authentication phase, specifically when trying to access 
ServiceProducers.realmAuthConfig() during the 
InternalAuthenticationMechanism.authenticate() call.
   
   Key findings:
   
   The error happens at 
InternalAuthenticationMechanism.authenticate(InternalAuthenticationMechanism.java:77)
   It's trying to access a @RequestScoped bean 
(ServiceProducers.realmAuthConfig) but the request context is not active
   This occurs during HTTP authorization, before the management API endpoint 
code is even reached
   This seems to confirm the hypothesis that the issue is a missing 
@ActivateRequestContext annotation on the authentication mechanism or the 
producer method.
   
   I look forward to your expert feedback - thanks again!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to