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

The client secret for oidc plugin cannot be configured as environment variable #11353

Open
supreethmohan opened this issue Jun 14, 2024 · 3 comments

Comments

@supreethmohan
Copy link

Current Behavior

I see that client secret for oidc plugin cannot be configured as a environment variable as per documentation. Only few plugins such as key-auth,jwt-auth,basic-auth,authz-keycloak,wolf-rbac support environment varaibles

Expected Behavior

should be able to configure client_secret as environment variable for oidc plugin as well

Error Logs

No response

Steps to Reproduce

  1. Configure oidc plugin with client secret as an enviroment variable.
  2. configure key-auth plugin with key as an environment variable

Environment

APISIX version (run apisix version): 3.8.0
Operating system (run uname -a):
OpenResty / Nginx version (run openresty -V or nginx -V):
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
APISIX Dashboard version, if relevant:
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run luarocks --version):

@VladislavDubrovenski
Copy link

Any workaround? I have a use case where I need to pull oidc secret in kubernetes to use in plugin in a route.

@VladislavDubrovenski
Copy link

VladislavDubrovenski commented Aug 12, 2024

Sharing for anyone facing a similar issue:

If you deploy in kubernetes, I found the following is a viable approach and works:

https://apisix.apache.org/docs/ingress-controller/concepts/apisix_route/#config-with-secretref-where-the-secret-data-contains-path-to-a-specific-key-that-needs-to-be-overridden-in-plugin-config

Setting extraEnv in helm chart for APISIX and trying to pull it as $ENV://SECRET does not work.
https://apisix.apache.org/docs/apisix/terminology/secret/

@juzhiyuan
Copy link
Member

There has one PR to implement this feature: #11451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants