question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid Sentry DSN when using a public key

See original GitHub issue

Hi,

Perhaps i do’t correctly understand the notion of public DSN. When I try to use Sentry with public I got this exception:

    self._client = raven.Client(CrashReport.DSN, release=__version__)
  File "/site-packages/raven/base.py", line 139, in __init__
    self.set_dsn(dsn, **options)
  File "site-packages/raven/base.py", line 195, in set_dsn
    dsn_config = raven.load(dsn, transport_registry=self._registry)
  File "site-packages/raven/conf/__init__.py", line 54, in load
    scope_extras = transport_registry.compute_scope(url, scope)
  File "site-packages/raven/transport/registry.py", line 73, in compute_scope
    return transport.compute_scope(url, scope)
  File "python3.4/site-packages/raven/transport/base.py", line 57, in compute_scope
    raise ValueError('Invalid Sentry DSN: %r' % url.geturl())
ValueError: Invalid Sentry DSN: 'https://aaaaaaaaaaaaaaaaa@app.getsentry.com/38482'
  • Is it an issue?
  • Can we distribute a desktop application including sentry private key without security issue (i don’t understand what are the exact access level of an API key)?

Thanks for the help

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:2
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
cancan101commented, Mar 20, 2018

I would also like to see the ability to use the public DSN with raven. I am deploying Python code to clients and would prefer to not have the full DSN in an untrusted environment. This would be conceptually the same as how I don’t want the private DSN in the web bundle I send to users.

3reactions
jamesgorriecommented, Mar 21, 2017

Not wanting to reopen this - but have a question:

Could we not implement similar auth that we have in client JS to the server / app implementations?

Our use case is having an open source application and we are trying our best not to have secret config anywhere.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default DSN is incorrect - On-Premise - #sentry
When retrieving a projects DSN from the projects Client Keys data, the DSN which is provided contains an extra backslash.
Read more >
io.sentry.SentryClientFactory - Error creating valid DSN from ...
In Sentry, in the project settings page, you'll see: Client keys (DSN) : ... replacing the placeholder: https://public:private@host:port/1.
Read more >
Can't set Current Sentry DSN Format (#4904) · Issues - GitLab
When setting the sentry_dsn as copied from a currnt Sentry project, the gitlab runner prints an error with raven: dsn missing private key...
Read more >
Overview | Sentry Developer Documentation
SDKs should accept an empty DSN as valid configuration. ... ?sentry_version=7&sentry_key=<public api key>&sentry_secret=<secret api key>.
Read more >
Class Dsn | Sentry .NET
https://docs.sentry.io/quickstart/#configure-the-dsn ... The required public key to authenticate the SDK. ... The URI used to communicate with Sentry ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found