magda-io / magda

A federated, open-source data catalog for all your big data and small data
https://magda.io
Apache License 2.0
508 stars 93 forks source link

decision endpoint should make decision based on anonymous user's data when the user doesn't exist #3477

Closed t83714 closed 1 year ago

t83714 commented 1 year ago

decision endpoint should make decision based on anonymous user's data when the user doesn't exist

Currently, when the decision endpoint is asked for making make a decision for a non-exist user, it will throw an error:

 withAuthDecision middleware error: Error: Failed to retrieve auth decision for operation `object/content/read` from policy engine: Not Found User                                                                                 │
│ Failed to retrieve auth decision for operation `object/content/read` from policy engine: Not Found User  

For this rare case, it would be more appropriate to make decision endpoint make the decision assuming it's an anonymous user.

t83714 commented 1 year ago

closed via PR: https://github.com/magda-io/magda/pull/3479