{"id":44643851,"url":"https://github.com/bsayli/licensing","last_synced_at":"2026-02-14T19:10:47.859Z","repository":{"id":310096892,"uuid":"809379541","full_name":"bsayli/licensing","owner":"bsayli","description":"Modern licensing framework with Spring Boot 3 — featuring secure key generation, encryption, token validation services, SDK \u0026 CLI tools. Integrated with Keycloak and ships with Docker for easy setup. ","archived":false,"fork":false,"pushed_at":"2026-01-23T16:46:29.000Z","size":4212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-24T07:24:39.345Z","etag":null,"topics":["caffeine-cache","cli-tool","docker","eddsa","java-21","jwt","keycloak","license-management","licensing","maven","microservices","redis-cache","sdk","spring-boot-3"],"latest_commit_sha":null,"homepage":"","language":"Java","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/bsayli.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-02T14:27:24.000Z","updated_at":"2025-12-04T20:25:09.000Z","dependencies_parsed_at":"2025-09-08T05:23:57.346Z","dependency_job_id":"90fa837f-7e28-4971-b4ed-a8a09675044e","html_url":"https://github.com/bsayli/licensing","commit_stats":null,"previous_names":["bsayli/licensing"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bsayli/licensing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsayli%2Flicensing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsayli%2Flicensing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsayli%2Flicensing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsayli%2Flicensing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsayli","download_url":"https://codeload.github.com/bsayli/licensing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsayli%2Flicensing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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":["caffeine-cache","cli-tool","docker","eddsa","java-21","jwt","keycloak","license-management","licensing","maven","microservices","redis-cache","sdk","spring-boot-3"],"created_at":"2026-02-14T19:10:47.324Z","updated_at":"2026-02-14T19:10:47.847Z","avatar_url":"https://github.com/bsayli.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to the Licensing Project!\n\n[![Build](https://github.com/bsayli/licensing/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/bsayli/licensing/actions/workflows/build.yml)\n[![Release](https://img.shields.io/github/v/release/bsayli/licensing?logo=github\\\u0026label=release)](https://github.com/bsayli/licensing/releases/latest)\n[![codecov](https://codecov.io/gh/bsayli/licensing/branch/main/graph/badge.svg)](https://codecov.io/gh/bsayli/licensing)\n[![Java](https://img.shields.io/badge/Java-21-red?logo=openjdk)](https://openjdk.org/projects/jdk/21/)\n[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.5-brightgreen?logo=springboot)](https://spring.io/projects/spring-boot)\n[![Keycloak](https://img.shields.io/badge/Keycloak-26.x-purple?logo=keycloak)](https://www.keycloak.org/)\n[![Redis](https://img.shields.io/badge/Redis-8.x-red?logo=redis)](https://redis.io/)\n[![Maven](https://img.shields.io/badge/Maven-3.9-blue?logo=apachemaven)](https://maven.apache.org/)\n[![Docker](https://img.shields.io/badge/Docker-Compose-blue?logo=docker)](https://www.docker.com/)\n[![Caffeine](https://img.shields.io/badge/Caffeine-Cache-orange)](https://github.com/ben-manes/caffeine)\n[![JWT](https://img.shields.io/badge/JWT-EdDSA-lightgrey?logo=jsonwebtokens)](https://jwt.io/)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/social-preview.png\" alt=\"Licensing Project preview\" width=\"720\"/\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eSpring Boot • Keycloak • Redis • EdDSA — Complete licensing framework\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n\u003e **Why this project?** Licensing is often treated as an afterthought in enterprise applications. This project provides a **complete end-to-end licensing framework** built on Spring Boot 3, integrating Keycloak, Redis, and EdDSA to standardize issue/validate flows with a **Service**, **SDK**, and **CLI**.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/licensing_flow.png\" alt=\"Licensing flow diagram\" width=\"860\"/\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eEnd-to-end license validation flow\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n## Setting Up the Environment\n\n1. **Clone the Repository**\n\n```bash\ngit clone https://github.com/bsayli/licensing.git\n```\n\n2. **Extract Keycloak DB**\n\n* Get `licensing-keycloak.zip` from `/licensing/db`\n* Copy and extract into your home directory (\\$HOME)\n\n---\n\n### TL;DR – Quickstart\n\n```bash\ncd licensing/docker-compose/server \u0026\u0026 docker-compose up -d\n# wait ~45s on first run\ncd ../client \u0026\u0026 docker-compose up\n```\n\n---\n\n## Project Purpose\n\nThis project provides a **complete licensing framework** for applications, combining secure key generation, detached digital signatures, and token validation (JWT/EdDSA). It is designed to ensure license authenticity, prevent misuse, and integrate seamlessly with **Keycloak** for user identity and license metadata.\n\n---\n\n## Subprojects\n\n* **license-generator**: Java project for license key generation, encryption, and cryptographic tooling.\n* **licensing-service**: Spring Boot application that issues and validates license tokens.\n* **licensing-service-sdk**: Spring Boot application acting as a client SDK (with caching \u0026 detached signature) for integrating licensing capabilities into external apps.\n* **licensing-service-sdk-cli**: Command-line tool for testing and interacting with the licensing service.\n\n---\n\n## Repository Structure\n\n| Directory          | Purpose                                                      |\n| ------------------ | ------------------------------------------------------------ |\n| **db**             | Keycloak database backup (`licensing-keycloak.zip`)          |\n| **docker-compose** | Docker Compose files to run servers and client               |\n| **scripts**        | Utility scripts to run the client (`run_license_sdk_cli.sh`) |\n\n---\n\n## Prerequisites\n\n* Git client installed\n* Docker installed and running\n* Docker Compose installed and running\n* Java (\u003e= 21.x)\n* Maven (\u003e= 3.x)\n\n---\n\n## Keycloak Configuration\n\nThis project relies on **Keycloak** to store and manage license metadata.  \nA full step-by-step guide is provided in [KEYCLOAK_CONFIG.md](docs/KEYCLOAK_CONFIG.md).\n\n---\n\n## Running the Licensing Service\n\n```bash\ncd licensing/docker-compose/server\ndocker-compose up -d\n```\n\nThis starts Keycloak, Licensing Service, and Licensing Service SDK in the background. Wait \\~45 seconds for the services to initialize on the first run.\n\n**Optional (local/dev only):** If you want to start only **Keycloak + Redis** separately, you can use `docker-compose.infra.yml`.\n\n---\n\n## Running the License Validation Tool via Docker\n\n```bash\ncd licensing/docker-compose/client\ndocker-compose up\n```\n\nLogs should confirm validation:\n\n```text\nlicensing-service-sdk-cli | INFO License validated successfully.\nlicensing-service-sdk-cli | INFO Token: \u003cJWT_TOKEN\u003e\nlicensing-service-sdk-cli | INFO Message: License is valid\n```\n\n---\n\n## Running the License Validation Tool Directly (Optional 1)\n\n```bash\ncd licensing/licensing-service-sdk-cli\nmvn clean package\ncd target\njava -jar licensing-service-sdk-cli-1.0.1.jar -s crm -v 1.5.0 -i \"crm~macbook~00:2A:8D:BE:F1:56\" -k \"BSAYLI.\u003copaqueB64Url\u003e\"\n```\n\n---\n\n## Running the License Validation Tool with Script (Optional 2)\n\n```bash\ncd licensing/scripts\nchmod +x run_license_sdk_cli.sh\n./run_license_sdk_cli.sh -s billing -v 2.0.0 -i \"billing~macbook~00:2A:8D:BE:F1:56\" -k \"BSAYLI.\u003copaqueB64Url\u003e\"\n```\n\n## Notes\n\n* CLI examples must always be provided **on a single line**.\n* If parameters contain spaces or special characters, they should be enclosed in quotes (`\"...\"`).\n\n---\n\n## Security Note\n\nDemo configuration files contain inline secrets in `application.yml`. In production, **HashiCorp Vault** or another secret manager should be used. Vault integration is part of the **roadmap**.\n\n---\n\n## Feedback \u0026 Questions\n\nIf you notice any issues in this documentation or have suggestions for improvements, feel free to open an **Issue** or a **Discussion**.\n\n---\n\n## 🗺️ Roadmap\n\n* [ ] Move sensitive configs to **HashiCorp Vault** for secure secrets management\n* [ ] Extend **Keycloak integration** to manage licenses (create, update, revoke) via dedicated endpoints\n\n---\n\n## ⭐ Support\n\nIf you found this project useful, please consider giving it a star ⭐ on GitHub — it helps others discover it too!\n\n---\n\n## Related Modules (Quick View)\n\n| Module                        | Purpose                                    | Documentation                                              |\n| ----------------------------- | ------------------------------------------ | ---------------------------------------------------------- |\n| **licensing-service**         | REST API for issuing and validating tokens | [README](licensing-service/README.md)                      |\n| **licensing-service-sdk**     | Client SDK for integration                 | [README](licensing-service-sdk/README.md)                  |\n| **licensing-service-sdk-cli** | CLI demo client                            | [README](licensing-service-sdk-cli/README.md)              |\n| **license-generator**         | Key \u0026 signature tooling                    | [README](license-generator/README.md)                      |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsayli%2Flicensing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsayli%2Flicensing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsayli%2Flicensing/lists"}