Skip to main content

License activation recovery: Allow instance_name in validate endpoint

Summary

Add support for recovering instance_id after network failures during license activation. Either make activate idempotent, or allow instance_name as an alternative to instance_id in the validate endpoint.

Problem

When calling POST /v1/licenses/activate, if the network drops before the response reaches the client, the instance_id is lost. Since /v1/licenses/validate requires instance_id, there's no way to recover.

I've tested and confirmed that calling activate again with the same key + instance_name creates a new instance (not idempotent), which increments activation_usage.

Proposed Solutions

  1. Idempotent activation If activate is called with the same key + instance_name, return the existing instance instead of creating a new one. (This might be a breaking change)

  2. Allow instance_name in validate (less invasive) Accept instance_name as an alternative to instance_id in the validate endpoint.

    POST /v1/licenses/validate { key, instance_name } 

    This would be non-breaking since it just adds a new optional parameter.


Reference

Status: Planned1 comment

Log in to comment and vote

Comments1

  • jayrabe

    •

    Aug 12

    Supporting this with the failure mode we hit. Deactivate requires Creem's own instance id, returned by activate — passing our own seat identifier 404s, and nothing documents that. A merchant who doesn't persist Creem's id has no recovery path: the activation ledger fills with instances that can't be freed and the customer eventually can't activate.

    Accepting instance_name (or any merchant-supplied identifier) on validate/deactivate would make that recoverable. The list-instances endpoint in progress on this board would too.