device-identity: what a machine is, as a chain of signed statements checked offline (manufacturer credential, owners, firmware attestation, anchored on 28001; 175/175 with the AIP-23 verifier); conformance: the device-bundle vectors and the rules that cover them; control-plane console; README
This commit is contained in:
1 parent
5fb38c5d0b
commit
54028e07f4
215 files changed
+77436
-56
No files matched your search
@@ -25,6 +25,7 @@ export const MODULE = {
|
||||
arbore: { url: new URL('../verify-layer/jurnal-arbore.mjs', import.meta.url), env: 'AERE_CONF_MODUL_ARBORE' },
|
||||
ledger: { url: new URL('../agents/agent-ledger.mjs', import.meta.url), env: 'AERE_CONF_MODUL_LEDGER' },
|
||||
identity: { url: new URL('../identity/identity.mjs', import.meta.url), env: 'AERE_CONF_MODUL_IDENTITY' },
|
||||
device: { url: new URL('../device-identity/device.mjs', import.meta.url), env: 'AERE_CONF_MODUL_DEVICE' },
|
||||
};
|
||||
export const caleModul = (k) => process.env[MODULE[k].env] || fileURLToPath(MODULE[k].url);
|
||||
export const incarca = (k) => import(pathToFileURL(caleModul(k)).href);
|
||||
@@ -188,6 +189,58 @@ export const VERIFICATOARE = {
|
||||
'delegation-audience': ['identity.delegation-audience', I, 'the scope of every link covers the audience'],
|
||||
'delegation-revoked': ['identity.delegation-revoked', I, 'no revocation handed to the verifier, signed by the giver of a link or by the holder, has taken effect'],
|
||||
unreadable: ['identity.unreadable', I, 'every field a check reads can be read (a time is an RFC 3339 UTC time, a hash input is JSON)'] } },
|
||||
// a device bundle (the manufacturer's credential for a device key, a firmware release, the ownership chain, the owner's
|
||||
// authorization, the device's fresh attestation and its AIP-23 envelope), judged with what the verifier brings: its clock, its nonce
|
||||
// and audience, the manufacturers it trusts, the recall lists, the firmware policies and the status records it read, its own
|
||||
// reading of the notarized envelope
|
||||
device: { artifacts: ['device-bundle'], sursa: 'device', reguli: {
|
||||
form: ['device.form', I, 'the file is a device bundle'],
|
||||
'manufacture-form': ['device.manufacture-form', I, 'the manufacture credential is a DeviceManufacture credential with the device id, the device key, the model and the serial in the clear'],
|
||||
'manufacturer-id': ['device.manufacturer-id', AU, 'the manufacturer id is the id derived from the manufacturer keys in the credential'],
|
||||
'manufacture-holder': ['device.manufacture-holder', AU, 'the manufacture credential is held by the manufacturer itself: ownership leaves it only by a signed transfer'],
|
||||
'manufacture-signature': ['device.manufacture-signature', AU, 'the manufacture credential is signed by the manufacturer, Ed25519 and ML-DSA-65, both (each signature in canonical base64: the same bytes in another text are not that signature; the link is exactly its statement and its signature, and the signature object exactly its members: a member more is another text of the same signed statement, and is refused)'],
|
||||
'manufacturer-trusted': ['device.manufacturer-trusted', AU, 'the manufacturer is one of the manufacturers the verifier trusts'],
|
||||
'manufacture-window': ['device.manufacture-window', I, 'the manufacture credential is valid on the verifier\'s clock'],
|
||||
'manufacture-status-list': ['device.manufacture-status-list', I, 'a current status list of the manufacturer, handed to the verifier, can be read at the credential\'s index'],
|
||||
'manufacture-revoked': ['device.manufacture-revoked', I, 'no current status list of the manufacturer recalls the manufacture credential'],
|
||||
'device-key': ['device.device-key', AU, 'the device key the manufacturer names is a canonical ML-DSA-65 public key'],
|
||||
'device-id': ['device.device-id', AU, 'the device id is the id derived from the device key'],
|
||||
'firmware-form': ['device.firmware-form', I, 'the firmware release has a model, a version, a sequence number and the digest of the image'],
|
||||
'firmware-signer': ['device.firmware-signer', AU, 'the release is signed by the manufacturer of the device, whose id is the id of its keys'],
|
||||
'firmware-signature': ['device.firmware-signature', AU, 'the release is signed by who released it, Ed25519 and ML-DSA-65, both (each signature in canonical base64: the same bytes in another text are not that signature; the link is exactly its statement and its signature, and the signature object exactly its members: a member more is another text of the same signed statement, and is refused)'],
|
||||
'firmware-model': ['device.firmware-model', I, 'the release is for the model of the device'],
|
||||
'firmware-retracted': ['device.firmware-retracted', I, 'no current firmware policy of the manufacturer retracts the release'],
|
||||
'firmware-rollback': ['device.firmware-rollback', I, 'the sequence number of the release is at or above the highest floor of the manufacturer\'s current firmware policies'],
|
||||
'firmware-software': ['device.firmware-software', I, 'the attestation handed is a Proof of Software attestation that hashes to its statementHash, is the one the release names, and lists the image digest'],
|
||||
'chain-length': ['device.chain-length', I, 'the ownership chain has at most sixty-four transfers'],
|
||||
'transfer-form': ['device.transfer-form', I, 'every link of the ownership chain is a transfer'],
|
||||
'transfer-device': ['device.transfer-device', I, 'every transfer is a transfer of this device'],
|
||||
'transfer-ids': ['device.transfer-ids', AU, 'in every transfer, the giver and the recipient carry the ids derived from their keys'],
|
||||
'transfer-from': ['device.transfer-from', AU, 'the first transfer is given by the manufacturer, every other by the recipient of the transfer before'],
|
||||
'transfer-prev': ['device.transfer-prev', I, 'every transfer carries its position and the hash of the link before it'],
|
||||
'transfer-signature': ['device.transfer-signature', AU, 'every transfer is signed by who gave it, Ed25519 and ML-DSA-65, both (each signature in canonical base64: the same bytes in another text are not that signature; the link is exactly its statement and its signature, and the signature object exactly its members: a member more is another text of the same signed statement, and is refused)'],
|
||||
'transfer-time': ['device.transfer-time', I, 'transfer times do not go backwards and none is in the verifier\'s future'],
|
||||
'authorization-form': ['device.authorization-form', I, 'the authorization names a device, an ownership head and a sorted list of action names'],
|
||||
'authorization-device': ['device.authorization-device', I, 'the authorization is for this device'],
|
||||
'authorization-owner': ['device.authorization-owner', AU, 'the authorization is granted by the current owner, whose id is the id of its keys'],
|
||||
'authorization-ownership': ['device.authorization-ownership', I, 'the authorization is given under the current ownership head'],
|
||||
'authorization-signature': ['device.authorization-signature', AU, 'the authorization is signed by who granted it, Ed25519 and ML-DSA-65, both (each signature in canonical base64: the same bytes in another text are not that signature; the link is exactly its statement and its signature, and the signature object exactly its members: a member more is another text of the same signed statement, and is refused)'],
|
||||
'authorization-window': ['device.authorization-window', I, 'the authorization is valid on the verifier\'s clock and when the device attested'],
|
||||
'authorization-action': ['device.authorization-action', I, 'the action the device asks for is one the owner granted'],
|
||||
'status-retired': ['device.status-retired', I, 'no status record read retires the device: of the manufacturer (never lifted), or of the current owner of the chain shown under any ownership head or none (it holds while the chain shown says that owner owns the device)'],
|
||||
'status-suspended': ['device.status-suspended', I, 'the record with the highest number read of the manufacturer, and of the current owner of the chain shown under any ownership head or none, does not suspend the device (of two with one number the stricter holds)'],
|
||||
'attestation-form': ['device.attestation-form', I, 'the attestation carries a nonce, an audience, a time, the firmware it runs, an ownership head and an action'],
|
||||
'attestation-key': ['device.attestation-key', AU, 'the key in the attestation is a canonical ML-DSA-65 public key and the device id is derived from it'],
|
||||
'attestation-device': ['device.attestation-device', AU, 'the attestation is by the device, and with the key, that the manufacturer certified'],
|
||||
'attestation-signature': ['device.attestation-signature', AU, 'the attestation is signed with the device key (ML-DSA-65), the signature in canonical base64; the link is exactly its statement and its signature, and the signature object exactly its members: a member more is another text of the same signed statement, and is refused'],
|
||||
audience: ['device.audience', I, 'the attestation was made for this verifier'],
|
||||
nonce: ['device.nonce', I, 'the attestation carries the nonce this verifier gave'],
|
||||
freshness: ['device.freshness', I, 'the attestation is dated no further ahead of the verifier\'s clock than its tolerance, and no longer before it than the allowed age'],
|
||||
'attestation-firmware': ['device.attestation-firmware', I, 'the firmware the device says it runs is the release shown (digest and sequence)'],
|
||||
'attestation-ownership': ['device.attestation-ownership', I, 'the attestation names the current ownership head'],
|
||||
'witness-envelope': ['device.witness-envelope', I, 'the AIP-23 envelope given is the envelope of a device attestation, hashes to its statementHash and commits to this device and this attestation'],
|
||||
'witness-time': ['device.witness-time', I, 'the attestation is not dated after the moment the verifier read its envelope on the chain (of several readings, the earliest)'],
|
||||
unreadable: ['device.unreadable', I, 'every field a check reads can be read (a time is an RFC 3339 UTC time, a hash input is JSON)'] } },
|
||||
};
|
||||
/**
|
||||
* The FAILED sites of verify-proof's `finality` level, classified. `fragment` must appear on exactly one such source line; `re`
|
||||
@@ -211,6 +264,24 @@ export const FINALITY_SITES = [
|
||||
*/
|
||||
export const NEJUDECATE_IDENTITY = { 'issuer-trust': ['authenticity', 'not-supplied'], audience: ['integrity', 'not-supplied'], nonce: ['integrity', 'not-supplied'], 'status-unread': ['integrity', 'claim-not-checked'],
|
||||
'status-none': null, 'revocation-ignored': null, 'revocations-none': null };
|
||||
/**
|
||||
* What the device verifier leaves UNJUDGED, by the cause it names -> [level, cause of the suite], or null when nothing the artifact
|
||||
* claims is left unmeasured. A link that is not in the bundle, something of the verifier that was not brought (its nonce, its
|
||||
* audience, the manufacturers it trusts) and a registry nobody read (the recall list, the firmware policy, the status records, the
|
||||
* notarization the envelope claims) leave the verdict PARTIAL; so does a firmware policy, a recall list or a status record that is
|
||||
* signed by who may give it and cannot be read, a status record of ANOTHER manufacturer the verifier trusts (not applied, and not
|
||||
* judged), anything handed to the verifier in another shape than the one it reads or beyond the number of things it judges, and a
|
||||
* hardware root, which this verifier cannot check. Not PARTIAL, and NAMED by the verifier (the adapter puts them in the reason of the
|
||||
* integrity level): a credential that names no recall list; a status record of somebody who is not the manufacturer, the current
|
||||
* owner or an owner before it; a status record of a PREVIOUS owner, which does not bind the owner of now; a status record dated in the
|
||||
* verifier's future, which is not in effect yet.
|
||||
* The adapter requires that the non-null causes are exactly the ones the module itself declares as keeping the verdict from VALID.
|
||||
*/
|
||||
export const NEJUDECATE_DEVICE = { 'manufacture-missing': ['integrity', 'not-supplied'], 'manufacturer-trust': ['authenticity', 'not-supplied'], 'manufacture-status-none': null, 'manufacture-status-unread': ['integrity', 'claim-not-checked'],
|
||||
'firmware-missing': ['integrity', 'not-supplied'], 'firmware-policy-unread': ['integrity', 'claim-not-checked'], 'software-unread': ['integrity', 'claim-not-checked'], 'ownership-unrooted': ['integrity', 'not-supplied'],
|
||||
'authorization-missing': ['integrity', 'not-supplied'], 'status-unread': ['integrity', 'claim-not-checked'], 'status-other-manufacturer': ['integrity', 'claim-not-checked'], 'status-ignored': null, 'status-prior-ownership': null, 'status-future': null,
|
||||
'attestation-missing': ['integrity', 'not-supplied'], audience: ['integrity', 'not-supplied'], nonce: ['integrity', 'not-supplied'],
|
||||
'hardware-root': ['authenticity', 'unmeasurable'], 'witness-unread': ['anchoring', 'claim-not-checked'] };
|
||||
/** Verifiers published beside these that the suite does NOT enrol yet, with the pattern that counts their refusal sites. */
|
||||
export const NEINROLATE = [
|
||||
{ name: 'identity: SD-JWT (RFC 9901)', files: [new URL('../identity/sdjwt.mjs', import.meta.url)], re: /\brefuz\(/g, why: 'its refusals carry texts, not rule ids (counted: the calls of its refusal helper); it is checked by its own probe, on the RFC 9901 vectors' },
|
||||
|
||||
Reference in new issue
Block a user