Hacker Newsnew | past | comments | ask | show | jobs | submit | rusticwizard's commentslogin

If you go the session variable route and are concerned about SQL injection, this paradigm won't likely work for you. However, you can replace the session variable with a role per tenant which avoids the scenario you are describing. The caveat there is that you will now have to manage a role per tenant which can be troublesome if you are trying to pack lots of tenants.

We're planning to introduce an immutable session variable later this year to make the session-based approach more viable. It won't stop someone from tampering with the tenant_id before it's initially set, but it will prevent any changes afterward. Though in practice, most of our customers aren’t too concerned. They have application-layer guardrails in place and are confident that users can’t tamper with session state directly.

But yes, there are trade offs either way.


Ah nice catch! This is an unfortunate copy paste error on the content on our part and we will fix it first thing tomorrow.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: