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

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
💡

Feature Request

Date

8 months ago

Author

User

Subscribe to post

Get notified by email when there are changes.