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

Configuration for Basic Authentication ( prometheus/alertmanager) #1186

Closed
Dkarag opened this issue Jul 20, 2021 · 5 comments · Fixed by #1193
Closed

Configuration for Basic Authentication ( prometheus/alertmanager) #1186

Dkarag opened this issue Jul 20, 2021 · 5 comments · Fixed by #1193

Comments

@Dkarag
Copy link

Dkarag commented Jul 20, 2021

I have deployed kube-prometheus-stack using helm charts. The version I use is 15.1.3 .
Everything works as expected. Now I want to enable the Basic Auth feature.
According to the official documentation, this is supported and can be enabled using the following attribute

$ prometheus -web.config.file=web.yml

Can I use this feature with kube-prometheus-stack? I want to secure the endpoints (prometheus/alertmanager).

Has anyone achieved it with the approach of using web.config.file?

@thirdeyenick
Copy link
Contributor

I would like to enable basic auth as well. Looking at the corresponding section of the Prometheus Operator "Prometheus" CRD, it seems you can only specify the page title and TLS options, but not basic auth.

So I'd say basic auth would need to be handled via ingress features (like with nginx ingress). Would be cool if the helm chart would support this somehow (including the creation of the corresponding secret).

@prab2014
Copy link

is this done in prometheus/promethues chart too? i need to add basic auth using helm chart. not sure where to specify the value in the yaml.
#1255

@gkarthiks
Copy link
Member

is this done in prometheus/promethues chart too? i need to add basic auth using helm chart. not sure where to specify the value in the yaml.
#1255

take a look at this values.yaml file https://github.com/ninech/helm-charts/blob/645fe6000cd2baf0fb8d0a439b1d3636f6e2dd36/charts/kube-prometheus-stack/values.yaml#L1782

@prab2014
Copy link

is this done in prometheus/promethues chart too? i need to add basic auth using helm chart. not sure where to specify the value in the yaml.
#1255

take a look at this values.yaml file https://github.com/ninech/helm-charts/blob/645fe6000cd2baf0fb8d0a439b1d3636f6e2dd36/charts/kube-prometheus-stack/values.yaml#L1782

I am using prometheus chart not the kube one.. enabling basic auth is creating issue in pod liveness,

@brsolomon-deloitte
Copy link

So I'd say basic auth would need to be handled via ingress features (like with nginx ingress).

Disagree with the "need to be" part of this statement. It clearly doesn't need to be done that way since the prometheus chart from this repository allows you to configure basic_auth_users in Prometheus server web.config.yml:

#1255 (comment)

The difficulty from admin perspective is that prometheus and kube-prometheus-stack now differ starkly in how (and to what extent) they support basic auth in Prometheus.

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

Successfully merging a pull request may close this issue.

5 participants