Skip to content
← All posts
· Delta1 Labs KeyrightNode-lockingLicensing

Rebinding a node-locked seat through hardware change

A node-locked license binds a seat to one machine fingerprint, but real machines mutate — a NIC swap, a disk upgrade, a RAM change, a new GPU — and a brittle all-or-nothing fingerprint burns a seat every time. This deep dive builds the fuzzy side of node-locking in Keyright: a weighted component model, a similarity score that mixes a weight ratio with an N-of-M floor and an anchor component, a rebind flow that heals drift in place, and a per-seat cooldown plus append-only fingerprint history that keep the tolerance from becoming a seat-migration or cloning hole.

Node-locking binds a seat to a machine through a fingerprint, and the companion piece on fingerprint drift names the failure that bites in production: hardware mutates, the fingerprint moves with it, and a seat that should have stayed put gets spent twice. That article ended on the cure — a weighted, multi-signal fingerprint with a tolerance threshold. This one builds that cure properly, because “allow a tolerance” hides two hard problems. How much change is still the same machine? And once you accept partial change, what stops the tolerance from becoming a quiet seat-migration or cloning hole?

The real question

A node-locked seat has exactly one legitimate reason to accept a changed fingerprint: the machine that holds the seat changed some hardware and is still the same machine. Everything else that produces a similar but not identical fingerprint — a cloned VM template, an install copied to a second workstation, an attacker inching a binding toward different hardware — is abuse. Fuzzy matching cannot tell those apart from the single fingerprint in front of it. It has to decide from three things: how much of the fingerprint still agrees, how fast it has been changing, and what the history of this seat looks like. Get the first wrong and you either exhaust seats or merge machines; ignore the second and third and you hand out a migration tool.

Components, not one digest

Start by refusing to collapse the machine into a single hash. Keep each signal as an independently salted, hashed component carrying a weight that reflects how stable and how identifying it is.

public sealed record FingerprintComponent(string Name, string ValueHash, int Weight);

public sealed record MachineFingerprint(IReadOnlyList<FingerprintComponent> Components)
{
    public int TotalWeight => Components.Sum(c => c.Weight);
}

// Collected on the client; raw signals are hashed+salted before they ever leave the machine.
public static MachineFingerprint Collect() => new(new[]
{
    new FingerprintComponent("machineGuid",  Salted(HardwareSignals.MachineGuid()),  40),
    new FingerprintComponent("volumeSerial", Salted(HardwareSignals.VolumeSerial()), 25),
    new FingerprintComponent("cpuId",        Salted(HardwareSignals.CpuId()),        20),
    new FingerprintComponent("primaryMac",   Salted(HardwareSignals.PrimaryMac()),   15),
});

The machine GUID is the OS install identity and the most stable, so it carries the most weight; the MAC is the most volatile (docks, swapped cards, USB adapters) so it carries the least. The sum is 100, which makes the threshold easy to reason about. Crucially, the component values are already one-way hashes — the issuing service compares and stores opaque digests, never a disk serial or a MAC.

Scoring the presented fingerprint

On each validation the client presents its current component set. The service scores it against the set bound to the seat, producing two numbers that the policy needs separately: the weight ratio (how much of the identifying weight agrees) and the matched count (how many components agree at all).

public readonly record struct SimilarityScore(
    int MatchedWeight, int TotalWeight, int MatchedCount, int TotalCount)
{
    public double WeightRatio => TotalWeight == 0 ? 0 : (double)MatchedWeight / TotalWeight;
}

public static SimilarityScore Compare(MachineFingerprint bound, MachineFingerprint presented)
{
    var byName = presented.Components.ToDictionary(c => c.Name, c => c.ValueHash);
    int matchedWeight = 0, matchedCount = 0;

    foreach (var c in bound.Components)
    {
        if (byName.TryGetValue(c.Name, out var presentedHash) &&
            CryptographicOperations.FixedTimeEquals(
                Encoding.UTF8.GetBytes(presentedHash),
                Encoding.UTF8.GetBytes(c.ValueHash)))
        {
            matchedWeight += c.Weight;
            matchedCount++;
        }
    }

    return new SimilarityScore(matchedWeight, bound.TotalWeight, matchedCount, bound.Components.Count);
}

Two numbers, not one, because a weight ratio alone is gameable. If machineGuid matches, you already have 40 of 100; a loose threshold could call a machine “the same” on that single component while everything else differs — which is precisely the shape of a cloned VM that kept the OS image but changed network, disk and CPU. The matched count is the N-of-M floor that closes that gap: require at least N of the M components regardless of how the weight lands.

The tolerance policy

The verdict combines three gates — a weight threshold, an N-of-M floor, and an optional anchor component whose match biases toward “same machine.”

public enum BindVerdict { SameMachine, RebindRequired, NewMachine }

public sealed record TolerancePolicy(
    double WeightThreshold,   // e.g. 0.70  — matched weight must reach this
    int    MinMatchedCount,   // e.g. 2     — of 4, an N-of-M floor
    string AnchorComponent);  // e.g. "machineGuid"

public static BindVerdict Evaluate(SimilarityScore s, bool anchorMatched, TolerancePolicy p)
{
    if (s.WeightRatio >= 1.0)
        return BindVerdict.SameMachine;                 // nothing changed, no rebind needed

    bool enoughWeight = s.WeightRatio >= p.WeightThreshold;
    bool enoughCount  = s.MatchedCount >= p.MinMatchedCount;

    // Within tolerance: either the weight bar is cleared with the count floor met,
    // or the stable anchor still matches alongside the count floor.
    if ((enoughWeight && enoughCount) || (anchorMatched && enoughCount))
        return BindVerdict.RebindRequired;

    return BindVerdict.NewMachine;                       // too different — count it as a seat request
}

With a 0.70 threshold and a floor of 2, a swapped NIC (15 of 100 lost, 3 of 4 still matching) is RebindRequired; a disk upgrade and a new GPU together might drop to 60 of 100 but still match 2 of 4 with the anchor intact, so the anchor clause carries it. A clone that kept only the OS image matches 1 of 4 — it clears neither the count floor nor, with everything else gone, the weight bar, so it is correctly a NewMachine.

Scoring a presented fingerprint against a bound seat Presented fingerprint 4 weighted components Bound fingerprint stored on the seat Compare weight ratio = 0.85 matched 3 of 4 Exact match weight ratio = 1.0 keep binding, no change Within tolerance ratio ≥ 0.70 and ≥ 2 of 4 drift — needs rebind Below tolerance too much changed new machine → seat request Per-seat cooldown ≤ N rebinds / trailing window? within limit over limit Rebind & heal update stored fp · log event Cooldown blocked refuse · flag for review
The score drives a three-way verdict; a rebind is only applied after the per-seat cooldown confirms this seat has not been drifting too often.

The rebind flow, with a cooldown

A RebindRequired verdict is not an instruction to rebind — it is permission to consider it. Healing drift means overwriting the stored component set with the presented one so the next validation matches cleanly. That same overwrite is how a seat migrates to different hardware if you do it too freely. The gate is a per-seat cooldown: how many drift rebinds this seat has done inside a trailing window.

public sealed record RebindEvent(
    DateTimeOffset At, string FromFingerprintId, string ToFingerprintId,
    double Similarity, RebindReason Reason);

public enum RebindReason { Activation, DriftHealed, ManualOverride }

public async Task<RebindOutcome> ReconcileAsync(
    SeatBinding seat, MachineFingerprint presented, TolerancePolicy policy, CancellationToken ct)
{
    var score   = FingerprintMath.Compare(seat.Current, presented);
    var anchor  = AnchorMatches(seat.Current, presented, policy.AnchorComponent);
    var verdict = FingerprintMath.Evaluate(score, anchor, policy);

    switch (verdict)
    {
        case BindVerdict.SameMachine:
            return RebindOutcome.Matched(seat);                 // identical — nothing to persist
        case BindVerdict.NewMachine:
            return RebindOutcome.Rejected(score);               // caller runs seat admission instead

        case BindVerdict.RebindRequired:
            var since = _clock.UtcNow - _cooldown.Window;       // e.g. 30 days
            int recent = seat.History.Count(h =>
                h.Reason == RebindReason.DriftHealed && h.At >= since);

            if (recent >= _cooldown.MaxRebinds)                 // e.g. 2
                return RebindOutcome.CooldownBlocked(score, recent);

            var evt = new RebindEvent(
                _clock.UtcNow,
                FingerprintId(seat.Current),                    // hash of the component set
                FingerprintId(presented),
                score.WeightRatio,
                RebindReason.DriftHealed);

            var updated = await _store.RebindAsync(seat.SeatId, presented, evt, ct);
            return RebindOutcome.Rebound(updated, evt);
    }
    throw new UnreachableException();
}

The cooldown is what turns tolerance from a liability back into a feature. Ordinary hardware changes are rare — a machine might legitimately rebind once or twice a year — so a limit of two drift rebinds per month never touches a real user. An attacker walking a binding toward new hardware needs a rebind on every step, and hits the wall quickly. A blocked rebind does not silently fail the user into a dead seat; it returns CooldownBlocked, which the deployment surfaces for review (and a genuine case resolves with a ManualOverride, which is logged as exactly that).

Fingerprint history per seat

Every rebind appends to an immutable, per-seat history. It is both the audit trail support reads and the data the engine reasons over.

public sealed record SeatBinding(
    Guid SeatId,
    MachineFingerprint Current,
    IReadOnlyList<RebindEvent> History);   // append-only, newest last

// A cloning walk is low-similarity rebinds in quick succession.
public static bool LooksLikeMigration(SeatBinding seat, TimeSpan window, double suspiciousBelow) =>
    seat.History
        .Where(h => h.At >= DateTimeOffset.UtcNow - window)
        .Count(h => h.Similarity < suspiciousBelow) >= 2;

The history never holds a raw hardware identifier — each FingerprintId is a hash of an already-hashed component set — yet it tells the whole story. A seat that rebinds once, at high similarity, after eight quiet months is a disk upgrade. A seat that rebinds every few days, each time to a fingerprint sharing little with the last, is a license being walked across machines. The first heals; the second trips LooksLikeMigration and is held for a human, well before the raw cooldown count would have stopped it.

When it breaks

Threshold tuning is yours to own. Too loose and two genuinely different machines in the same hardware family can score above the floor and collapse into one seat; too tight and a routine dock change exhausts the meter. Start conservative — a high weight threshold and a real N-of-M floor — and loosen only against observed drift in your own fleet.

Fuzzy matching narrows cloning, it does not end it. A perfect clone that reproduces every signal is, by construction, indistinguishable from the original to any fingerprint scheme; the cooldown and history limit how a clone can behave, not whether a flawless one can exist. Pair node-locking with the economics that make cloning pointless — per-seat accountability, the stale-seat eviction that reclaims idle bindings, and revocation of keys caught being walked.

All of it fails closed. A score below tolerance, a blocked rebind, or a flagged migration denies licensed functionality rather than assuming goodwill. Tolerance exists to keep honest customers working through ordinary hardware change — never to default-open when the answer should be no.

Takeaway

Fuzzy rebinding is what makes node-locking survive the physical world. Keep the fingerprint as weighted components, score a presented set with a weight ratio and an N-of-M floor and an anchor so no single component can forge identity, and let a RebindRequired verdict heal drift in place — but only through a per-seat cooldown, with every rebind written to an append-only history the engine can read for abuse. Done right, the NIC swap and the disk upgrade are invisible to the customer, and the seat walk and the clone run straight into a wall.

Try Nebula.NET

Harden your .NET code in minutes — start with the free edition.