Description
I am trying to use an environment variables approach described here https://apisix.apache.org/docs/apisix/terminology/secret/#use-environment-variables-to-manage-secrets to configure authz-keycloak plugin.
For that, I use the following configuration (created via admin api):
{
"uris": [
"/manual/httpbin/*"
],
"name": "manual httpbin",
"methods": [
"GET"
],
"hosts": [
"api.msp.komus.local"
],
"upstream_id": "...",
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^\/manual\/httpbin\/(.*)",
"\/$1"
]
},
"authz-keycloak":{
"discovery": "$ENV://KEYCLOAK_DISCOVERY",
"client_id": "<KEYCLOAK_CLIENT_ID>",
"policy_enforcement_mode": "PERMISSIVE",
"ssl_verify": false
}
}
}
Environment variable KEYCLOAK_DISCOVERY is defined and is accessible for the gateway. However the environment variable is not resolved, the following error is in the logs.
[error] 50#50: *44516 [lua] authz-keycloak.lua:240: authz_keycloak_discover(): Accessing discovery URL ($ENV://KEYCLOAK_DISCOVERY) failed: bad uri: $ENV://KEYCLOAK_DISCOVERY
Can someone point me into the right direction?
Environment
- APISIX version (run
apisix version): 3.3.0
- Operating system (run
uname -a): Linux 6.1.32-0-virt
- OpenResty / Nginx version (run
openresty -V or nginx -V): openresty/1.21.4.1
Description
I am trying to use an environment variables approach described here https://apisix.apache.org/docs/apisix/terminology/secret/#use-environment-variables-to-manage-secrets to configure authz-keycloak plugin.
For that, I use the following configuration (created via admin api):
Environment variable KEYCLOAK_DISCOVERY is defined and is accessible for the gateway. However the environment variable is not resolved, the following error is in the logs.
Can someone point me into the right direction?
Environment
apisix version): 3.3.0uname -a): Linux 6.1.32-0-virtopenresty -Vornginx -V): openresty/1.21.4.1