{"id":22387524,"url":"https://github.com/frankkkkk/opentsdb-auth-proxy","last_synced_at":"2025-03-26T21:13:59.188Z","repository":{"id":265840262,"uuid":"805562264","full_name":"Frankkkkk/opentsdb-auth-proxy","owner":"Frankkkkk","description":"An authentication + authorization proxy around OpenTSDB","archived":false,"fork":false,"pushed_at":"2024-05-29T21:48:15.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T05:04:48.840Z","etag":null,"topics":["authentication","authorization","opentsdb"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Frankkkkk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-24T21:20:09.000Z","updated_at":"2024-05-29T21:48:19.000Z","dependencies_parsed_at":"2024-12-01T07:10:55.585Z","dependency_job_id":null,"html_url":"https://github.com/Frankkkkk/opentsdb-auth-proxy","commit_stats":null,"previous_names":["frankkkkk/opentsdb-auth-proxy"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frankkkkk%2Fopentsdb-auth-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frankkkkk%2Fopentsdb-auth-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frankkkkk%2Fopentsdb-auth-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frankkkkk%2Fopentsdb-auth-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frankkkkk","download_url":"https://codeload.github.com/Frankkkkk/opentsdb-auth-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245735884,"owners_count":20663807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","opentsdb"],"created_at":"2024-12-05T02:09:38.385Z","updated_at":"2025-03-26T21:13:59.173Z","avatar_url":"https://github.com/Frankkkkk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTSDB Auth Proxy\n\nThis is a simple read/write proxy for the [OpenTSDB](https://github.com/OpenTSDB/opentsdb) \ntime series database. It handles authentication and authorization.\n\n**Warning**: This proxy is currently half baked. It works for my needs though.\nif you need more features, don't hesitate to make a PR ;-)\n\nThis proxy can be publicly exposed. When sending data to opentsdb, set the endpoint\nto this proxy instead. Each client will send the data alongside an authentication\ntoken.\n\nIf the token matches the host and the metric matches the list of allowed metrics,\nthen the request is forwarded to the opentsdb server.\n\nSupported routes:\n\n- POST `/put`\n- GET `/query`\n\nSupported authentications:\n\n- sha256\n\nSupported authorizations:\n\n- `metrics`: read \u0026 write\n- `read_metrics`\n- `write_metrics`\n\n\n\n## Container images\n\nYou can find the images on:\n\n- the dockerhub as [`frankkkkk/opentsdb-auth-proxy`](https://hub.docker.com/r/frankkkkk/opentsdb-auth-proxy)\n- my hub: [`forge.k3s.fr/frank/opentsdb-auth-proxy`](https://forge.k3s.fr/frank/-/packages/container/opentsdb-auth-proxy/main)\n\n\n## Configuration\n\nTake a look at the provided [sample configuration](./example-cfg.yml)\n\n### Authentication tokens\n\nRight now, one authentication token is supported:\n\n- sha256\n\n#### Sha256\n\nTo generate a sha256 token for a specific producer, do the following:\n\n```bash\n# Generate a token\nTOKEN=$(openssl rand -hex 20)\nSHA=$(echo -n $TOKEN | sha256sum - | awk '{print $1}')\n\necho \"Token for the device is $TOKEN . Sha256 is $SHA\"\n# Token for the device is 7a5becc5b5bb581522fd0bb8891bb99a70275620 . Sha256 is ac790471b321143716e7773d589af923236ebdd435ba17c671df3558becc5154\n```\n\nThe producer will need to send its token on query string:\n\n```bash\ncurl -X POST https://my-proxy/api/put?token=7a5....\n```\n\nYou then need to specify the hash in the config file. This file is then \"safe\"\nif the token is reasonably random.\n\n#### Plain\n\nTo be implemented; but don't do it.\n\n\n## Environment variables\n\nThe following env variables are supported:\n\n- `CONFIG_FILE` : the location of the config file\n- `OPENTSDB_URL` (in this case, don't set it in the config file)\n\n## Notes about exposing OpenTSDB\n\nCurrently, OpenTSDB does not support authentication. If you run opentsdb in a k8s\ncluster, protect its ingress too. Either via a different ingress class, or with\nspecific per-ingress-ctrl anotations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankkkkk%2Fopentsdb-auth-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankkkkk%2Fopentsdb-auth-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankkkkk%2Fopentsdb-auth-proxy/lists"}