https://issues.apache.org/bugzilla/show_bug.cgi?id=53776
Priority: P2
Bug ID: 53776
Assignee: [email protected]
Summary: Multitenancy support for JDBCRealm
Severity: enhancement
Classification: Unclassified
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]