shuaijinchao commented on a change in pull request #6745:
URL: https://github.com/apache/apisix/pull/6745#discussion_r838057174
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -581,17 +582,17 @@ local function evaluate_permissions(conf, ctx, token)
-- Ensure service account access token.
local sa_access_token, err =
authz_keycloak_ensure_sa_access_token(conf)
if err then
- return 500, err
+ return 503
end
-- Resolve URI to resource(s).
permission, err = authz_keycloak_resolve_resource(conf,
ctx.var.request_uri,
sa_access_token)
-- Check result.
- if permission == nil then
+ if permission == nil or err then
-- No result back from resource registration endpoint.
- return 500, err
+ return 503
Review comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]