[JBoss JIRA] (DROOLS-1511) NullPointerException when running sample projects
by Tomas David (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1511?page=com.atlassian.jira.plugi... ]
Tomas David commented on DROOLS-1511:
-------------------------------------
Hi [~KrisVerlaenen], it is also fixed with the 7.0.1.Final release. Could you please provide me a link to the fix?
> NullPointerException when running sample projects
> -------------------------------------------------
>
> Key: DROOLS-1511
> URL: https://issues.jboss.org/browse/DROOLS-1511
> Project: Drools
> Issue Type: Bug
> Components: eclipse plugin
> Environment: DevStudio 10 + IS 10.3.0.CR2
> Eclipse Neon + Drools plugin 7.0.0.CR3
> Drools Runtime 7.x
> Reporter: Tomas David
> Assignee: Kris Verlaenen
> Priority: Blocker
> Labels: reported-by-qe
> Fix For: 7.1.0.Final
>
>
> NullPointerException is thrown when running sample project using Drools and Java Runtime classes because KieSession is not created.
> Eclipse log:
> !SESSION 2017-04-04 12:39:38.638 -----------------------------------------------
> eclipse.buildId=4.6.3.M20170301-0400
> java.version=1.8.0_121
> java.vendor=Oracle Corporation
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
> Framework arguments: -product org.eclipse.epp.package.jee.product
> Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
> !ENTRY org.drools.eclipse 4 120 2017-04-04 12:41:31.737
> !MESSAGE Internal error in Drools Plugin:
> !STACK 1
> Java Model Exception: Java Model Status [Build path contains duplicate entry: 'DROOLS/Drools' for project 'TestProject']
> at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:786)
> at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097)
> at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059)
> at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112)
> at org.drools.eclipse.util.DroolsRuntimeManager.addBuilder(DroolsRuntimeManager.java:122)
> at org.drools.eclipse.action.ConvertToDroolsProjectAction.run(ConvertToDroolsProjectAction.java:45)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
> at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4561)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4151)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
> !SUBENTRY 1 org.eclipse.jdt.core 4 977 2017-04-04 12:41:31.739
> !MESSAGE Build path contains duplicate entry: 'DROOLS/Drools' for project 'TestProject'
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (WFLY-9126) Deployment fails when application domain names referrencing one Elytron domain are different in Undertow and EJB subsystems
by Josef Cacek (JIRA)
Josef Cacek created WFLY-9126:
---------------------------------
Summary: Deployment fails when application domain names referrencing one Elytron domain are different in Undertow and EJB subsystems
Key: WFLY-9126
URL: https://issues.jboss.org/browse/WFLY-9126
Project: WildFly
Issue Type: Bug
Components: Web (Undertow), EJB, Security
Reporter: Josef Cacek
Assignee: Stuart Douglas
Priority: Critical
The WAR deployment fails when it contains EJBs and Servlets with security domains mapped under different names (application-security-domain). The underlying Elytron domain is the same for both subsystems.
EJB subsystem tries to search also for the domain name which is used in {{jboss-web.xml}} and this lookup fails.
Sample configuration:
{code:xml|title=jboss-ejb3.xml}
<jboss:ejb-jar>
<assembly-descriptor><s:security>
<ejb-name>*</ejb-name>
<s:security-domain>seccontext-whoami</s:security-domain>
</s:security></assembly-descriptor>
</jboss:ejb-jar>
{code}
{code:xml|title=jboss-web.xml}
<jboss-web>
<security-domain>seccontext-web</security-domain>
</jboss-web>
{code}
{code:title=application-security-domain-mapping.cli}
/subsystem=ejb3/application-security-domain=seccontext-whoami:add( \
security-domain=ApplicationDomain)
/subsystem=undertow/application-security-domain=seccontext-web:add( \
http-authentication-factory=application-http-authentication)
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (WFCORE-3100) Empty http-authentication-factory tries uselessly all mechanisms
by Chao Wang (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3100?page=com.atlassian.jira.plugi... ]
Chao Wang moved JBEAP-12326 to WFCORE-3100:
-------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-3100 (was: JBEAP-12326)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Security
(was: Security)
Affects Version/s: 3.0.0.Beta28
(was: 7.1.0.ER2)
> Empty http-authentication-factory tries uselessly all mechanisms
> ----------------------------------------------------------------
>
> Key: WFCORE-3100
> URL: https://issues.jboss.org/browse/WFCORE-3100
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 3.0.0.Beta28
> Reporter: Chao Wang
> Assignee: Chao Wang
>
> Configure server
> {code}
> # configure emtpty http-authentication-factory
> /subsystem=elytron/http-authentication-factory=my-management-http-authentication:add(security-domain=ManagementDomain, http-server-mechanism-factory=global)
> /core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory, value=my-management-http-authentication)
> # turn on TRACE logging
> /subsystem=logging/console-handler=CONSOLE:write-attribute(name=level, value=ALL)
> /subsystem=logging/logger=org.jboss.security:add(level=ALL)
> /subsystem=logging/logger=org.jboss.as.security:add(level=ALL)
> /subsystem=logging/logger=org.picketbox:add(level=ALL)
> /subsystem=logging/logger=org.apache.catalina.authenticator:add(level=ALL)
> /subsystem=logging/logger=org.jboss.as.web.security:add(level=ALL)
> /subsystem=logging/logger=org.jboss.as.domain.management.security:add(level=ALL)
> /subsystem=logging/logger=org.wildfly.security:add(level=ALL)
> /subsystem=logging/logger=org.wildfly.elytron:add(level=ALL)
> {code}
> access http://localhost.localdomain:9990/management?operation=attribute&name=ser...
> All mechanisms are tried with message "Unable to locate MechanismConfiguration for mechanism"
> {code}
> 09:21:05,673 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@56a6073e] for mechanism [CLIENT_CERT]
> 09:21:05,673 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@4f903500] for mechanism [SPNEGO]
> 09:21:05,673 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@739e6b09] for mechanism [BEARER_TOKEN]
> 09:21:05,673 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@4f50422a] for mechanism [DIGEST]
> 09:21:05,673 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@29292309] for mechanism [FORM]
> 09:21:05,674 TRACE [org.wildfly.security] (management task-7) Created HttpServerAuthenticationMechanism [org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1@675f3b19] for mechanism [BASIC]
> 09:21:05,674 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='CLIENT_CERT' host-name='localhost.localdomain' protocol='http'
> 09:21:05,674 TRACE [org.wildfly.security] (management task-7) CLIENT_CERT: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:111)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='CLIENT_CERT', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='CLIENT_CERT', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,675 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='SPNEGO' host-name='localhost.localdomain' protocol='http'
> 09:21:05,675 TRACE [org.wildfly.security] (management task-7) SPNEGO: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:111)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='SPNEGO', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='SPNEGO', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,676 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='BEARER_TOKEN' host-name='localhost.localdomain' protocol='http'
> 09:21:05,676 TRACE [org.wildfly.security] (management task-7) BEARER_TOKEN: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1....
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='BEARER_TOKEN', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='BEARER_TOKEN', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,676 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='DIGEST' host-name='localhost.localdomain' protocol='http'
> 09:21:05,676 TRACE [org.wildfly.security] (management task-7) DIGEST: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:111)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='DIGEST', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='DIGEST', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,677 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='FORM' host-name='localhost.localdomain' protocol='http'
> 09:21:05,677 TRACE [org.wildfly.security] (management task-7) FORM: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:111)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='FORM', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='FORM', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,677 TRACE [org.wildfly.security] (management task-7) Handling MechanismInformationCallback type='HTTP' name='BASIC' host-name='localhost.localdomain' protocol='http'
> 09:21:05,677 TRACE [org.wildfly.security] (management task-7) BASIC: org.wildfly.security.http.HttpAuthenticationException: ELY05172: Unable to locate MechanismConfiguration for mechanism.
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:111)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:77)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:115)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> Caused by: java.io.IOException: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='BASIC', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1061)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handle(ServerAuthenticationContext.java:839)
> at org.wildfly.security.http.util.SecurityIdentityServerMechanismFactory$SecurityIdentityCallbackHandler.handle(SecurityIdentityServerMechanismFactory.java:113)
> at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:87)
> ... 11 more
> Caused by: java.lang.IllegalStateException: ELY01119: Unable to resolve MechanismConfiguration for mechanismType='HTTP', mechanismName='BASIC', hostName='localhost.localdomain', protocol='http'.
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.selectMechanismConfiguration(ServerAuthenticationContext.java:1425)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$InactiveState.setMechanismInformation(ServerAuthenticationContext.java:1325)
> at org.wildfly.security.auth.server.ServerAuthenticationContext.setMechanismInformation(ServerAuthenticationContext.java:324)
> at org.wildfly.security.auth.server.ServerAuthenticationContext$1.handleOne(ServerAuthenticationContext.java:1058)
> ... 14 more
> 09:21:05,678 TRACE [org.wildfly.security.http] (management task-7) Authentication failed.: org.wildfly.security.http.HttpAuthenticationException: ELY06016: HTTP authentication failed validating request, no mechanisms remain to continue authentication.
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:162)
> at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$100(HttpAuthenticator.java:94)
> at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:78)
> at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:100)
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> 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:748)
> {code}
> Is it possible to handle this somehow:
> * Do not allow to create empty http-authentication-factory. Or is there any usage for empty http-authentication-factory?
> * Do not try any mechanism if no mechanism configuration is set
> * If no mechanism configuration is in place provide some default empty configuration
> Note, if only one mechanism is configured in http-authentication-factory only that one mechanism is tried during authentication. Problem here is only empty http-authentication-factory.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (SECURITY-864) NameNotFoundException due to policyRegistration -- service jboss.naming.context.java.policyRegistration
by Martin Letenay (JIRA)
[ https://issues.jboss.org/browse/SECURITY-864?page=com.atlassian.jira.plug... ]
Martin Letenay commented on SECURITY-864:
-----------------------------------------
We were using custom LoginModule already before we came across this problem, so the LoginModule workaround was simple solution for us.
(We never observed locked JNDI tree as Philippe Marschall did, I don't have an explanation for that.)
Our LoginModule workaround is pretty straightforward:
{code}
public class JbossAuthenticatorLoginModule extends AuthenticatorLoginModule {
private final static Logger LOGGER = Logger.getLogger(JbossAuthenticatorLoginModule.class.getName());
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
super.initialize(subject, callbackHandler, sharedState, options);
performSECURITY864Workaround();
}
private void performSECURITY864Workaround() {
// Workaround for JBoss/Wildfly issue SECURITY-864 [https://issues.jboss.org/browse/SECURITY-864]
//
// JBoss tries to perform JNDI lookup for PolicyRegistration during each EJB invocation authorization phase,
// however such policy is not registered in the JNDI tree, since the policy is used only in specific situations
// where an application is using additional XACML security policies.
// In most of the cases there's no XACML present/needed so the PolicyRegistration is not created and registered.
// However the Picketbox security framework tries to load it always and it results in exception during JNDI lookup.
// This process is harmless from execution point of view (the exception is catched and just logged at DEBUG level),
// however it has quite negative effect on performance of any EJB execution.
//
// A workaround is to manually register the default PolicyRegistration into JNDI (which is not used anywhere)
// to avoid the lookup/exception upon each EJB method invocation.
String policyRegistrationJndiName = "java:/policyRegistration";
try {
new InitialContext().lookup(policyRegistrationJndiName);
LOGGER.fine("PolicyRegistration instance already present at " + policyRegistrationJndiName + " , skipping workaround.");
return;
} catch (NamingException e) {
LOGGER.fine("PolicyRegistration instance not present at " + policyRegistrationJndiName + " , going to apply workaround.");
}
String policyRegistrationClassName = "org.jboss.security.plugins.JBossPolicyRegistration";
Class<?> policyRegistrationClass = null;
try {
policyRegistrationClass = Class.forName(policyRegistrationClassName);
} catch (ClassNotFoundException e) {
LOGGER.fine("Class not found " + policyRegistrationClassName);
try {
policyRegistrationClass = Thread.currentThread().getContextClassLoader().loadClass(policyRegistrationClassName);
} catch (ClassNotFoundException e2) {
LOGGER.fine("Class not found " + policyRegistrationClassName);
}
} catch (NoClassDefFoundError e) {
LOGGER.fine("Could not load authenticator (NCDF) " + policyRegistrationClass);
}
if (policyRegistrationClass != null) {
try {
Object policyRegistration = policyRegistrationClass.newInstance();
try {
new InitialContext().bind(policyRegistrationJndiName, policyRegistration);
} catch (NamingException e) {
LOGGER.info("Cannot register PolicyRegistration instance into " + policyRegistrationJndiName);
}
} catch (InstantiationException | IllegalAccessException e) {
LOGGER.info("Could not instantiate " + policyRegistrationClassName);
}
}
}
...
{code}
> NameNotFoundException due to policyRegistration -- service jboss.naming.context.java.policyRegistration
> -------------------------------------------------------------------------------------------------------
>
> Key: SECURITY-864
> URL: https://issues.jboss.org/browse/SECURITY-864
> Project: PicketBox
> Issue Type: Bug
> Components: PicketBox
> Reporter: Chao Wang
> Assignee: Stefan Guilhen
>
> "NameNotFoundException due to policyRegistration -- service jboss.naming.context.java.policyRegistration" is recorded in server.log during quickstart example run by changing log level:
> {noformat}
> <logger category="org.jboss.as.security">
> <level name="TRACE"/>
> </logger>
> <logger category="org.jboss.security">
> <level name="TRACE"/>
> </logger>
> {noformat}
> See detailed description in community discussion [#907134|https://developer.jboss.org/message/907134]
> I choose Jira component picketbox since the exception is titled as "PBOX000293: Exception caught: javax.naming.NameNotFoundException"
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months