Menu

Enforce the license lifecycle in Postgres
πŸ“°

Enforce the license lifecycle in Postgres

DEV Community: postgresΒ·Zero HeartbeatΒ·6 days ago
#GMXJ9eKM
#devtopostgresql#devto#dev#status#revoked
Long article (1599 words) β€” no AI summary yet.
Reading 0:00
15s threshold

A support ticket that should be impossible: a customer whose license you revoked three weeks ago for a chargeback is activating seats again. The signature verifies, the key is in the database, and its status column says active . Someone β€” or something β€” set it back. You revoked it; you have the audit row that says so; and yet here it is, live.

Trace it and the cause is mundane. A renewal job read the key, saw a paid invoice, and wrote status = 'active' without checking what the status was . For a key mid-renewal that is correct. For a revoked key it is a resurrection. The bug is not in the revoke path and not in the renewal path β€” each is fine alone. The bug is that nothing in the system knew that revoked is terminal , so no transition out of it is ever legal.

A license is not a flag. It is a small state machine β€” issued , active , suspended , revoked , expired β€” with a fixed set of legal edges between those states. The real question is where that machine lives.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.