Hello 

I am trying to secure access to a queue based on the information froma a 
different DB that that JBoss comes with (Hypersonic)...

I have created a necessary context in login-config.xml as so:

  |     <application-policy name = "XXX-mq">
  |        <authentication>
  |           <login-module code = 
"org.jboss.security.auth.spi.DatabaseServerLoginModule"
  |              flag = "required">
  |              <module-option name = 
"unauthenticatedIdentity">guest</module-option>
  |              <module-option name = 
"dsJndiName">java:jdbc/XXXDS</module-option>
  |              <module-option name = "principalsQuery">SELECT PASSWD FROM 
JMS_USERS WHERE USERID=?</module-option>
  |              <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM 
JMS_ROLES WHERE USERID=?</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>


Then I deployed -service file which describes SecurityManager as so:
<?xml version="1.0" encoding="UTF-8"?>
  | 
  | 
  | <server>
  | 
  | 
  |   <mbean code="org.jboss.mq.security.SecurityManager" 
name="XXX.mq:service=SecurityManager">
  |     <attribute name="DefaultSecurityConfig">
  |       <security>
  |         <role name="guestrole" read="true" write="false" create="false"/>
  |       </security>
  |     </attribute>
  |     <attribute name="SecurityDomain">java:/jaas/XXX-mq</attribute>
  |     <depends 
optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
  |   </mbean>
  | 
  | 
  | </server>
  | 


And last I deploy -service.xml file with my queue:

<?xml version="1.0" encoding="UTF-8"?>
  | <server>
  |  
  |   <mbean code="org.jboss.mq.server.jmx.Queue" 
name="jboss.mq.destination:service=Queue,name=XXXqueue">
  |     <depends 
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
  |     <depends 
optional-attribute-name="SecurityManager">XXX.mq:service=SecurityManager</depends>
  |     <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
  |     <attribute name="SecurityConf">
  |       <security>       
  |         <role name="guestrole" read="true" write="false"/>
  |       <role name="bgqueue" read="true" write="true" create="false"/>
  |       </security>
  |     </attribute>
  |   </mbean>
  | 
  | </server>


No errors or warnings in the log (not even MQ subsystem)....But the above does 
not work...I am still able to send messages without authenticating....If I use 
jboss.mq.SecurityManager then protection works....Can someone tell me if I am 
doing somethign wrong?

Am I using the right approach to protect a queue based on users and roles from 
my own database?

Thanks

Z

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934101#3934101

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934101


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to