ita-social-projects / Home

Home - is an all-in-one social service that will cover all aspects of your communication with your home and neighbors.
http://www.home-project-engineering.tech/api/0/apidocs/index.html
MIT License
26 stars 31 forks source link

Home Multitenancy implementation #287

Open Illia-Shchur opened 3 years ago

Illia-Shchur commented 3 years ago
  1. Add multitenancy to our application using Postgres Row Level Security (Postgres Policies).
  2. You need to add another user to our databases with rights to read and delete entities.
  3. You need to add discriminator value to all tables wich need to be tenantified (cooperation_id).
  4. Add dynamic datasource resolver for our jobs so that jobs could work around our policies.
Illia-Shchur commented 3 years ago

Dev notes:

  1. Info about multitenancy (https://callistaenterprise.se/blogg/teknik/2020/09/19/multi-tenancy-with-spring-boot-part1/).
  2. Link to working proof-of-concept https://github.com/Illia-Shchur/Postgres-RLS-Multitenancy;