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

Data source: Disabling "TLS Client Authentication" for Loki does NOT clear "ServerName" #87640

Open
remram44 opened this issue May 10, 2024 · 1 comment

Comments

@remram44
Copy link

What happened?

My data source stopped working when I changed URL, because it was expecting a different Server Name. I initially filed #83844 but I know now the actual source.

When I unchecked "TLS Client Authentication" in the data source settings, it correctly cleared the client certificate and key from the configuration. But the ServerName stayed in the configuration, even though it is no longer visible anywhere in the Grafana settings page.

Because of that, when I later change my data source to a new URL, it wouldn't work because of that ServerName left over from long ago.

Screenshot_20240510_101517
Screenshot_20240510_101526

The only way to fix it is to enable "TLS Client Authentication" again (even though you don't need it), clear out the ServerName field that just appeared, and disable "TLS Client Authentication". That way the ServerName actually goes away.

What did you expect to happen?

If I disable an feature, making its configuration fields go away, those configuration fields don't remain set.

Did this work before?

Don't know

How do we reproduce it?

  1. Enable "TLS Client Authentication"
  2. Put in a ServerName, Client Certificate, and Client Key
  3. Observe that client auth is being sent and server certificate validation uses the ServerName
  4. Disable "TLS Client Authentication"
  5. See that the ServerName field is completely gone from the data source config page
  6. Observe that client auth is no longer being sent but server certificate validation still uses the previous ServerName

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: 10.4.2
OS: Linux
Browser: Firefox

Grafana platform?

Docker

Datasource(s)?

Loki

@remram44
Copy link
Author

My recommendation would be to move the ServerName field outside of the "TLS Client Authentication" feature. It is unrelated anyway, and this way you only have to change the frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant