Skip to content

Ship Replicated SDK for license enforcement with existing Helm charts #596

@jpshackelford

Description

@jpshackelford

Summary

We can start shipping the Replicated SDK as part of our existing Helm charts today, without waiting for the full Replicated Helm install migration. This enables license enforcement immediately for all customers.

Background

Currently we have two deployment paths:

  1. Regular Helm Install - Customer downloads chart, runs helm install
  2. Replicated Helm Install (in progress) - Customer uses helm install oci://registry.replicated.com/openhands/...

The assumption was that license enforcement requires the Replicated Helm install flow. This is incorrect.

Key Insight

The Replicated SDK is a standalone Helm subchart that:

  • Deploys a small service at http://replicated:3000
  • Authenticates with Replicated's backend using a license ID
  • Caches license data locally
  • Exposes license/entitlement APIs

The "Replicated Helm install" is just a convenience that auto-injects the license ID. We can achieve the same result by having customers manually provide their license ID.

Proposed Approach

1. Add Replicated SDK as Subchart

# charts/openhands/Chart.yaml
dependencies:
- name: replicated
  repository: oci://registry.replicated.com/library
  version: 1.9.0
  condition: replicated.enabled

2. Configure for Manual License ID

# charts/openhands/values.yaml
replicated:
  enabled: true
  integration:
    enabled: true      # SDK fetches license from Replicated backend
    licenseID: ""      # Customer MUST provide this

3. Customer Installation Flow

# Customer receives license ID from sales process (via Vendor Portal email)

# Install with license ID
helm install openhands ./openhands-chart \
  --set replicated.integration.licenseID=abc123def456 \
  --set replicated.integration.enabled=true

Migration Path

Phase Install Method License Enforcement
Phase 1 (Now) Regular Helm + SDK subchart ✅ Customer provides license ID
Phase 2 (Future) Replicated Helm install ✅ License auto-injected

Both phases use the same SDK API (http://replicated:3000), so application code doesn't change.

Benefits

  1. Immediate enforcement - Don't wait for Replicated Helm migration
  2. Same codebase - No special handling for "Replicated vs non-Replicated"
  3. Smooth migration - Phase 2 is just removing --set flags
  4. Full SDK features - Custom metrics, instance tracking, entitlements all work

Open Questions

Q1: How do customers get their license ID?

  • Vendor Portal sends email with license ID when customer is created (already supported)

Q2: What happens if customer doesn't provide license ID?

  • SDK should start, app should check and enforce at runtime

Q3: What about airgapped/offline customers?

  • SDK has airgap mode where license is provided as a file

Q4: Does this expose our license enforcement to bypass?

  • No more than full Replicated install. With signature verification using our vendor public key, customers cannot forge license data.

Implementation Tasks

OpenHands-Cloud (Helm Charts)

  • Add replicated subchart dependency to Chart.yaml
  • Add replicated.* values to values.yaml with sensible defaults
  • Add validation hook to check replicated.integration.licenseID is provided
  • Document license ID requirement in install instructions
  • Embed vendor public key as Secret for signature verification

OpenHands/OpenHands (Enterprise Server)

  • Add license enforcement module (query SDK API)
  • Add decorators for protecting premium features
  • Add /api/license-status endpoint for UI
  • Add startup check for SDK availability

Related


This issue was created by an AI agent (OpenHands) on behalf of the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRDIssue is a product requirements documentenhancementNew feature or requestplatform-teamIssue falls under the platform team's responsibilities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions