Product licensing
Hiphops licensing allows you to create licensable products with custom fields and distribute secure product keys to customers.
Product licensing in Hiphops provides a complete solution for managing software licenses and customer access. Product keys integrate seamlessly with registry authentication, allowing you to bundle software distribution with license validation.
Two key workflows
For developers: Integrating license validation
As a developer, you’ll:
- Create products that define license fields and permissions
- Add license validation to your application using the Hook client library
- Build Docker images with license checking built-in
- Distribute images through the Hiphops registry
For sales teams: Managing customer licenses
As a sales person or customer success manager, you’ll:
- Generate product keys for individual customers
- Configure license fields with customer-specific values (seats, features, etc.)
- Share credentials via secure onboarding links
- Monitor and manage customer access
Core concepts
Products
Products are the blueprint for your licensable software. Each product defines:
- License fields: Custom data collected from customers (email, company name, usage limits, etc.)
- Registry roles: Permissions granted to customers (pull access to specific images)
- Onboarding content: Markdown documentation shown to customers
Product keys
Product keys are customer-specific licenses generated from a product template. Each key contains:
- Customer identity: Unique identifier for the customer
- Field values: Customer-specific data (contact info, configuration, etc.)
- JWT token: Signed credential for API and registry authentication
Customer identities
When you create a product key, Hiphops generates a customer identity that can:
- Authenticate against your registry using the JWT token
- Pull Docker images based on assigned roles
- Access onboarding documentation and resources
Developer workflow
1. Add license validation to your application
Install the Hook client library:
npm install @hiphops/hook
Note: Currently, the JavaScript/TypeScript SDK is available. Additional language SDKs are coming soon.
Add license checking to your application:
import { license } from '@hiphops/hook';
const validateLicense = async () => {
const info = await license();
if (!info.verified) {
console.error('Invalid license:', info.verify_failures);
process.exit(1);
}
console.log('License valid for:', info.license);
return info.license;
};
2. Build Docker images with license validation
Your Dockerfile should include the Hook client:
FROM node:18-alpine
WORKDIR /app
# Install dependencies (including @hiphops/hook)
COPY package*.json ./
RUN npm ci --omit=dev
# Copy application code
COPY . .
RUN npm run build
# License token will be provided by customer
ENV LICENSE_TOKEN=""
CMD ["npm", "start"]
3. Customer deployment
Customers deploy your application with their license token:
docker run -e LICENSE_TOKEN="customer_jwt_token_here" your-app:latest
The Hook client automatically validates the license token on startup and throughout runtime.
Sales workflow
1. Create product keys for customers
- Navigate to Products in your project dashboard
- Select the product and click Create new key
- Fill in customer information and license field values
- Generate the key
2. Share credentials with customers
Onboarding link (recommended):
- Click Share onboarding link
- Send the secure link to the customer
- Customer can download their license token and view documentation
Manual sharing:
- Click Share manually to get the JWT token
- Send the token securely to the customer
- Provide deployment instructions
3. Customer receives
Customers receive:
- License token (JWT) to set as
LICENSE_TOKEN
environment variable - Registry access using the same token for Docker authentication
- Onboarding documentation with setup instructions
Integration with registry
Product keys provide dual functionality:
For license validation
# Customer sets license token in environment
export LICENSE_TOKEN="eyJhbGciOiJIUzI1NiIs..."
docker run -e LICENSE_TOKEN="$LICENSE_TOKEN" your-app:latest
For registry authentication
# Customer uses same token for Docker registry access
docker login your-project.ctr.dev -u customer -p "$LICENSE_TOKEN"
docker pull your-project.ctr.dev/your-app:latest
This unified approach means customers only need one credential for both software access and license validation.