简体   繁体   中英

How do I override the Grails Spring Security plugin for my LDAP-only security system?

I have an existing Spring application with a Swing interface. It interfaces using Spring Security into an LDAP system, with no User table, no Role table, no security tables whatsoever. I want to use the Acegi plugin, however, it demands I have a USER table. How can I override the plugin to indicate I don't want this. In fact, I already coded a security service for my Swing app that builds an authentication manager. How do I bypass this USER table stuff, and instead inject my own security service?

Okay, it was too much work to override the security plugin. Instead, I just added plain ole Spring Security like it was a web app. That was the easiest. The only problem is, I had to use resources.xml to get the configuration in place, since resources.groovy somehow refreshed and didn't read things correctly. This leaves me with OUT the option to switch configuration based on environment.

There is now an LDAP plugin for Grails that builds on the core Spring Security plugin. I found it very easy to set up, so depending on your use case, it might help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM