Announcement Announcement Module
No announcement yet.
Switching between Tomcat authentication to LDAP dynamically Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Switching between Tomcat authentication to LDAP dynamically

    I'm just looking into using spring-security for securing web pages, and we already use tomcat security. The requirement so far, unless it proves to be too difficult, is to used tomcat security unless LDAP is configured. If so, and the configuration is valid, all requests would then be authenticated via LDAP.

    So this means a run time switch between using the default tomcat implementation to turning on spring-security with LDAP. Ideally I could always use spring-security, and switch implementations on the fly, given the set of parameters that are supplied from an administration page on our application.

    But, how do I go about this? Say that I set up a configuration. This is a static config that is bundled with my WAR and cannot be changed, so I'll have to do some form of dynamic override, where the configuration page saves my settings to an xml file that is read by my application at startup to override what is statically configured. Does that make sense?

    And once configuration changes have enabled or disabled either of these configurations, can I enable them while the application is running? Or do I have to restart the application?



  • #2
    You could leverage Spring Profiles to create your Spring Security configuration. You can customize how the profiles are selected to your liking, but there are ways that are built in too.


    • #3
      Thanks for the reply, Rob. I'll take a look at Spring Profiles then.