Multi-Tenant Spring Security Integration

  • Tags : saas, springsecurity, multitenant
  • Latest : 0.2.1
  • Last Updated: 28 December 2010
  • Grails version : 1.3.5 > *
  • Authors : Lim Chee Kin, Steve Ronderos
0 vote
Dependency :
compile ":multi-tenant-spring-security:0.2.1"




grails install-plugin multi-tenant-spring-security


Integrates the multi-tenant-core plugin with the spring-security-core plugin, so that the current tenant can be determined from the authenticated principal.

Provides a custom CurrentTenant implementation that uses the security context to identify the current tenant. This allows all users to login from one url instead of having to remember a special url to log in to.

In Config.groovy, your tenant resolver property should look like this:

tenant {
    resolver.type = "springSecurity"

You will also need to add the following field to your Spring-Security User Domain Class

Integer userTenantId

This plugin's code is based on the code of multi-tenant-acegi plugin and hosted in github.