[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread gongping.zhu (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583379#comment-17583379
 ] 

gongping.zhu commented on ARTEMIS-3952:
---

bootstrap.xml

 




http://activemq.apache.org/schema;>










http://localhost:8161;>









> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread gongping.zhu (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583374#comment-17583374
 ] 

gongping.zhu commented on ARTEMIS-3952:
---




http://www.w3.org/2001/XMLSchema-instance;
xmlns:xi="http://www.w3.org/2001/XInclude;
xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">

http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="urn:activemq:core ">

brokernode


false


NIO

data/paging

data/bindings

data/journal

data/large-messages






true

2

10

4096

10M


13596000



1




















5000


90


true

12

6

HALT


13596000





-1













tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true;supportAdvisory=false;suppressInternalManagementObjects=false


tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true


tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true


tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true


tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true;directDeliver=false;anycastPrefix=$share/;
























DLQ
ExpiryQueue
0

-1
10
PAGE
true
true



DLQ
ExpiryQueue
0




-1

-1
10
PAGE
true
true
false
false





















































































































































> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread Justin Bertram (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583344#comment-17583344
 ] 

Justin Bertram commented on ARTEMIS-3952:
-

The multiple invocations of {{beforeCreateSession}} is expected because when an 
MQTT client connects 2 sessions are created internally - 1 for client-specific 
operations (e.g. consume, produce, etc.) and 1 for implementation-specific 
operations (e.g. handling QOS 1 & 2 operations).

Can you provide your {{broker.xml}}? My hunch is that you're disabling the 
authentication cache which causes multiple authentication attempts to fetch the 
subject for authorization operations.

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread gongping.zhu (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583327#comment-17583327
 ] 

gongping.zhu commented on ARTEMIS-3952:
---

beforeCreateSession call mult times

and when LWT message afterSend finished and authenticate will be recall;

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread Justin Bertram (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583320#comment-17583320
 ] 

Justin Bertram commented on ARTEMIS-3952:
-

Can you tell me how to reproduce the behavior that you're seeing?

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread gongping.zhu (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583312#comment-17583312
 ] 

gongping.zhu commented on ARTEMIS-3952:
---

i attach zhe code;

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread gongping.zhu (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583313#comment-17583313
 ] 

gongping.zhu commented on ARTEMIS-3952:
---

i attach zhe code;

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
> Attachments: ArtemisBrokerPlugin.java, JAASSecurityManagerWrapper.java
>
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-3952) when auth plugin called, beforeCreateSession method will be call twice time

2022-08-22 Thread Justin Bertram (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17583304#comment-17583304
 ] 

Justin Bertram commented on ARTEMIS-3952:
-

Can you provide any additional details? When I run 
{{org.apache.activemq.artemis.tests.integration.mqtt.MQTTSecurityManagerTest#testSecurityManagerModifyClientID}}
 I only see {{authenticate}} called once. Can you provide a test-case or 
perhaps just the stack-traces from when {{authenticate}} and 
{{beforeCreateSession}} are called multiple times?

> when auth plugin called, beforeCreateSession method will be call twice time
> ---
>
> Key: ARTEMIS-3952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3952
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: gongping.zhu
>Priority: Major
>
> 1, when auth plugin called,the beforeCreateSession method will be call twice 
> times
> 2,ActiveMQSecurityManager5 authenticate method will call more then one times



--
This message was sent by Atlassian Jira
(v8.20.10#820010)