{"id":36743410,"url":"https://github.com/spounge-ai/polykey","last_synced_at":"2026-01-12T12:30:39.198Z","repository":{"id":302326693,"uuid":"1011433102","full_name":"spounge-ai/polykey","owner":"spounge-ai","description":"Encrypted credential router with KMS, envelope encryption, scoped access, and audit logging for zero-trust security. ","archived":false,"fork":false,"pushed_at":"2025-08-22T22:40:46.000Z","size":1624,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-23T00:02:50.247Z","etag":null,"topics":["docker-compose","grpc","keyvault","microservice","open-router"],"latest_commit_sha":null,"homepage":"","language":"Go","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/spounge-ai.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,"zenodo":null}},"created_at":"2025-06-30T20:08:59.000Z","updated_at":"2025-08-22T22:40:50.000Z","dependencies_parsed_at":"2025-07-14T06:33:22.599Z","dependency_job_id":"ad26d29d-eaad-4d6c-b05b-6367c7368186","html_url":"https://github.com/spounge-ai/polykey","commit_stats":null,"previous_names":["spoungeai/polykey-service","spounge-ai/polykey-service","spounge-ai/polykey"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spounge-ai/polykey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spounge-ai%2Fpolykey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spounge-ai%2Fpolykey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spounge-ai%2Fpolykey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spounge-ai%2Fpolykey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spounge-ai","download_url":"https://codeload.github.com/spounge-ai/polykey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spounge-ai%2Fpolykey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["docker-compose","grpc","keyvault","microservice","open-router"],"created_at":"2026-01-12T12:30:38.429Z","updated_at":"2026-01-12T12:30:39.188Z","avatar_url":"https://github.com/spounge-ai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./docs/dark.svg\"\u003e\n  \u003cimg alt=\"spounge-polykey-logo\" src=\"./docs/light.svg\" width=\"50%\" height=\"50%\"\u003e\n\u003c/picture\u003e\n\n  A gRPC router microservice for LLMs and third-party APIs for [@Spounge](https://github.com/spounge-ai).\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/SpoungeAI/polykey-service/ci.yml?label=Build\u0026style=flat\u0026color=brightgreen)](https://github.com/SpoungeAI/polykey-service/actions/workflows/ci.yml)\n[![Docker | GHCR](https://img.shields.io/badge/Docker-GHCR-blue?logo=docker\u0026style=flat)](https://github.com/SpoungeAI/polykey-service/pkgs/container/polykey-service)\n[![Go Module Version](https://img.shields.io/github/go-mod/go-version/SpoungeAI/polykey-service?style=flat)](https://github.com/SpoungeAI/polykey-service/blob/main/go.mod)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue?style=flat)](./LICENSE)\n[![Docs](https://img.shields.io/badge/docs-polykey--service-blue?style=flat)](https://github.com/SpoungeAI/polykey-service/wiki)\n\n\n\u003c/div\u003e\n\n\n\u003e Note (08/22/25): Polykey v.0.1.0: containerized, development now [@Nodus](https://github.com/spounge-ai/nodus)\n\n\u003chr style=\"width: 100%; height: 4px; background-color: #888; border: none; margin: 2em auto 1em;\" /\u003e\n\nPolykey is a high-performance, secure-by-design Key Management Service (KMS) written in Go. It provides a gRPC API for the complete lifecycle management of cryptographic keys, built on a cloud-native and observable architecture.\n\nFor a detailed technical breakdown of all RPCs, see the [**API Reference**](./docs/API_REFERENCE.md).\n\nFor instructions on how to configure the service and build a client, see the [**Integration Guide**](./docs/INTEGRATION_GUIDE.md).\n\n## Core Features\n\n-   **Secure by Design**:\n    -   **Transport Security**: Enforces mutual TLS (mTLS) for all gRPC communication.\n    -   **Authentication**: Uses a JWT-based authentication flow (`Authenticate` RPC).\n    -   **Authorization**: Implements Role-Based Access Control (RBAC) and can enforce a zero-trust policy by matching a client's mTLS certificate identity to its application-layer identity.\n    -   **Secure Bootstrapping**: Loads critical secrets (e.g., master keys, JWT signing keys) at startup from **AWS Parameter Store**, not from config files.\n\n-   **Comprehensive Key Lifecycle Management**:\n    -   **Full CRUD Operations**: Create, Get, List, Update, and Revoke keys.\n    -   **Key Rotation**: Built-in RPC for rotating keys to create new versions.\n    -   **Batch Operations**: High-throughput batch endpoints for all major key operations to reduce network latency.\n\n-   **Cloud-Native \u0026 Resilient Architecture**:\n    -   **Structured Logging**: Uses `slog` for structured, context-aware JSON logging.\n    -   **Observability**: Integrated OpenTelemetry for distributed tracing.\n    -   **Resilience Patterns**: Employs a circuit breaker pattern for the persistence layer to prevent cascading failures.\n    -   **Concurrency**: Uses worker pools and pipelines for handling asynchronous background tasks like key rotation.\n\n-   **Flexible Backend Support**:\n    -   **Persistence**: Supports PostgreSQL-compatible databases (like NeonDB and CockroachDB).\n    -   **KMS Providers**: Supports a local, master-key-based KMS and AWS Key Management Service (KMS) for hardened, production-grade key encryption.\n\n## Architecture Overview\n\nThe service follows a clean architecture pattern, separating concerns into distinct layers within the `internal` directory:\n\n-   `/domain`: Defines the core business entities, interfaces, and value objects.\n-   `/service`: Implements the core business logic for key management operations.\n-   `/infra`: Contains implementations for external concerns like persistence, caching, and communication with AWS.\n-   `/app`: Holds the gRPC server implementation, including all RPC handlers and interceptors for concerns like logging, auth, and validation.\n-   `/wiring`: Manages dependency injection for production and mock environments.\n\n## ⚙️ Getting Started\n\n### Building the Binaries\n\n-   `make build-local`: The fastest way to compile for local development, using the Go build cache.\n-   `make build`: Creates clean, statically-linked Linux binaries suitable for production/container environments.\n\n### Running the Application\n\nThe recommended workflow is using Docker Compose, which mirrors a production-like environment.\n\n-   `make compose-dev`: Builds the necessary Docker images and starts the `polykey-server`.\n\n### Running Tests\n\n| Command | Description |\n| :--- | :--- |\n| `make test` | Run all unit tests. |\n| `make test-race` | Run unit tests with the race detector enabled. |\n| `make test-integration` | Run the integration test suite. |\n\n## 📄 License\n\nThis project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspounge-ai%2Fpolykey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspounge-ai%2Fpolykey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspounge-ai%2Fpolykey/lists"}