Skip to content

Commit df78be9

Browse files
authored
Adding Grafana authentication information (#863)
Specifying the details needed for customers to secure their Grafana container. <!-- Explain the changes introduced in your PR --> ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.
1 parent 894245e commit df78be9

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

docs/admin/observability/metrics.mdx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,36 @@ sshuttle -r user@host 0/0
8282

8383
Grafana will be available at http://host:3370/-/debug/grafana.
8484

85-
> WARNING: Our Grafana instance runs in anonymous mode with all authentication turned off, since we rely on Sourcegraph's built-in authentication.
86-
> Please be careful when exposing it directly to external traffic.
85+
### Grafana Security
86+
87+
<Callout type="warning">
88+
WARNING: By default, our Grafana container runs in anonymous mode with authentication disabled, relying on Sourcegraph's authentication and authorization when accessed through your Sourcegraph instance.
89+
90+
We recommend you use your network security controls to prevent access to Grafana's listening ports, or enable Grafana's builtin authentication.
91+
</Callout>
92+
93+
To enable Grafana's builtin authentication, configure the `GF_AUTH_ANONYMOUS_ENABLED` environment variable to `false` in the Grafana container's environment variables in your deployment override file.
94+
95+
We also recommend that you customize the default admin username and password by configuring the `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD` environment variables, using your secrets management tool in your deployment pipeline.
96+
97+
```yaml
98+
# Helm override
99+
grafana:
100+
env:
101+
GF_AUTH_ANONYMOUS_ENABLED:
102+
value: "false"
103+
GF_SECURITY_ADMIN_USER:
104+
value: "custom-admin-username"
105+
GF_SECURITY_ADMIN_PASSWORD:
106+
value: "custom-admin-password"
107+
108+
# Docker Compose override
109+
grafana:
110+
environment:
111+
- 'GF_SECURITY_ADMIN_USER=custom-admin-username'
112+
- 'GF_SECURITY_ADMIN_PASSWORD=custom-admin-password'
113+
- 'GF_AUTH_ANONYMOUS_ENABLED=false'
114+
```
87115
88116
## Prometheus
89117

0 commit comments

Comments
 (0)