envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.93k stars 4.8k forks source link

watched_directory not working for basic_auth users file #36462

Open milan-holub opened 2 weeks ago

milan-holub commented 2 weeks ago

Title: watched_directory not working for basic_auth users file

Description: Hello and thank you of this awesome piece of software! Recently I was trying to get basic auth working with simple users file in k8s environment. Basic setup with dynamic configuration is working for me fine. What I was hoping for was that envoy will auto-detect the file change using the DataSource’s watched_directory configuration directive - but I’m out of luck. I just wanted to double-check here whether this is expected behaviour (as per docs not every Datasource supports the watching directories) or there is something wrong on my site. If the watched_directory is not supported in this scenario what would you suggest as workarounds? Thank you!

Repro steps: Configure based on the snippets from the Config section and then

Current behaviour:

Expected behaviour:

Admin and Stats Output: N/A

Config:

Logs: no specific logs available when the users file gets replaced

Call Stack: N/A

alyssawilk commented 2 weeks ago

cc @zhaohuabing @wbpcode for triage

wbpcode commented 6 days ago

Thanks for the reporting.

As the comments of DataSource, only part of positions provide the watching support. This is not a bug. So if dynamic watching is necessary, you may need to create a feature request issue and ping the code owner of basic auth filter. :)