Discuss.FOLIO.org is no longer used. This is a static snapshot of the website as of February 14, 2023.

multi-tenant feature

Alex
19 Apr '19

We are investigating the multi-tenant feature in the Folio. Would you mind give us any suggestion ?

  1. Where does Folio implement multi-tenant feature? Architecture, OKAPI, data storage and others?
  2. Any advantages compared with other solution?
  3. Security in Folio’s multi-tenant
    Any help would be greatly appreciated! Thanks!
peter
26 Apr '19

Hi Alex – welcome to the FOLIO community. I’ll start with some answers and see where that leads.

Where does FOLIO implement multi-tenant features?

Multi-tenancy is a core part of the FOLIO architecture. Every HTTP request to Okapi must be accompanied by an X-Okapi-Tenant header that specifies which tenant the request is destined for (even if there is only one tenant on the system). An HTTP request without an X-Okapi-Tenant header results in an error. (I think there are some exceptions to this regarding module health checks, but for anything where library data is involved this holds true.)

Okapi modules are free to do what they want to with tenant data storage. (Said another way: the Okapi architecture itself doesn’t impose restrictions or mandates on the modules.) If the Okapi module developer is using the RAML Module Builder (RMB), then tenant data storage separation is done at the PostgreSQL schema level. (The same database connection to PostgreSQL is used across multiple tenants. This is a source of contention in the FOLIO Technical Council; some think the database connection should not be shared.)

Any advantages compared with other solution

I presume you mean Alma and WorldShare. I don’t know enough about how those systems implement multi-tenancy to make a comparison.

Security in FOLIO’s multi-tenant

Do you mean the security model within a tenant? The okapi/security.md document has the best technical overview ot the tenant security model.

Hopefully this helps!

Alex
27 Apr '19

Peter, Thank you so much for your explanation!