How to use header-based authentication with dynamic users in Grafana without creating users automatically?

Hello community,

I’m setting up Grafana behind a reverse proxy (Nginx), and I want to use header-based authentication (X-WEBAUTH-USER) so that users authenticate externally and Nginx passes the username to Grafana.

My goals are:
• The user accessing Grafana should be detected dynamically (not a fixed user).
• Grafana should display the connected user in the interface.
• New users should not be created automatically in Grafana if they don’t exist (auto_sign_up = false).
• Only users that already exist in Grafana should be allowed to log in.