hyperswitch-card-vault
hyperswitch-card-vault copied to clipboard
[FEATURE] Add support for Mutli-Tenancy
Feature Description
Internal Implementation Details
Following are the points that the locker application needs to facilitate:
- Multi-Tenancy
- Logical Tenant Isolation
Multi-Tenancy
Multi-tenancy can be achieved by constructing different app state based on the request context. This will prevent major changes in the application logic while enabling multi-tenancy. This can be achieved by adding a middleware that will construct the app state based on the request context and forward it to the request handler.
Logical Tenant Isolation
Logical tenant isolation can be achieved by implementing schema based multi-tenancy. This will allow the application to have a single database but different schemas for different tenants. This will prevent data leakage between tenants and will also allow the application to scale horizontally. This can also enable use (in future) to split the database based on the tenant schema.
This can also be done in the same middleware, where we can fetch the appropriate connection pool based on the tenant schema and forward it to the request handler.
Approach:
- [ ] Add V2
cards/fingerprint
api - [ ] #92
- [ ] Add V2
cards/add
api - [ ] Add V2
cards/retrieve
api - [ ] Add V2
cards/delete
api