mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-28 05:34:02 +00:00
fix(servers): require authentication for debug endpoints (#10592)
* fix(servers): require authentication for debug endpoints
The /debug routes are added after the HTTP middleware stack, so they did
not go through the auth layer, and need_auth() only covered /v1/.
Apply the auth middleware to the /debug routes and treat the /debug
namespace as requiring authentication when a user provider is
configured.
* docs: pass credentials to debug endpoints in profiling guides
Let dump.sh read curl credentials from the config file in
GREPTIME_CURL_CONFIG, and document authentication for the /debug
endpoints in the profiling and log level guides.
---------
(cherry picked from commit a7693d52b6)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Co-authored-by: dennis zhuang <killme2008@gmail.com>