symbolicator icon indicating copy to clipboard operation
symbolicator copied to clipboard

Allow the secure fetching of sourcemaps

Open issacgerges opened this issue 10 months ago • 3 comments

I'd love the ability to secure the fetch of certain js sourcemaps via something like an auth token.

At the moment, the service seems to assume sourcemaps are publicly available via HTTP

allowed_origins: A list of "allowed origin patterns" that control what URLs we are allowed to scrape from. Allowed origins may be defined in several ways:http://domain.com/[:port]: Exact match for base URI (must include port).
*: Allow any domain.
*.[domain.com](http://domain.com/): Matches [domain.com](http://domain.com/) and all subdomains, on any port.
[domain.com](http://domain.com/): Matches [domain.com](http://domain.com/) on any port.
*:port: Wildcard on hostname, but explicit match on port.
headers: A map of headers to send with every HTTP request while scraping.

A custom header could be used to limit access but it's a bit clunky as

  • The caller is required to provide it
  • The headers will be sent on every http request, and easily leaked

I also noticed the Sentry source option, but these seem Sentry specific?

issacgerges avatar Mar 07 '25 22:03 issacgerges

Hi @issacgerges. Thanks for reaching out. So far we only support the header solution as you mentioned. We would have to discuss this further internally to look into different solutions, but I can't tell you the timeline for it right now.

Litarnus avatar Mar 11 '25 15:03 Litarnus

Thanks for the quick reply @Litarnus. Can you help me understand the purpose of the Sentry source on symboilcate-js? Assuming I've allowed sentry to retrieve my sourcemaps would that be something I could use?

issacgerges avatar Mar 11 '25 16:03 issacgerges

Hi,

the "default" way to use Symbolicator is not by itself, but in connection with Sentry. In particular, for JS symbolication, you ideally upload your sourcemaps to Sentry (e.g. with sentry-cli). The Sentry source that gets passed to Symbolicator then tells it where it can find the sourcemaps you have uploaded to Sentry.

loewenheim avatar Mar 12 '25 08:03 loewenheim