This example project demonstrates how to use the Omnistrate Licensing SDK in a Java application, with a focus on validating license files generated by Omnistrate. It includes examples of how to integrate the SDK into your Java projects and use its validation functions to ensure licenses are valid.
The HttpServerApp.java file is the entry point of the Java application. It demonstrates how to use the Omnistrate Licensing SDK to validate your mounted licenses.
This is the validation method that can be used to validate a license key for a product in Omnistrate. With a simple call to this method, you can:
- confirm the validity of the certificate that signed the license
- validate the license signature
- validate the license expiration date
- validate the unique SKU configured in Omnistrate maps with the product
- validate that the injected variable containing the instance-id maps with the license
Note: The SDK logic assumes that the license file is mounted in the following folder:
/var/subscription/. When using Omnistrate there is no need to add any additional configuration to manage certificate rotation, suspension or renewal of the license is automated in a simple way. You can explore the implementation of the Open Source SDK.
The Dockerfile is used to create a Docker image for the Java application. It includes instructions for setting up the Go environment, copying the application code, installing dependencies, and building the application. This allows the application to be containerized and run in any environment that supports Docker.
The /charts folder contains the Helm charts for deploying the application on a Kubernetes cluster. The Helm chart defines the resources and configurations needed to run the application, including deployments, services, and ingress.
The .github/workflows directory contains GitHub Actions workflows for continuous integration. These workflows automate the build and package processes for the Java application. The build.yml workflow handles the compilation and testing of the application, the package.yml workflow manages the packaging and publishing of the application artifacts in Github Packages, and the release-charts.yml workflow manages the release of Helm charts.
The spec.yaml file defines the Kubernetes Service resource for the application. It specifies the service and helm configuration to deploy it.
The Makefile includes various automation scripts to streamline the development and deployment processes. It contains commands for building the application, releasing the application to Omnistrate and creating instances for testing, all done using omnistrate-ctl.
Want to contribute? Awesome! You can find information about contributing to this project in the CONTRIBUTING page.
This project is licensed under the MIT License. See the LICENSE file for details.
Omnistrate is the operating system for your SaaS, offering enterprise-grade capabilities: automated provisioning, serverless capabilities, auto-scaling, billing, monitoring, centralized logging, self-healing, intelligent patching and much more!