My DocumentDb app has pretty much a multitenant architecture. I was planning on using a partition key right at the outset to make sure that the whole thing doesn't have to get redesigned if it becomes popular. The current architecture calls for a single heterogeneous collection. A collection per tenant architecture isn't going to work.
All access would include the tenant id so as to prevent leakage. That's not what I'm concerned about.
I need client side read-only access so I was planning on having my server issue resource tokens based on permissions for each user.
But I noticed in the documentation that you can only have one permission per user per resource. I don't want to create permissions for each document. Basically I want a permission for each partition key. That way, the tenant id becomes the constraining factor on client side reads.
Basically, the client device has read only access to all the documents in the collection that share its partition key.
Should the resource token be compromised, it only lasts an hour and it wouldn't give anyone access to the entire collection, just that tenant's data.
Can I have a single DocumentDb database user with multiple read only permissions on the same collection if each permission has a different partition key?
TIA