No actor, policy enforcement.

When creating the policy for read that "relates_to_actor_via" the policy only seems to come into play if there is an actor. If no actor is passed then that policy seems to be ignored. Eg. the images below. If you pass the incorrect actor, it does not pass data. As expected. If you pass no actor, it gives you everything. As per the second image. Is this an error in my own logic or is this a bug?
No description
No description
6 Replies
ZachDaniel
ZachDaniel•3y ago
Its not an error in your logic, its default behavior that will likely be changed soon 🙂 In the security guide, we suggest adding to your api module authorize :by_default Which is equivalent of passing authorize?: true on all requests. By default, authorize?: false is the behavior unless either authorize?: true is passed or the actor key is provided.
ZachDaniel
ZachDaniel•3y ago
That top guide should have some info for you
lifeofdan
lifeofdanOP•3y ago
Okay, excellent. I'll give that a read and take those steps to secure the endpoint. Thank you, very much!
ZachDaniel
ZachDaniel•3y ago
No problem 🙂 In 3.0 this will be the default.
lifeofdan
lifeofdanOP•3y ago
Awesome! 😄

Did you find this page helpful?