OWASP / ASVS

Application Security Verification Standard
Creative Commons Attribution Share Alike 4.0 International
2.75k stars 669 forks source link

4.2.3 - Multi-tenant access controls #2060

Closed EnigmaRosa closed 2 months ago

EnigmaRosa commented 2 months ago

Proposing a new requirement to explicitly address multi-tenant access controls.

# Description L1 L2 L3 CWE
4.2.3 [ADDED] Verify that multi-tenant applications use cross-tenant controls to ensure user operations will never affect tenants with which they do not have permissions to interact. 284
elarlang commented 2 months ago

I would like to have an example of a scenario.

As I understand, the proposed requirement here already contains recommendations from Josh so most likely it is close to PR.

jmanico commented 2 months ago

This is a super important requirement. Thumbs up.

jmanico commented 2 months ago

Example: I might have a URL like:

https://site.com/customer/1324

.. and I should only be able to look at customers for my company and not other companies in a mulit-tenant system. This is really all about detailed access control between tenants.

elarlang commented 2 months ago

Well, 4.1.3 says users should only be able to access functions, data files, URLs, controllers, services, and other resources, for which they possess specific authorization. This implies protection against spoofing and elevation of privilege.

and 4.2.1 says Verify that sensitive data and APIs are protected against Insecure Direct Object Reference (IDOR) attacks targeting creation, reading, updating and deletion of records, such as creating or updating someone else's record, viewing everyone's records, or deleting all records.

What is gives extra?

jmanico commented 2 months ago

You’re exactly right Elar. Multi-tenancy access control problems are mostly just IDOR and similar. This requirement is really just an extention of those since IDOR and similar is a much much bigger problem in multi-tenant apps. I can totally see why you don’t want this requirement. It’s a fair perspective.

But because of how dangerous access control problems are in multi-tenant apps I think it’s worth considering.

elarlang commented 2 months ago

It is not that "I don't like something", I can not see, what verification or test-action it gives extra. It is exactly the same test to make, you just need to analyze, who's data you got - is it "the same tenant" or "other tenant". The problem exists anyway.

If it is important to point out the multi-tenant aspect, it can be done in one of the mentioned existing requirements.

jmanico commented 2 months ago

Here is another approach to keeping this requirement. There are tons of cross-tenant controls to consider besides just access control. I really agree with your comments here @elarlang but I just want to make one more push to keep this.

tghosth commented 2 months ago

As I said, I believe that it is is important to specifically mention multi-tenancy separation as it might require additional or more stringent controls compared to regular BOLA protection. I think Jim's comment nicely illustrates the associated complexities :) We probably don't want to go into as much detail but I think it demonstrates the point.

jmanico commented 2 months ago

I tend to agree with this. There are controls that benefit multitenant systems more than just access control.

EnigmaRosa commented 2 months ago

Great examples, Jim

elarlang commented 2 months ago

For me it is like to have separate requirement for each version of path traversal from CWE listing (see CWE-22 .. CWE-40).

But there seems to be overwhelming agreement on this...

jmanico commented 2 months ago

Honestly, I think you’re making a good point Elar. I go back and forth on this and can see both perspectives.

tghosth commented 2 months ago

To me, this is one of the examples where it is worth bending the rules slightly in order to highlight a particularly important point.

@EnigmaRosa please can you open a PR :)