This is an automated email from the ASF dual-hosted git repository.

monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 6701b1973 fix(authz-keycloak): return detailed error message (#10691)
6701b1973 is described below

commit 6701b1973266a966af3f1a7f387ba442fd3301c9
Author: cooper.wu <[email protected]>
AuthorDate: Mon Dec 25 17:07:14 2023 +0800

    fix(authz-keycloak): return detailed error message (#10691)
---
 apisix/plugins/authz-keycloak.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apisix/plugins/authz-keycloak.lua 
b/apisix/plugins/authz-keycloak.lua
index 99fe96cb0..731e1f86c 100644
--- a/apisix/plugins/authz-keycloak.lua
+++ b/apisix/plugins/authz-keycloak.lua
@@ -558,7 +558,7 @@ local function evaluate_permissions(conf, ctx, token)
         local sa_access_token, err = 
authz_keycloak_ensure_sa_access_token(conf)
         if err then
             log.error(err)
-            return 503
+            return 503, err
         end
 
         -- Resolve URI to resource(s).
@@ -569,7 +569,7 @@ local function evaluate_permissions(conf, ctx, token)
         if permission == nil then
             -- No result back from resource registration endpoint.
             log.error(err)
-            return 503
+            return 503, err
         end
     else
         -- Use statically configured permissions.

Reply via email to