Multi tenancy for spring security -


how can apply spring security multitenant web application? web application has supported multi-tenants i.e http://:/springapp/appollo---uses ldap authentication http://:/springapp/fortis----uses local database authentication http://:/springapp/manipal---uses oath authentication

how can apply spring security supports tenants

it might trivial, though not simple case...

basically, need create (spring) filter in webapp, catch requests, , subdomain of referrer decide authentication method use (it can achieved simple table in db, map subdomain enum, e.g. 'oauth', 'saml', 'local', etc. filter should placed before other authentication filter, , said , technically decide auth method use.

i had tackle kind of scenario, , best solution - far think - support 1 authentication method, , creating "bridge" other authentication methods, needed. example, main authentication method oauth2.0. then, in cases need other types of authentication, create "adapters", or "bridges", other mechanisms. if need support localdb cusomerb, , ad customerc, adapt oauth localdb or ad. in case, had support saml, i've created bridge oauth saml, because not trivial same spring-app support both oauth , saml. (supporting ad , localdb oauth easier, think.)

how happens? wrap local db oauth-provider, app connect it. , same ad-connector. have parse url user enters, , "tenant". go db, map tenant needed authentication mechanism, , know "bridge" use.

hth.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -