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

Adding Grafana authentication information #863

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions docs/admin/observability/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,36 @@ sshuttle -r user@host 0/0

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

> WARNING: Our Grafana instance runs in anonymous mode with all authentication turned off, since we rely on Sourcegraph's built-in authentication.
> Please be careful when exposing it directly to external traffic.
### Grafana Security

<Callout type="warning">
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.

We recommend you use your network security controls to prevent access to Grafana's listening ports, or enable Grafana's builtin authentication.
</Callout>

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.

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.

```yaml
# Helm override
grafana:
env:
GF_AUTH_ANONYMOUS_ENABLED:
value: "false"
GF_SECURITY_ADMIN_USER:
value: "custom-admin-username"
GF_SECURITY_ADMIN_PASSWORD:
value: "custom-admin-password"

# Docker Compose override
grafana:
environment:
- 'GF_SECURITY_ADMIN_USER=custom-admin-username'
- 'GF_SECURITY_ADMIN_PASSWORD=custom-admin-password'
- 'GF_AUTH_ANONYMOUS_ENABLED=false'
```

## Prometheus

Expand Down
Loading