tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53776] New: Multitenancy support for JDBCRealm
Date Fri, 24 Aug 2012 13:19:23 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53776

          Priority: P2
            Bug ID: 53776
          Assignee: dev@tomcat.apache.org
           Summary: Multitenancy support for JDBCRealm
          Severity: enhancement
    Classification: Unclassified
          Reporter: blama@gmx.net
          Hardware: PC
            Status: NEW
           Version: trunk
         Component: Catalina
           Product: Tomcat 7

Hi,

in order to support multi-tenancy applications, JDBCRealm should get more
options:
See this logintable definition

CREATE TABLE t_login 
    ( 
     id INTEGER NOT NULL,
     tenant_id INTEGER NOT NULL,
     loginname VARCHAR2 (50 CHAR) NOT NULL, 
     sha1hash VARCHAR2 (40 CHAR) NOT NULL, 
     lastlogin DATE, 
     CONSTRAINT PK_login PRIMARY KEY (id),
     CONSTRAINT UC_login_tenant_loginname UNIQUE (tenant_id, loginname)
    );

In order to make every loginname (e.g. "admin") available for every tenant, I
need to include the tenant_id within the UC.
For JDBCRealm login, which does a select with "WHERE loginname = j_username",
this means that it can get many rows as result. Obviously, this can't work out.

So in order have multitenancy support, the <Realm ... /> tag needs two new
parameters, one "tenantColumnName" (no default, only used when included in tag)
and one "tenantId", also with no default.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message