Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use token, organization and project from the request #18

Open
Nowaker opened this issue May 13, 2021 · 4 comments
Open

Use token, organization and project from the request #18

Nowaker opened this issue May 13, 2021 · 4 comments
Labels
feature request New feature Improvement Something working but can be improved

Comments

@Nowaker
Copy link

Nowaker commented May 13, 2021

Describe the solution you'd like

  1. Pass organization and Sentry token via query parameters or headers, e.g. http://0.0.0.0:9790/metrics/?token=sentry-token&org=org-name&project=project-name-or-id
  2. Get the metrics using the given token in the given organization and the project, if passed

Describe alternatives you've considered

An alternative is to deploy multiple sentry-prometheus-exporters, each for a given org. Given sentry-prometheus-exporter is just a proxy to Sentry API and doesn't perform any caching, a single instance of sentry-prometheus-exporter would work fine for multiple orgs.

Moreover, by passing a token in each request to the exporter, we don't need to password-protect the exported data as you don't get any if you don't have a token.

@italux italux added feature request New feature Improvement Something working but can be improved labels Jul 5, 2021
@italux
Copy link
Owner

italux commented Mar 22, 2022

Hey, @Nowaker, thanks for contributing and sorry for my late reply. But, trafficking the API token as a text-plain doesn't look like a good idea for me, could you please elaborate more about your use case here? So we can think about the alternatives

@Nowaker
Copy link
Author

Nowaker commented Mar 22, 2022

I don't see a reason why it's not a good idea. Proxy is not a controversial or novel concept in general. Vault-UI and many other tools aren't questioned for taking this approach.

@italux
Copy link
Owner

italux commented Mar 23, 2022

My point here is the API token will be over HTTP traffic, even in an internal network there is a risk involved, the reason why I'd like to understand the use case you're trying to apply so I can realize how the implementation should go.

@Nowaker
Copy link
Author

Nowaker commented Mar 23, 2022

My point here is the API token will be over HTTP traffic, even in an internal network there is a risk involved

Basic HTTP Authentication credentials go over HTTP traffic too, and that's not a concern either, even though HTTP credentials are as confidential as a Sentry token.

It's a no-issue because this application isn't a fully-fledged web server, and it wouldn't be reasonable to expect that this application turns into one. Rather, it's an application that has one purpose, perfect as-is, and there's other infrastructural building blocks like Nginx or Kubernetes Ingress that users will use (or not) to realize their goals (incl. security goals).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature Improvement Something working but can be improved
Projects
None yet
Development

No branches or pull requests

2 participants