feat(clans): issue lifetime founding keys and connect private key redemption

This commit is contained in:
unimatrix 2026-11-17 12:47:54 +00:00
commit bfc4a0636c

View file

@ -0,0 +1,24 @@
# Original founding keys and private register
The existing organisation key generator issues one lifetime CLAN grant and one
separate COM grant per account. Current accounts are reconciled during panel
startup; successful account registration/login and the private register repair
missing grants idempotently. Used or revoked grants are never reissued.
Available codes are encrypted at rest and exposed only to their authenticated
owner, with private/no-store responses. Used grants retain a receipt without a
reusable secret. The dedicated encryption key persists outside releases at
/home/dunerealms/.config/organisation-keys.key (private mode 0600); an explicit
ORGANISATION_KEY_SECRET or ORGANISATION_KEY_FILE can be configured. Preserve
this key with the private application configuration when backing up or moving
hosts. Never delete or rotate it as part of CI cleanup, or log its contents.
Concurrent starts atomically share the same file and do not replace it.
CLAN redemption upgrades the current linked owner's existing Basic clan to
Original, using the existing key transaction and central charter. A successful
charter write, audit and key consumption commit together. Ownership/version
changes, missing game links, protected institutions or existing charters reject
without consuming the key. Royal status still requires a political decision.
COM codes are issued and privately displayed now; their Company CP redemption
is intentionally deferred to the company module port. No POL keys are issued
by the ordinary account reconciliation.