{"id":15195301,"url":"https://github.com/pdcalado/kave","last_synced_at":"2026-01-31T03:02:33.138Z","repository":{"id":65819190,"uuid":"599759332","full_name":"pdcalado/kave","owner":"pdcalado","description":"Key and Value simple http API and command line interface","archived":false,"fork":false,"pushed_at":"2023-03-15T18:30:17.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T05:42:06.918Z","etag":null,"topics":["auth0","cli","httpapi","jwt","jwt-claims","rbac-authorization","redis","scopes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdcalado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-09T20:26:55.000Z","updated_at":"2023-03-03T11:00:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ff31998-3bfa-4fce-8c38-2d0dae7a8f06","html_url":"https://github.com/pdcalado/kave","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/pdcalado/kave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdcalado%2Fkave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdcalado%2Fkave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdcalado%2Fkave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdcalado%2Fkave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdcalado","download_url":"https://codeload.github.com/pdcalado/kave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdcalado%2Fkave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28927772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T02:59:34.861Z","status":"ssl_error","status_checked_at":"2026-01-31T02:59:05.369Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["auth0","cli","httpapi","jwt","jwt-claims","rbac-authorization","redis","scopes"],"created_at":"2024-09-27T23:21:09.981Z","updated_at":"2026-01-31T03:02:33.124Z","avatar_url":"https://github.com/pdcalado.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/pdcalado/kave/badge.svg)](https://coveralls.io/github/pdcalado/kave)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pdcalado/kave)](https://goreportcard.com/report/github.com/pdcalado/kave)\n![ci workflow](https://github.com/pdcalado/kave/actions/workflows/ci.yml/badge.svg)\n\n# kave\n\nKave provides:\n\n1. A server hosting a simple HTTP API for getting and setting key value pairs, backed by Redis.\n2. A command line interface to get and set key value pairs through the HTTP API.\n3. Authorization middleware with JWT validation and using scopes as permissions.\n4. Token acquisition using the cli for M2M applications.\n\nThe scheme below depicts basic use of kave (auth was omitted).\n\n```mermaid\nsequenceDiagram\n    participant Kave-Cli\n    Kave-Server-\u003e\u003eRedis: Connect and ping\n    Kave-Cli-\u003e\u003eKave-Server: GET/POST key values\n    activate Kave-Server\n    Kave-Server-\u003e\u003eRedis: get/set Redis keys\n    activate Redis\n    Redis-\u003e\u003eKave-Server: Redis response\n    deactivate Redis\n    Kave-Server-\u003e\u003eKave-Cli: HTTP response\n    deactivate Kave-Server\n```\n\n## Usage\n\nSet up your redis server and fill in a `config.toml`:\n\n```toml\naddress = \"localhost:8000\"\nredis_address = \"localhost:6379\"\n\n# defaults\n## Base path for routing the requests\n# router_base_path = \"/redis\"\n## Prefix on all keys for Redis requests\n# redis_key_prefix = \"kave:\"\n## HTTP incomding requests timeout in milliseconds\n# timeout_ms = 2000\n## Redis username\n# redis_username = \"\"\n## Redis password must be set as env variable REDIS_PASSWORD\n```\n\n(auth is also disabled by default, check [Auth](#using-auth) for details)\n\n\nRun the server:\n\n```console\nfoo@bar:~$ kave-server\n```\n\nMake requests using kave-cli:\n\n```console\nfoo@bar:~$ # initialize profile first (creates a file at ${USER_CONFIG_DIR}/kave/config.toml)\nfoo@bar:~$ # set --router_base_path if not using the default value in server\nfoo@bar:~$ kave init --url localhost:8000\n\nfoo@bar:~$ # set a key value pair\nfoo@bar:~$ kave set foo \"bar\"\n\nfoo@bar:~$ # get a key's value\nfoo@bar:~$ kave get foo\nbar\n\nfoo@bar:~$ # or curl if you prefer\nfoo@bar:~$ curl http://localhost:8000/redis/foo\nbar\n```\n\n## Using auth\n\nThis auth setup requires an account in Auth0 with:\n\n1. An API representing kave server\n2. An M2M application (or more) representing the client/agents where the cli will be invoked\n3. Permission scopes defined in the API and attributed to the M2M applications.\n\nHere are some scope examples:\n\n* `read:foo`: allows GET requests of key `kave:foo`\n* `write:bar:*`: allows POST request for any key matching that pattern, such as `kave:bar:qux`\n\nAny regexp pattern as a scope is matched against the operation (get/set) on the key. `read:` prefix allows redis get and `write:` prefix allows redis set.\n\n**To set up auth in the cli** you can run init with:\n\n```console\nfoo@bar:~$ kave init --url \"http://your-kave-server-url.com\" --auth0_audience \"http://youraudience.com\" --auth0_domain \"your-domain.eu.auth0.com\" --auth0_client_id \"qwertyasdfghzxcvb123456\" --auth0_client_secret \"secretsequencefromauth0\"\n```\n\n**To set up auth in the server** change `config.toml` to:\n\n```toml\n## config.toml\n\naddress = \"localhost:8000\"\nredis_address = \"localhost:6379\"\n\n# defaults\n# router_base_path = \"/redis\"\n# redis_key_prefix = \"kave:\"\n\n[auth]\nenabled = true\ndomain = \"your-domain.eu.auth0.com\"\n```\n\nStart the server as described earlier, then use the cli:\n\n```console\nfoo@bar:~$ kave set foo \"bar\"\nfoo@bar:~$ kave get foo\n```\n\n## Build\n\nClone and run:\n\n```console\nfoo@bar:~$ make build\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdcalado%2Fkave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdcalado%2Fkave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdcalado%2Fkave/lists"}