[JBoss JIRA] (DROOLS-1613) NPE when evaluating a DMN decision table with multiple outputs and one of the outputs has wrong type
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1613?page=com.atlassian.jira.plugi... ]
Edson Tirelli commented on DROOLS-1613:
---------------------------------------
[~tari_manga] sorry, but Tibor had both tests for DROOLS-1612 and DROOLS-1613 in the same PR, so I fixed both. I hope you did not waste much time on this ticket.
> NPE when evaluating a DMN decision table with multiple outputs and one of the outputs has wrong type
> ----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1613
> URL: https://issues.jboss.org/browse/DROOLS-1613
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.Final
> Reporter: Tibor Zimányi
> Assignee: Edson Tirelli
> Fix For: 7.1.0.Final
>
>
> When I have a decision table with hit policy Priority and multiple outputs and I change one of the outputs in a rule to a wrong type, the evaluation ends with NullPointerException.
> E.g. having output entry like this:
> <outputEntry id="_7f03803d-2636-40ab-8346-7fd7f38ab695-3">
> <text>1</text>
> </outputEntry>
> I will provide PR with reproducer for this.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (WFLY-8961) Elytron in JMS: Unable to use authenticate with JBOSS-LOCAL-USER
by Josef Cacek (JIRA)
Josef Cacek created WFLY-8961:
---------------------------------
Summary: Elytron in JMS: Unable to use authenticate with JBOSS-LOCAL-USER
Key: WFLY-8961
URL: https://issues.jboss.org/browse/WFLY-8961
Project: WildFly
Issue Type: Bug
Components: JMS, Security
Reporter: Josef Cacek
Assignee: Jeff Mesnil
Priority: Critical
I'm not able to authenticate to JMS when using JBOSS-LOCAL-USER SASL mechanism. {{ConnectionFactory.createContext()}} call and the client call fails with:
{noformat}
javax.jms.JMSSecurityRuntimeException: AMQ119031: Unable to validate user
{noformat}
This issue is similar to JBEAP-10527, but for JBOSS-LOCAL-USER mechanism (compared to DIGEST-MD5 for instance) we don't have a username or password. This problem can be in other SASL mechanisms too (e.g. EXTERNAL - where we authenticate a user with client certificate).
Code used for testing:
{code:java}
AuthenticationContext.empty()
.with(MatchRule.ALL,
AuthenticationConfiguration.empty().useProvidersFromClassLoader(getClass().getClassLoader())
.setSaslMechanismSelector(SaslMechanismSelector.fromString("JBOSS-LOCAL-USER")))
.run(() -> {
try {
// ... initialize naming etc. here
ConnectionFactory connectionFactory = (ConnectionFactory) namingContext
.lookup("jms/RemoteConnectionFactory");
JMSContext context = connectionFactory.createContext();
} catch (NamingException e) {
// ...
}
});
{code}
Server log contains:
{noformat}
2017-06-08 15:00:07,076 TRACE [org.wildfly.security] (default I/O-4) Handling MechanismInformationCallback type='SASL' name='JBOSS-LOCAL-USER' host-name='localhost' protocol='remote'
2017-06-08 15:00:07,077 TRACE [org.wildfly.security] (default I/O-4) Handling MechanismInformationCallback type='SASL' name='JBOSS-LOCAL-USER' host-name='localhost' protocol='remote'
2017-06-08 15:00:07,077 TRACE [org.wildfly.security] (default I/O-4) Created SaslServer [org.wildfly.security.sasl.util.SecurityIdentitySaslServerFactory$1@55b75111] for mechanism [JBOSS-LOCAL-USER]
2017-06-08 15:00:07,083 TRACE [org.wildfly.security] (default task-2) Handling NameCallback: authenticationName = $local
2017-06-08 15:00:07,083 TRACE [org.wildfly.security] (default task-2) Principal assigning: [$local], pre-realm rewritten: [$local], realm name: [local], post-realm rewritten: [$local], realm rewritten: [$local]
2017-06-08 15:00:07,084 TRACE [org.wildfly.security] (default task-2) Role mapping: principal [$local] -> decoded roles [] -> realm mapped roles [] -> domain mapped roles [guest]
2017-06-08 15:00:07,084 TRACE [org.wildfly.security] (default task-2) Authorizing principal $local.
2017-06-08 15:00:07,084 TRACE [org.wildfly.security] (default task-2) Authorizing against the following attributes: [] => []
2017-06-08 15:00:07,084 TRACE [org.wildfly.security] (default task-2) Permission mapping: identity [$local] with roles [guest] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
2017-06-08 15:00:07,095 TRACE [org.wildfly.security] (default task-2) Authorization succeed
2017-06-08 15:00:07,095 TRACE [org.wildfly.security] (default task-2) RunAs authorization succeed - the same identity
2017-06-08 15:00:07,095 TRACE [org.wildfly.security] (default task-2) Handling AuthorizeCallback: authenticationID = $local authorizationID = $local authorized = true
2017-06-08 15:00:07,095 TRACE [org.wildfly.security] (default task-2) Handling AuthenticationCompleteCallback: succeed
2017-06-08 15:00:07,099 TRACE [org.wildfly.security] (default task-2) Handling SecurityIdentityCallback: identity = SecurityIdentity{principal=$local, securityDomain=org.wildfly.security.auth.server.SecurityDomain@24c5501a, authorizationIdentity=EMPTY, realmInfo=RealmInfo{name='local', securityRealm=org.wildfly.security.auth.realm.SimpleMapBackedSecurityRealm@426b003b}, creationTime=2017-06-08T13:00:07.083Z}
2017-06-08 15:00:07,142 INFO [org.wildfly.naming] (default task-4) WildFly Naming version 1.0.0.Beta16
2017-06-08 15:00:07,908 TRACE [org.wildfly.security] (default I/O-3) Permission mapping: identity [anonymous] with roles [guest] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = false
2017-06-08 15:00:07,920 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] (default I/O-3) Couldn't find any bindings for address=activemq.notifications on message=ServerMessage[messageID=25,durable=true,userID=null,priority=0, bodySize=512, timestamp=0,expiration=0, durable=true, address=activemq.notifications,properties=TypedProperties[_AMQ_NotifType=SECURITY_AUTHENTICATION_VIOLATION,_AMQ_NotifTimestamp=1496926807920]]@1825253250
2017-06-08 15:00:07,920 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] (default I/O-3) Message ServerMessage[messageID=25,durable=true,userID=null,priority=0, bodySize=512, timestamp=0,expiration=0, durable=true, address=activemq.notifications,properties=TypedProperties[_AMQ_NotifType=SECURITY_AUTHENTICATION_VIOLATION,_AMQ_NotifTimestamp=1496926807920]]@1825253250 is not going anywhere as it didn't have a binding on address:activemq.notifications
2017-06-08 15:00:07,924 ERROR [org.apache.activemq.artemis.core.server] (default I/O-3) AMQ224018: Failed to create session: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user]
at org.apache.activemq.artemis.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:144)
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createSession(ActiveMQServerImpl.java:1283)
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQPacketHandler.handleCreateSession(ActiveMQPacketHandler.java:156)
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQPacketHandler.handlePacket(ActiveMQPacketHandler.java:81)
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:623)
at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:379)
at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:362)
at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:621)
at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:69)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at org.xnio.netty.transport.AbstractXnioSocketChannel$ReadListener.handleEvent(AbstractXnioSocketChannel.java:443)
at org.xnio.netty.transport.AbstractXnioSocketChannel$ReadListener.handleEvent(AbstractXnioSocketChannel.java:379)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
{noformat}
[~dlofthouse], [~jmesnil], Is there another way to use these SASL mechanisms (without username and password) to create JMSContext? If not then we should change priority to blocker.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (DROOLS-1612) Throw compilation error when using collect hit policy with aggr. function and multiple outputs
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1612?page=com.atlassian.jira.plugi... ]
Edson Tirelli commented on DROOLS-1612:
---------------------------------------
[~tzimanyi] I double checked and we are really extending the spec. In the case of a decision table with multiple outputs, we apply the hit policy C+ (or any of the collects) to all columns.
> Throw compilation error when using collect hit policy with aggr. function and multiple outputs
> ----------------------------------------------------------------------------------------------
>
> Key: DROOLS-1612
> URL: https://issues.jboss.org/browse/DROOLS-1612
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.Final
> Reporter: Tibor Zimányi
> Assignee: Edson Tirelli
> Fix For: 7.1.0.Final
>
>
> According to the DMN spec., "Decision tables with compound outputs support only the following hit policies: Unique, Any, Priority, First, Output
> order, Rule order and Collect without operator, because the collect operator is undefined over multiple outputs."
> However when I use decision table with "COLLECT" hit policy, "sum" aggregate function and multiple outputs, the table compiles. When evaluating the table, I get nulls as output value results, but no error message in DMNResult.
> I will provide a reproducer in a PR.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months