getsentry / relay

Sentry event forwarding and ingestion service.
https://docs.sentry.io/product/relay/
Other
321 stars 91 forks source link

Relay should not fail on invalid DSN in the header #3519

Open Dav1dde opened 6 months ago

Dav1dde commented 6 months ago

Customers may choose to use their own DSNs as described in the docs and send envelopes through their own infrastructure.

SDKs will embed the DSN into the envelope header.

If the customer's infrastructure wants to override the DSN via X-Sentry-Auth header Relay will still try to attempt to parse the valid DSN but with an invalid project key and project id in the envelope header and reject the envelope. If the envelope header did not include the DSN at all, Relay would accept the envelope.

Maybe Relay should treat structurally valid but with invalid project key (and id?) the same as if it was missing.

Example envelope header:

{"dsn":"foo@bar.relay/123"}

Workarounds:

jjbayer commented 6 months ago