JSecurity and Grails Applcation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JSecurity and Grails Applcation

John Cladmore
Hi  all,

Please help using JSecurity plugin in Grails application.  How to
configure JSec to protect files in web-app directory?  Since I am using
the ZK-plugin, Grails controllers and views are not use at all, only
domain, services, the src directories.  Therefore, the way JSecurity
plugin works by securing controller's actions, can't work for the files
in web-app.  I am looking for the configuration file where I can
specific the url and filters to secure those files.  Without grails, I
would put the config in the web.xml file.

Thanks again.

.v
Reply | Threaded
Open this post in threaded view
|

Re: JSecurity and Grails Applcation

pledbrook
> Please help using JSecurity plugin in Grails application.  How to configure
> JSec to protect files in web-app directory?  Since I am using the ZK-plugin,
> Grails controllers and views are not use at all, only domain, services, the
> src directories.  Therefore, the way JSecurity plugin works by securing
> controller's actions, can't work for the files in web-app.  I am looking for
> the configuration file where I can specific the url and filters to secure
> those files.  Without grails, I would put the config in the web.xml file.

I'll start this off by saying I think he needs to configure the URLs
in the JSecurity filter. The plugin can't do this using it's normal
mechanism because it requires controllers.

You can do this by adding this setting to your
"grails-app/conf/Config.groovy" file:

  jsecurity.filter.config = """
  // Filter configuration goes here
  """

Hopefully someone else can help on what goes into the filter
configuration, but you could do worse than start with the javadoc:

  http://www.jsecurity.org/api/org/jsecurity/web/servlet/JSecurityFilter.html

Cheers,

Peter