{"id":31783432,"url":"https://github.com/laniot/signer","last_synced_at":"2026-05-18T03:03:08.265Z","repository":{"id":318596182,"uuid":"1071896149","full_name":"laniot/signer","owner":"laniot","description":"Remote Signer and certificate Generation for LAN Websocket Secure devices","archived":false,"fork":false,"pushed_at":"2025-10-08T05:02:53.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T05:46:05.818Z","etag":null,"topics":["certificate-manager","csr","esp32s3","hsm","https","iot","oscp","pki","pkix","remote-signer","root-ca","self-signing","ssl","tls","tls-certificate","webserver","wss","x509"],"latest_commit_sha":null,"homepage":"https://github.com/laniot/signer","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laniot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T01:09:28.000Z","updated_at":"2025-10-08T04:53:36.000Z","dependencies_parsed_at":"2025-10-08T05:46:08.090Z","dependency_job_id":"0aab7cea-47a1-4a1d-a35e-ed49b048d08f","html_url":"https://github.com/laniot/signer","commit_stats":null,"previous_names":["laniot/signer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/laniot/signer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laniot%2Fsigner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laniot%2Fsigner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laniot%2Fsigner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laniot%2Fsigner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laniot","download_url":"https://codeload.github.com/laniot/signer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laniot%2Fsigner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["certificate-manager","csr","esp32s3","hsm","https","iot","oscp","pki","pkix","remote-signer","root-ca","self-signing","ssl","tls","tls-certificate","webserver","wss","x509"],"created_at":"2025-10-10T10:25:18.256Z","updated_at":"2026-05-18T03:03:08.259Z","avatar_url":"https://github.com/laniot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LAN-IOT Signer (POC)\n\nA minimal Certificate Authority (CA) signer service for IoT devices. Generates SSL certificates for ESP32-S3 devices by signing with an intermediate certificate.\n\n## Quick Start\n\n### Local Development\n```bash\n# 1. Install dependencies\nnpm install\n\n# 2. Set up environment variables\ncp .env.example .env\n# Edit .env with your values\n\n# 3. Run the server\nnpm start\n```\n\n### Environment Variables\nConfigure these in `.env` (local) or in your hosting platform:\n- `SIGNER_TOKEN` - Bearer token for API authentication\n- `DEV_INT_CRT` - Intermediate certificate (file path or PEM content)\n- `DEV_INT_KEY` - Intermediate private key (file path or PEM content)\n- `PORT` - Server port (optional, defaults to 8080)\n- `ALLOW_PRIVATE_IPS` - Allow private IPs (optional, defaults to true)\n- `DEFAULT_DAYS` - Default cert validity in days (optional, defaults to 7)\n\nNote: Certificates support multiple formats (PEM, base64-PEM, base64-DER)\n\nSee [DEPLOYMENT.md](./DEPLOYMENT.md) for detailed setup instructions including Railway deployment.\n\n## API Endpoint\n\n### Sign Certificate Request\n\n```\nPOST /v1/sign\nAuthorization: Bearer $SIGNER_TOKEN\nContent-Type: application/json\n```\n\n**Request Body:**\n```json\n{\n  \"device_id\": \"LAN-IOT-12AB\",\n  \"ip\": \"192.168.7.189\",\n  \"dns\": \"LAN-IOT-12AB.local\",\n  \"days\": 7\n}\n```\n\n**Response:**\n```json\n{\n  \"device_key_pem\": \"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n\",\n  \"server_crt_pem\": \"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n\"\n}\n```\n\nReturns both the device private key and certificate chain (leaf + intermediate).\n\n## Device Usage (ESP32-S3)\n\n1. **Save the returned keys:**\n   - `device_key_pem` → `/device.key`\n   - `server_crt_pem` → `/server.crt`\n\n2. **Keep your root CA certificate** at `/ca.crt` to distribute to clients\n\n3. **Load certificates in your ESP32-S3 code:**\n   ```cpp\n   // Read /server.crt and /device.key into strings\n   sslCert = new SSLCert((const unsigned char*)crt.data(), crt.size(),\n                         (const unsigned char*)key.data(), key.size());\n   ```\n\n## Hardening Notes\n\n- **Keep certificate lifetime short** (1–7 days). Re-issue on IP change.\n- **Restrict tokens per device**. Add an allowlist mapping `device_id` → token.\n- **Move intermediate key into an HSM/KMS** when you leave POC stage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaniot%2Fsigner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaniot%2Fsigner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaniot%2Fsigner/lists"}