-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing proj ID on Get
results in unauthorized
#3358
Comments
This is getting at a core design issue in the gateway middleware: any field that is needed to create the resource and action pair for the IsAuthorized call must be enforced as required at the proto validation level. In the first case:
In the second case:
Without any validation on a required field in the gateway proto, IsAuthorized does catch the error, but it provides a misleading message. The problem is there is no easy One solution would be to use the |
Some alternatives to fix this, I think, are
I think both of these are similarly low-effort. |
this work has been deprioritized. |
From another ticket:
Fetching a rule with a missing rule ID gets a nice validation error
But fetching a project with a missing ID gets this error that's a bit of a red herring:
The text was updated successfully, but these errors were encountered: