[JBoss JIRA] (WFLY-10282) NPE in io.undertow.security.impl.BasicAuthenticationMechanism.authenticate when picketbox subsystem removed
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/WFLY-10282?page=com.atlassian.jira.plugin... ]
Darran Lofthouse moved WFCORE-3727 to WFLY-10282:
-------------------------------------------------
Project: WildFly (was: WildFly Core)
Key: WFLY-10282 (was: WFCORE-3727)
Component/s: Security
Web (Undertow)
(was: Security)
Fix Version/s: 13.0.0.Beta1
(was: 5.0.0.Alpha4)
> NPE in io.undertow.security.impl.BasicAuthenticationMechanism.authenticate when picketbox subsystem removed
> -----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-10282
> URL: https://issues.jboss.org/browse/WFLY-10282
> Project: WildFly
> Issue Type: Bug
> Components: Security, Web (Undertow)
> Reporter: Ilia Vassilev
> Assignee: Darran Lofthouse
> Fix For: 13.0.0.Beta1
>
>
> After enabling elytron, the security subsystem was removed. The war using jboss-web.xml security-domain looks like it is not used when the picketbox security subsystem is removed.
> {code}
> java.lang.NullPointerException
> at io.undertow.security.impl.BasicAuthenticationMechanism.authenticate(BasicAuthenticationMechanism.java:167)
> at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:245)
> at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:263)
> at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.access$100(SecurityContextImpl.java:231)
> at io.undertow.security.impl.SecurityContextImpl.attemptAuthentication(SecurityContextImpl.java:125)
> at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:99)
> at io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:92)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:55)
> at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:330)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The war has jboss-web.xml:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <jboss-web>
> <security-domain>other</security-domain>
> </jboss-web>
> {code}
> {code}
> <subsystem xmlns="urn:jboss:domain:undertow:4.0">
> ...
> <application-security-domains>
> <application-security-domain name="other" http-authentication-factory="application-http-authentication"/>
> </application-security-domains>
> </subsystem>
> <subsystem xmlns="urn:wildfly:elytron:1.2" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
> ...
> <http>
> <http-authentication-factory name="application-http-authentication" http-server-mechanism-factory="global" security-domain="ApplicationDomain">
> <mechanism-configuration>
> <mechanism mechanism-name="BASIC">
> <mechanism-realm realm-name="Application Realm"/>
> </mechanism>
> <mechanism mechanism-name="FORM"/>
> </mechanism-configuration>
> </http-authentication-factory>
> <provider-http-server-mechanism-factory name="global"/>
> </http>
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years
[JBoss JIRA] (WFLY-10281) NPE when initializing CDI bean during startup that injects PushContext
by Rich DiCroce (JIRA)
Rich DiCroce created WFLY-10281:
-----------------------------------
Summary: NPE when initializing CDI bean during startup that injects PushContext
Key: WFLY-10281
URL: https://issues.jboss.org/browse/WFLY-10281
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, JSF
Affects Versions: 12.0.0.Final
Reporter: Rich DiCroce
Assignee: Martin Kouba
If a CDI bean injects PushContext (for JSF websocket support, new in JSF 2.3) and is instantiated during startup, a NullPointerException occurs.
The offending method is part of Mojarra. Looking at the code, I'm guessing FacesContext is null since JSF has not initialized yet, and apparently the BeanManager has not been bound in JNDI yet either. It doesn't try CDI.current() at all, though I have no idea if that would help.
I'm currently working around this by injecting Instance<PushContext> instead.
{code}
2018-04-20 11:48:39,577 ERROR [com.sgi.song.gpnms.timer.ExecutorTimerService] (EE-ManagedExecutorService-default-Thread-2) Exception invoking timer com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean performRefresh: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
at com.sgi.song.gpnms.timer.ExecutorTimerService.lambda$0(ExecutorTimerService.java:72) [gp-ispn-shared-2.0.0-SNAPSHOT.jar:]
at com.sgi.song.gpnms.timer.ExecutorTimerService.lambda$2(ExecutorTimerService.java:199) [gp-ispn-shared-2.0.0-SNAPSHOT.jar:]
at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledRunnable.run(ControlPointUtils.java:105) [wildfly-ee-12.0.0.Final.jar:12.0.0.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_162]
at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141) [javax.enterprise.concurrent-1.0.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_162]
at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) [javax.enterprise.concurrent-1.0.jar:]
at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)
Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke void com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean.init() on com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean@7afeacb8
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:85) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:172) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean$Proxy$_$$_WeldClientProxy.performRefresh(Unknown Source) [classes:]
... 15 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
... 25 more
Caused by: java.lang.NullPointerException
at com.sun.faces.cdi.CdiUtils.isScopeActive(CdiUtils.java:378) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
at com.sun.faces.push.WebsocketPushContext.<init>(WebsocketPushContext.java:95) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
at com.sun.faces.cdi.WebsocketPushContextProducer.produce(WebsocketPushContextProducer.java:86) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:103) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:689) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:789) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
at com.sg.song.nms.network.command.CommandSender$Proxy$_$$_WeldClientProxy.registerSender(Unknown Source) [classes:]
at com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean.init(SmartBinOverviewBean.java:86) [classes:]
... 30 more
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years
[JBoss JIRA] (WFCORE-3762) OperationDefinition deprecationData is not used
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3762?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-3762:
------------------------------------------
WFCORE-3761 is related to WFCORE-3762 in that the validateOperation that 3761 wants to deprecate is one that *would* make use of the DeprecationData, but that method is unused and what it does goes considerably beyond the deprecation logging, so using it is not a good fix for WFCORE-3762.
> OperationDefinition deprecationData is not used
> -----------------------------------------------
>
> Key: WFCORE-3762
> URL: https://issues.jboss.org/browse/WFCORE-3762
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Brian Stansberry
>
> If you configure your OperationDefinition with DeprecationData nothing happens if the operation is invoked. There's no call path that results in anything being logged if the operation is invoked.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years
[JBoss JIRA] (WFCORE-3762) OperationDefinition deprecationData is not used
by Brian Stansberry (JIRA)
Brian Stansberry created WFCORE-3762:
----------------------------------------
Summary: OperationDefinition deprecationData is not used
Key: WFCORE-3762
URL: https://issues.jboss.org/browse/WFCORE-3762
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Reporter: Brian Stansberry
If you configure your OperationDefinition with DeprecationData nothing happens if the operation is invoked. There's no call path that results in anything being logged if the operation is invoked.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years