Giter Club home page Giter Club logo

prometheus-multi-tenant-proxy's People

Contributors

angelbarrera92 avatar derlin avatar ervitis avatar kiorky avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

prometheus-multi-tenant-proxy's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update module github.com/aws/aws-sdk-go to v1.51.24

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
build/package/Dockerfile
  • golang 1.20.5-bookworm
github-actions
.github/workflows/branch.yml
  • actions/setup-go v4
  • docker/setup-qemu-action v2
  • docker/setup-buildx-action v2
  • docker/login-action v2
  • docker/build-push-action v4
  • stefanprodan/helm-gh-pages v1.7.0
  • ubuntu 22.04
.github/workflows/release.yml
  • actions/setup-go v4
  • docker/setup-qemu-action v2
  • docker/setup-buildx-action v2
  • docker/login-action v2
  • docker/build-push-action v4
  • actions/create-release v1
  • actions/upload-release-asset v1
  • actions/upload-release-asset v1
  • stefanprodan/helm-gh-pages v1.7.0
  • ubuntu 22.04
gomod
go.mod
  • go 1.20
  • github.com/MicahParks/keyfunc/v2 v2.1.0
  • github.com/aws/aws-sdk-go v1.51.2
  • github.com/golang-jwt/jwt/v5 v5.2.0
  • github.com/prometheus-community/prom-label-proxy v0.8.0
  • github.com/prometheus/prometheus v0.48.1
  • github.com/urfave/cli/v2 v2.27.1
  • gopkg.in/yaml.v3 v3.0.1
helm-values
deployments/kubernetes/helm/prometheus-multi-tenant-proxy/values.yaml

  • Check this box to trigger a request for Renovate to run again on this repository

Create helm chart

This project doesn't provide a way to install it by helm, it worth trying to create a helm chart and host it on github pages.

Do not check auth on heatlh endpoint

Hello World!

I want to post this issue/feature-request to see if anyone out there can help us improve this proxy.

As you probably know, this is a reverse proxy that auto injects some query params to a set of URIs. It also checks basic auth in all the endpoints.

We need to avoid the auth checks in the following endpoints:

With this change, we can add to the Kubernetes deployment some basic health check based on the upstream server response.

Thanks!

Enable configuration using environment variables

@derlin introduced a new configuration parameter (for aws signing) on the latest release. It can be configured either by an environment variable or by flag in the cli.

It would be nice to have the other parameters to be configurable by environment variables.
It must have the same prefix @derlin used for the aws signing feature.

Thanks!

Support for additional filters

Currenty, the proxy only adds a filter for the namespace label, which is well suited to filter by k8s namespaces. This issue is about adding support for additional/customizable filters on top/instead of namespaces.

We would like to restrict access to metrics at (for example) the application level instead of the namespace.

In this case, the configuration could look like this:

  - username: Different labels
    password: NamespacesWithoutAppName
    labels:
      namespace: default
      app_name: poll-demo-app

Can't deploy on k8s

Hi,
I use this to deploy on k8s but I think some of args like --reload-interval=5 are removed. I removed this arg but my pod not getting ready. With v1.4.0 everything work as expected.
Please help me
Thank you

Endpoint whitelist

As hinted in reverse_test.go, prometheus exposes other endpoints than just the ones for querying: status, alerts, etc. With the current implementation, as long as you have a valid authentication, you should be able to query any of those without issues, which could leak very sensitive information.

I would propose to add a whitelist feature: the ability to restrict access to only specific API endpoints.
The whitelist could be set by default to /series, /query and /query_range, as they are the ones we inject labels to.

The whitelist should however be configurable, as we do with the unprotected endpoints.

What do you think?

Deny access if neither namespaces nor labels is provided?

Label support was added in #58 with a warning in the README:

(It could lead to a security issue if the proxy is not configured to use namespaces or labels)

I am wondering if it wouldn't be better to actually check either labels or namespaces exist during the authentication ? Except if having users without proxying is a feature we want to support?

If we go with that, I hesitate on where this check should arise. My two propositions:

  1. add it to the auth.go::AuthHandler function: if !authorized || (len(namespaces) == 0 && len(labels) == 0
  2. add it to each auth type. Using basic auth, we should check during loading that all users have at least a namespace or a label. For JWT, ensure the claim contains one of both.

Support for JWT-based authentication

Currently, the proxy only supports basic auth with a fixed configuration for namespaces; this issue's goal is to add support for JWT-based authentication, including fetching the namespace(s) (and/or other filters, see #51 ) from the token itself.

The use case is to offload the decision of what namespaces a request has access to to a different service and let thus the proxy be fully dynamic and not need any configuration about the content of the Prometheus cluster.

Ideally, support for a quick asymmetric signature algorithm (e.g. EdDSA with Ed25519 and SHA-512) that allows to avoid sharing the private key with the proxy would be provided.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.