keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
824 stars 53 forks source link

Add fingerprint uniqueness strategy for allowing duplicate machines but unique components #757

Closed ezekg closed 1 year ago

ezekg commented 1 year ago

For example, a series of cloned devices could all share the same device GUID, but the underlying hardware will still be unique. Right now, there's no way to allow duplicate machine fingerprints but block duplicate component fingerprints. One workaround would be to randomly generate the machine fingerprint, and forego the device GUID. But I feel like this should be a uniqueness strategy because that workaround requires up-front planning and the knowledge that GUIDs can conflict.

ezekg commented 1 year ago

What if we renamed fingerprint_uniqueness_strategy to machine_uniqueness_strategy, and introduced component_uniqueness_strategy? Add a request migration and this should be pretty low impact.

Ditto for fingerprint_matching_strategy.