Replies: 1 comment 2 replies
-
I don't quite follow. Access control with security rules is a feature only available when using the client SDKS (web, Android and iOS). While the Admin SDK supports administrating/managing the security rules, the Firestore API calls made by the Admin SDK are not regulated by the rules. Is your feature request to change that? Also note that the Admin SDK is very different from the client SDKs (especially in terms of features like auth), so it's not a good substitute for testing how rules impact clients. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that the Admin SDK has a section on
SecurityRules
.Would it be possible, at some point, to have the functionality in the Admin SDK to evaluate rules? I'd use this for testing my Firestore security rules.
Motivation:
The admin SDK is already used in Firebase backend testing. However, I am not aware of a way how I can apply security rules while using it. Therefore, testing whether certain access is allowed or not needs to be done using the client SDK or REST API.
If this were the case, @firebase/rules-unit-testing could then be implemented with the Admin SDK only. It currently has the
firebase
8.5.0 client SDK as its dependency, which conflicts with using 9.x beta in one's project. (being the reason why I cannot use it, and am implementing the rules testing using REST API, instead)Beta Was this translation helpful? Give feedback.
All reactions