camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgiammarco <mgiamma...@gmail.com>
Subject [URGENT] map roles and permissions to use with camel-shiro and ldap
Date Sat, 19 May 2012 17:32:53 GMT
Hello,
I am using shiro with camel. I can authenticate an user with activedirectory
(ldap) but I am not able to map user groups in roles to user permissions.
And camel needs absolutely permissions to work.

Here is my config.ini:

[main]
authcStrategy = org.apache.shiro.authc.pam.FirstSuccessfulStrategy
securityManager.authenticator.authenticationStrategy = $authcStrategy


activeDirectoryRealm =
org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
activeDirectoryRealm.systemUsername=cn=padl,cn=Users,dc=comune,dc=prato,dc=local
activeDirectoryRealm.systemPassword=xxxxxxxxxxxxxxxxxxxxxxx
activeDirectoryRealm.url = ldap://172.16.1.98:389
activeDirectoryRealm.groupRolesMap =
"CN=menu_ufficiomobile_ania,OU=Menu,OU=Gruppi,OU=ComuneDiPrato,DC=comune,DC=prato,DC=local":"menu_ufficiomobile_ania"

securityManager.realms = $activeDirectoryRealm
[users]

test = test,menu_ufficiomobile_passicarrabili, menu_ufficiomobile_rubati,
menu_ufficiomobile_ordinanze, menu_ufficiomobile_ztl,
menu_ufficiomobile_cciaa,  menu_ufficiomobile_ania,
menu_ufficiomobile_anagrafe, menu_ufficiomobile_mctc, menu_ufficiomobile_pra


[roles]

menu_ufficiomobile_anagrafe = prato:anagrafe
menu_ufficiomobile_mctc = prato:mctc
menu_ufficiomobile_pra = prato:pra
menu_ufficiomobile_ania = prato:ania
menu_ufficiomobile_cciaa = prato:cacomm
menu_ufficiomobile_ztl = prato:ztl
menu_ufficiomobile_ordinanze = prato:ordinanze
menu_ufficiomobile_rubati = prato:rubati
menu_ufficiomobile_passicarrabili = prato:permessi




My security injection code:

ShiroSecurityToken shiroSecurityToken = 
   new ShiroSecurityToken(qr.getUserName(), qr.getPassword());
					
ShiroSecurityTokenInjector shiroSecurityTokenInjector = 
   new ShiroSecurityTokenInjector(shiroSecurityToken, passPhrase);
						
arg0.getIn().setHeader("SHIRO_SECURITY_TOKEN",
shiroSecurityTokenInjector.encrypt());


And the routing code that uses permissions:

from("seda:interrogaANIA").threads(1)
  .setHeader("db", constant(Database.ANIA)).policy(aniaS)
  .to("bean:interrogaANIA?method=interrogaBancaDati")
  .to("seda:prefilter");

....



Please help me, it is urgent!

Thanks,
Mario 

--
View this message in context: http://camel.465427.n5.nabble.com/URGENT-map-roles-and-permissions-to-use-with-camel-shiro-and-ldap-tp5712380.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message