Skip to content

Conversation

@marcleblanc2
Copy link
Contributor

@marcleblanc2 marcleblanc2 commented May 9, 2025

REL-961 Review Docker Compose file for Grafana port exposure security

Is there any particular reason why we have the Grafana port 3370 open for side channel access? It seems like it's been open since Grafana was first bundled with the product in 51ca079, even though the reverse proxy was implemented at about the same time, in https://github.com/sourcegraph/sourcegraph/commit/939b612fb319f6563116f4bcd5814dc486f78361

I suggest we close the side channel access, to reduce exposure for customers running the Airgapped Analytics dashboard.

Also, fixed a broken port number in sourcegraph-frontend-internal's config for the Grafana URL, which has been broken since f6f8d8d, so probably not used.

Checklist

  • Sister deploy-sourcegraph change:
  • Sister customer-replica change (if necessary, for any changes affecting pure-docker or configuration):
  • All images have a valid tag and SHA256 sum

Test plan

Tested on test instance, frontend still proxies the connection to Grafana as needed, without side channel access

@marcleblanc2 marcleblanc2 marked this pull request as ready for review May 9, 2025 17:33
@marcleblanc2 marcleblanc2 requested a review from a team May 9, 2025 17:33
@marcleblanc2 marcleblanc2 enabled auto-merge (squash) May 9, 2025 17:46
@marcleblanc2 marcleblanc2 requested a review from DaedalusG May 9, 2025 17:46
@marcleblanc2 marcleblanc2 changed the title Close Grafana port from outside access [REL-961] Close Grafana port from outside access May 9, 2025
Copy link
Contributor

@DaedalusG DaedalusG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a review and this looks good to me, I haven't tried a deploy of these changes myself, but I trust your test. I actually think this is a better design in general 👍🏼

Might want to run it by security but I think having people have to auth through the frontend to look at the grafana makes more sense than leaving exposed as a side car on the host machine.

Final thought is just that hopefully we dont have any on prem people who have some odd configuration relying on this. Might be worth a note in the deployment type upgrade notes for docker-compose

@marcleblanc2 marcleblanc2 merged commit d08150f into main May 9, 2025
13 of 14 checks passed
@marcleblanc2 marcleblanc2 deleted the marc/close-grafana-from-outside-access branch May 9, 2025 19:25
MaedahBatool added a commit to sourcegraph/docs that referenced this pull request Jun 24, 2025
…ents (#1129)

<!-- Explain the changes introduced in your PR -->
Add note about closing Grafana port 3370 by default on Docker
deployments, as per
sourcegraph/deploy-sourcegraph-docker#1204

## 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.

Co-authored-by: Maedah Batool <[email protected]>
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 this pull request may close these issues.

3 participants