Skip to main content

My DSN key is publicly visible, is this a security vulnerability?

Issue

I want to know if a visible Data Source Name (DSN) on my website is a security vulnerability, and whether I can hide the DSN from users completely.

Applies To

  • All Sentry users

Resolution

In short: this is not considered a security vulnerability.

The DSN only tells the SDK where to send events for your project. It does not grant read, write, or delete access to your Sentry account or stored data. Someone who has the DSN can send events to that project. They cannot view or change your data.

In a browser SDK, you cannot fully hide the DSN, the client needs it to send events. On servers, keep it in environment config instead of shipping it to end users when you can.

If you see abuse (spam events), rotate or revoke the key under Project Settings > Client Keys (DSN), tighten Allowed Domains, or set a project rate limit. See the DSN explainer for more information.

Did this answer your question?