You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ENP <pr...@stc.donpac.ru> on 2006/06/09 10:10:11 UTC

Sender Name/ID

Hi,

I use jaasAuthenticationPlugin and authorizationPlugin. Can receiver read
message sender username?

Sender can add custom header to message with his name but it can add wrong
name. Can receiver properly identify sender?
--
View this message in context: http://www.nabble.com/Sender-Name-ID-t1760458.html#a4789096
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Sender Name/ID

Posted by James Strachan <ja...@gmail.com>.
On 9/25/06, Kelly Campbell <ke...@gmail.com> wrote:
> see https://issues.apache.org/activemq/browse/AMQ-940

Patch applied now Kelly, thanks.

James

>
> On 9/25/06, James Strachan <ja...@gmail.com> wrote:
> > On 9/23/06, Kelly Campbell <ke...@gmail.com> wrote:
> > > Hi James, this JMSXUserID feature is great, however I had a few
> > > problems using it so I have a couple of questions and possible
> > > enhancements for the documentation.
> > >
> > > I first tried to use
> > > javax.jms.Message.getStringProperty("JMSXUserID"), but that always
> > > returned null, so I found out that I had to cast the message and use
> > > ActiveMQMessage.getUserId().
> >
> > Hmm, thats strange - we've a test case called
> > JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest which uses the
> > following code which works fine...
> >
> > String userID = message.getStringProperty("JMSXUserID");
> >
> > I wonder can you create a test case taht fails to return the JMSXUserID?
> >
> >
> > > Is that the intended usage or should you be able to get it via a
> > > property? If not, can we add something to the JMSXUserID web page that
> > > documents this with an example?
> >
> > No it should work
> >
> >
> > > Also, I'll have a patch soon that fixes what looked like a problem
> > > with the userid never getting set in the broker. It's part of a larger
> > > patch which enhances the SSL security Sepand contributed last week.
> >
> > Great. Note that currently the JMSXUserID header is only set i you
> > enable it on the BrokerService
> > via the populateJMSXUserID flag.
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Sender Name/ID

Posted by Kelly Campbell <ke...@gmail.com>.
see https://issues.apache.org/activemq/browse/AMQ-940

On 9/25/06, James Strachan <ja...@gmail.com> wrote:
> On 9/23/06, Kelly Campbell <ke...@gmail.com> wrote:
> > Hi James, this JMSXUserID feature is great, however I had a few
> > problems using it so I have a couple of questions and possible
> > enhancements for the documentation.
> >
> > I first tried to use
> > javax.jms.Message.getStringProperty("JMSXUserID"), but that always
> > returned null, so I found out that I had to cast the message and use
> > ActiveMQMessage.getUserId().
>
> Hmm, thats strange - we've a test case called
> JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest which uses the
> following code which works fine...
>
> String userID = message.getStringProperty("JMSXUserID");
>
> I wonder can you create a test case taht fails to return the JMSXUserID?
>
>
> > Is that the intended usage or should you be able to get it via a
> > property? If not, can we add something to the JMSXUserID web page that
> > documents this with an example?
>
> No it should work
>
>
> > Also, I'll have a patch soon that fixes what looked like a problem
> > with the userid never getting set in the broker. It's part of a larger
> > patch which enhances the SSL security Sepand contributed last week.
>
> Great. Note that currently the JMSXUserID header is only set i you
> enable it on the BrokerService
> via the populateJMSXUserID flag.
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>

Re: Sender Name/ID

Posted by James Strachan <ja...@gmail.com>.
On 9/23/06, Kelly Campbell <ke...@gmail.com> wrote:
> Hi James, this JMSXUserID feature is great, however I had a few
> problems using it so I have a couple of questions and possible
> enhancements for the documentation.
>
> I first tried to use
> javax.jms.Message.getStringProperty("JMSXUserID"), but that always
> returned null, so I found out that I had to cast the message and use
> ActiveMQMessage.getUserId().

Hmm, thats strange - we've a test case called
JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest which uses the
following code which works fine...

String userID = message.getStringProperty("JMSXUserID");

I wonder can you create a test case taht fails to return the JMSXUserID?


> Is that the intended usage or should you be able to get it via a
> property? If not, can we add something to the JMSXUserID web page that
> documents this with an example?

No it should work


> Also, I'll have a patch soon that fixes what looked like a problem
> with the userid never getting set in the broker. It's part of a larger
> patch which enhances the SSL security Sepand contributed last week.

Great. Note that currently the JMSXUserID header is only set i you
enable it on the BrokerService
via the populateJMSXUserID flag.

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Sender Name/ID

Posted by Kelly Campbell <ke...@gmail.com>.
Hi James, this JMSXUserID feature is great, however I had a few
problems using it so I have a couple of questions and possible
enhancements for the documentation.

I first tried to use
javax.jms.Message.getStringProperty("JMSXUserID"), but that always
returned null, so I found out that I had to cast the message and use
ActiveMQMessage.getUserId().

Is that the intended usage or should you be able to get it via a
property? If not, can we add something to the JMSXUserID web page that
documents this with an example?

Also, I'll have a patch soon that fixes what looked like a problem
with the userid never getting set in the broker. It's part of a larger
patch which enhances the SSL security Sepand contributed last week.

Thanks,
Kelly



On 6/9/06, James Strachan <ja...@gmail.com> wrote:
> If you enable the populateJMSXUserID flag on the broker then you will
> get the authenticated username of the sender set on each message on
> the JMSXUserID header on the JMS message.
>
> For more detail see
> http://activemq.org/site/jmsxuserid.html
>
> On 6/9/06, ENP <pr...@stc.donpac.ru> wrote:
> >
> > Hi,
> >
> > I use jaasAuthenticationPlugin and authorizationPlugin. Can receiver read
> > message sender username?
> >
> > Sender can add custom header to message with his name but it can add wrong
> > name. Can receiver properly identify sender?
> > --
> > View this message in context: http://www.nabble.com/Sender-Name-ID-t1760458.html#a4789096
> > Sent from the ActiveMQ - User forum at Nabble.com.
> >
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>

Re: Sender Name/ID

Posted by James Strachan <ja...@gmail.com>.
If you enable the populateJMSXUserID flag on the broker then you will
get the authenticated username of the sender set on each message on
the JMSXUserID header on the JMS message.

For more detail see
http://activemq.org/site/jmsxuserid.html

On 6/9/06, ENP <pr...@stc.donpac.ru> wrote:
>
> Hi,
>
> I use jaasAuthenticationPlugin and authorizationPlugin. Can receiver read
> message sender username?
>
> Sender can add custom header to message with his name but it can add wrong
> name. Can receiver properly identify sender?
> --
> View this message in context: http://www.nabble.com/Sender-Name-ID-t1760458.html#a4789096
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/