You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "p." <pf...@vizible.com> on 2006/04/12 23:02:52 UTC

Re: Refreshing authorizationPlugin config

Your suggestion here to configure the ActiveMQ to use another security plugin
didi not work for me
I’ve added the bean to activemq.xml like this:

<broker useJmx="false" persistent="false">
    <plugins>
      <bean class="com.thirdparty.activemq.MyPlugin">
        <property name="endPoint" value="http://localhost:8080/sso/" >
      </bean>
    </plugins>
   …..

the jar for MyPlugin is in ActiveMQ lib folder, by starting that I get this
error:

Loading message broker from: xbean:activemq.xml

ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanDefinitionStoreException: Error
registering bean with name '' defined in class path resource [activemq.xml]:
Bean class [bean] not found; nested exception is
java.lang.ClassNotFoundException: bean

ERROR: java.lang.Exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Error
registering bean with name '' defined in class path resource [activemq.xml]:
Bean class [bean] not found; nested exception is
java.lang.ClassNotFoundException: bean

any suggestion?



 

--
View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3889989
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Refreshing authorizationPlugin config

Posted by Adrian Co <ac...@exist.com>.
Hi,

I think this has something to do with the xml namespace. The bean tag is 
a spring specific tag and is not recognized by xbean.

Well, basically you could try doing something similar to this:

<beans xmlns:amq="http://activemq.org/config/1.0">
<amq:broker useJmx="true">
  <amq:plugins>
      <bean class="org.apache.activemq.security.JaasAuthenticationPlugin">
        <property name="configuration" value="activemq-domain"/>
      </bean>

      <amq:jaasAuthenticationPlugin configuration="activemq-domain" />
  </amq:plugins>

  <amq:persistenceAdapter>
      <amq:memoryPersistenceAdapter/>
    </amq:persistenceAdapter>
 
    <amq:transportConnectors>
       <amq:transportConnector name="hub" uri="https://localhost:8445" />
       <amq:transportConnector name="default" 
uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
    </amq:transportConnectors>
   
  </amq:broker>
</beans>

Hope this helps.

Regards,
Adrian Co

p. wrote:

>Your suggestion here to configure the ActiveMQ to use another security plugin
>didi not work for me
>I’ve added the bean to activemq.xml like this:
>
><broker useJmx="false" persistent="false">
>    <plugins>
>      <bean class="com.thirdparty.activemq.MyPlugin">
>        <property name="endPoint" value="http://localhost:8080/sso/" >
>      </bean>
>    </plugins>
>   …..
>
>the jar for MyPlugin is in ActiveMQ lib folder, by starting that I get this
>error:
>
>Loading message broker from: xbean:activemq.xml
>
>ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
>org.springframework.beans.factory.BeanDefinitionStoreException: Error
>registering bean with name '' defined in class path resource [activemq.xml]:
>Bean class [bean] not found; nested exception is
>java.lang.ClassNotFoundException: bean
>
>ERROR: java.lang.Exception:
>org.springframework.beans.factory.BeanDefinitionStoreException: Error
>registering bean with name '' defined in class path resource [activemq.xml]:
>Bean class [bean] not found; nested exception is
>java.lang.ClassNotFoundException: bean
>
>any suggestion?
>
>
>
> 
>
>--
>View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3889989
>Sent from the ActiveMQ - User forum at Nabble.com.
>
>
>  
>


Re: Refreshing authorizationPlugin config

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Good idea.

Perhaps we should make it a byte[] so that it's even more generic.

On 4/18/06, James Strachan <ja...@gmail.com> wrote:
> I guess we could consider adding an extra securityToken String to the
> ConnectionInfo to allow folks to pass additional (non-JMS compliant)
> ways of performing authentication. Could you raise a JIRA for this?
>
> On 4/18/06, Hiram Chirino <hi...@hiramchirino.com> wrote:
> > Hi,
> >
> > It sounds to me like you could use the password field to hold both
> > kinds of credentials if you use some fancy encoding.
> >
> > On 4/17/06, p. <pf...@vizible.com> wrote:
> > >
> > > My client may pass the session_Id instead of the password, we need to pass a
> > > parameter and ask the broler just do the session validation instead of
> > > authentication.
> > >
> > > thanks,
> > > _parvin
> > > --
> > > View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3955968
> > > Sent from the ActiveMQ - User forum at Nabble.com.
> > >
> > >
> >
> >
> > --
> > Regards,
> > Hiram
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>


--
Regards,
Hiram

Re: Refreshing authorizationPlugin config

Posted by James Strachan <ja...@gmail.com>.
I guess we could consider adding an extra securityToken String to the
ConnectionInfo to allow folks to pass additional (non-JMS compliant)
ways of performing authentication. Could you raise a JIRA for this?

On 4/18/06, Hiram Chirino <hi...@hiramchirino.com> wrote:
> Hi,
>
> It sounds to me like you could use the password field to hold both
> kinds of credentials if you use some fancy encoding.
>
> On 4/17/06, p. <pf...@vizible.com> wrote:
> >
> > My client may pass the session_Id instead of the password, we need to pass a
> > parameter and ask the broler just do the session validation instead of
> > authentication.
> >
> > thanks,
> > _parvin
> > --
> > View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3955968
> > Sent from the ActiveMQ - User forum at Nabble.com.
> >
> >
>
>
> --
> Regards,
> Hiram
>


--

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

Re: Refreshing authorizationPlugin config

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi,

It sounds to me like you could use the password field to hold both
kinds of credentials if you use some fancy encoding.

On 4/17/06, p. <pf...@vizible.com> wrote:
>
> My client may pass the session_Id instead of the password, we need to pass a
> parameter and ask the broler just do the session validation instead of
> authentication.
>
> thanks,
> _parvin
> --
> View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3955968
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Refreshing authorizationPlugin config

Posted by "p." <pf...@vizible.com>.
My client may pass the session_Id instead of the password, we need to pass a
parameter and ask the broler just do the session validation instead of
authentication.

thanks,
_parvin
--
View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3955968
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Refreshing authorizationPlugin config

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi,

Right now, the extra parameters would not be passed on to the broker. 
Could you describe your use case and/or open a new JIRA requesting the
feature?

On 4/17/06, p. <pf...@vizible.com> wrote:
>
> I also need to pass a new parameter to "MyPlugin" and use that in my broker
> plugin. I extract the user/password from ConnectionInfo
>
> public void addConnection(ConnectionContext context, ConnectionInfo info)
> throws Exception {
>         String token =info.getPassword();
>         String user = info.getUserName();
>         //try to login...
>
> Can I add any other parameter to the url in myclient to be passed to the
> broker like: url=tcp://localhost:61616?p1=true
>
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(user, pwd, url);
>
> --
> View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3951273
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Refreshing authorizationPlugin config

Posted by "p." <pf...@vizible.com>.
I also need to pass a new parameter to "MyPlugin" and use that in my broker
plugin. I extract the user/password from ConnectionInfo

public void addConnection(ConnectionContext context, ConnectionInfo info)
throws Exception {
        String token =info.getPassword();
        String user = info.getUserName();
        //try to login...

Can I add any other parameter to the url in myclient to be passed to the
broker like: url=tcp://localhost:61616?p1=true

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(user, pwd, url); 

--
View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3951273
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Refreshing authorizationPlugin config

Posted by "p." <pf...@vizible.com>.
Great it worked :)
adding an empty namespace to the <bean> tag fixed the problem.

thanks,
_parvin
--
View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3900860
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Refreshing authorizationPlugin config

Posted by James Strachan <ja...@gmail.com>.
On 4/12/06, p. <pf...@vizible.com> wrote:
>
> Your suggestion here to configure the ActiveMQ to use another security plugin
> didi not work for me
> I've added the bean to activemq.xml like this:
>
> <broker useJmx="false" persistent="false">
>     <plugins>
>       <bean class="com.thirdparty.activemq.MyPlugin">
>         <property name="endPoint" value="http://localhost:8080/sso/" >
>       </bean>
>     </plugins>


I think this could be an XML namespace issue. The <broker> and
<plugin> tags are in the ActiveMQ namespace; to work the <bean> tag
must be in the spring namespace.

So if you change things a little to be

<bean class="com.thirdparty.activemq.MyPlugin" xmlns="">
....

It might fix it? i.e. to use the empty namespace for the <bean> tag
and its children.

James

>
>    …..
>
> the jar for MyPlugin is in ActiveMQ lib folder, by starting that I get this
> error:
>
> Loading message broker from: xbean:activemq.xml
>
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name '' defined in class path resource [activemq.xml]:
> Bean class [bean] not found; nested exception is
> java.lang.ClassNotFoundException: bean
>
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name '' defined in class path resource [activemq.xml]:
> Bean class [bean] not found; nested exception is
> java.lang.ClassNotFoundException: bean
>
> any suggestion?
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Refreshing-authorizationPlugin-config-t1368949.html#a3889989
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

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