Announcement Announcement Module
Collapse
No announcement yet.
Mapping LDAP Roles to Application Roles Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mapping LDAP Roles to Application Roles

    Hi,

    I'm using Spring Security 3.0.5 with LDAP authentication (Active Directory). Everything works fine.

    However I feel it's a bad practice to directly map the roles defined in my application to roles defined in LDAP: what if the name of one of the roles I use in my application changes in LDAP? Then I have to fix, recompile and redeploy my application? Not very optimal. I should be able to change this without even restarting the application.

    Therefore, I'd like to use a property file that would define the mapping between LDAP roles and application roles. Is there something included in Spring Security to do just that?

    I have seen the class org.springframework.security.core.authority.mappin g.MapBasedAttributes2GrantedAuthoritiesMapper that I could maybe use as starting point, but I can't find much info about it and, in particular, how to use it in a Spring context. Where can I find information about it?

    Thanks.
    Last edited by landrain; Jun 28th, 2011, 08:58 AM.
Working...
X