activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis <git...@farberg.de>
Subject Re: add_user_header configuration option not working?
Date Wed, 03 Dec 2014 11:10:04 GMT
For those interested in the solution to my problem:
https://github.com/pfisterer/apache-apollo-embedded-minimal/commit/e8565265b8635bc2f307af37c36815422cc2937d.
Basically, I used programmatic configuration and I previously added the
StompDTO instance to the "other" field instead of "protocols".

Best,
Dennis

On 29.11.14 13:47, Dennis wrote:
> Here is a minimal Maven-based example:
> https://github.com/pfisterer/apache-apollo-embedded-minimal
>
> Best regards,
> Dennis
>
> On 28.11.14 15:37, Dennis wrote:
>> Hi,
>> I've got a question regarding the add_user_header configuration option.
>>
>> I'm using Apache Apollo v 1.7 with STOMP over WebSockets and
>> authentication enabled. Now I want Apollo to add a header to incoming
>> messages with the sender's authenticated user id. I've added the
>> add_user_header configuration as discussed here:
>> https://activemq.apache.org/apollo/documentation/stomp-manual.html#Stomp_Protocol_Options.
>>
>>
>> However, the requested header is never added to incoming messages (but
>> I've verified that users are actually authenticated). Any suggestions
>> what I'm doing wrong here?
>>
>> Thank you!
>> Dennis
>>
>> This is my configuration file:
>>
>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>> <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
>>>
>>>     <virtual_host id="default">
>>>         <host_name>0.0.0.0</host_name>
>>>         <host_name>localhost</host_name>
>>>         <host_name>127.0.0.1</host_name>
>>>         <queue id="test-queue" auto_delete_after="0" persistent="false"/>
>>>     </virtual_host>
>>>
>>>     <connector bind="ws://0.0.0.0:8889" connection_limit="1000" id="ws">
>>>         <stomp>
>>>
>>>             <add_user_header separator=",">user-id</add_user_header>
>>>
>>>             <!-- I've tried several options here in addition:
>>>                 <add_user_header separator=",">user_id</add_user_header>
>>>                 <add_user_header
>>> kind="org.apache.activemq.jaas.UserPrincipal">user-id</add_user_header>
>>>             -->
>>>
>>>         </stomp>
>>>     </connector>
>>>
>>>     <access_rule allow="*"/>
>>>
>>>     <web_admin bind="http://0.0.0.0:3333"/>
>>>
>>>     <authentication enabled="true" domain="Internal"/>
>>>
>>> </broker>


Mime
View raw message