Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loafoe/lessor
Dynamic tenant access control for Grafana stores
https://github.com/loafoe/lessor
grafana-loki grafana-mimir grafana-tempo x-scope-orgid
Last synced: about 1 month ago
JSON representation
Dynamic tenant access control for Grafana stores
- Host: GitHub
- URL: https://github.com/loafoe/lessor
- Owner: loafoe
- License: apache-2.0
- Created: 2023-05-10T18:19:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-10T07:07:56.000Z (6 months ago)
- Last Synced: 2024-07-11T08:51:24.759Z (6 months ago)
- Topics: grafana-loki, grafana-mimir, grafana-tempo, x-scope-orgid
- Language: Go
- Homepage:
- Size: 474 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# lessor
Caddy based plugin to dynamically inject `X-Scope-OrgID` header values into Grafana components bound requests.
## Building
You first need to build a new caddy executable with this plugin. The easiest way is to do this with xcaddy.
Install xcaddy :
```shell
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
```After xcaddy installation you can build caddy with this plugin by executing:
```shell
xcaddy build v2.6.4 --with github.com/loafoe/lessor
```## Configuration
### Helm
Use the included `Helm` chart to deploy. Example `values.yaml`
```yaml
issuer: https://dex.hsp.hostedzonehere.com/upstream:
url: loki-gateway.observability.svc
ingress:
enabled: true
className: "nginx"
hosts:
- host: lessor.test.hostedzonehere.com
paths:
- path: /
pathType: ImplementationSpecific
```Then deploy:
```shell
helm template lessor charts/lessor --skip-tests --values values.yaml|kubectl apply -f - -n lessor
```Once deployed you can configure your Grafana Data source to point to `https://lessor.test.hostedzonehere.com`.
Make sure you enable the `Forward OAuth Identity` option so lessor can extract tenant claims and inject the `X-Scope-OrgID`## License
Apache 2.0