Skip to content
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

Stop emitting error and non-error response simultaneusly in envoy authz Check #894

Closed
krdln opened this issue Nov 4, 2022 · 0 comments · Fixed by #906
Closed

Stop emitting error and non-error response simultaneusly in envoy authz Check #894

krdln opened this issue Nov 4, 2022 · 0 comments · Fixed by #906
Assignees

Comments

@krdln
Copy link
Contributor

krdln commented Nov 4, 2022

Eg.

checkResponse := &flowcontrolv1.CheckResponse{
Error: flowcontrolv1.CheckResponse_ERROR_CONVERT_TO_MAP_STRUCT,
Services: svcs,
}
resp := createExtAuthzResponse(checkResponse)
return resp, fmt.Errorf("converting raw input into rego input failed: %v", err)

Grpc server ignores the response if the error is not nil, so this response is not used in any way. We want to track the exact error reason though, preferably through metrics / logs (see also #882).

Would also be nice if returned errors wouldn't be just strings, but something that works with https://pkg.go.dev/google.golang.org/grpc/status#FromError, so that grpc server can send a meaningful response code.

@krdln krdln self-assigned this Nov 4, 2022
@krdln krdln closed this as completed in #906 Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant