-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: unable to setup ssls with env reference #11141
Comments
From TEST18 in https://github.com/apache/apisix/blob/master/t/router/radixtree-sni2.t, it looks like it should be supported. |
@Sebastian-Pietrzak this is a limitation (or a bug) with APISIX, using env reference will work as expected if you use the declaration in lower case. i.e Would you like to fix this? |
Thanks for checking! Knowing there's workaround is helpful. I think it would make sense to fix it at some point for consistency with other places, so that nobody will have issues with this anymore. |
anyone interested in taking this up can refer this piece of code: This is exactly where the bug is. |
@shreemaan-abhishek This looks easier to fix. I want to try it out. Do you think we need to support matching both uppercase and lowercase at the same time? I would think it's necessary to consider the users who are already using it. So, the |
yep, LGTM |
Should we support I checked the secret manager code and $env is automatically applied if the read value tries to take a referent from the secret manager format. So we should use it. |
Current Behavior
I'm struggling with adding certificate with /ssls admin endpoint using env reference.
I'm always getting this, no matter what I put inside cert/key fields unless they are proper certs.
Accordingly to admin api documentation those fields support those env references, but it seems it's not the case. Note: I'm using such env reference in key-auth plugin and it works just fine, but here it seems like it doesn't expect any other pattern than cert, and message/logs are not helpful.
Expected Behavior
It's possible to setup ssls and provide cert location as env reference.
Error Logs
No response
Steps to Reproduce
Send following request to admin-api:
Environment
apisix version
): 3.7.0uname -a
): Linux 4091912aa453 6.6.16-linuxkit change: added doc of how to load plugin. #1 SMP Fri Feb 16 11:54:02 UTC 2024 x86_64 GNU/Linuxopenresty -V
ornginx -V
): n/acurl http://127.0.0.1:9090/v1/server_info
): 3.5.9luarocks --version
): n/aThe text was updated successfully, but these errors were encountered: