pq-secrets: a zero-trust secrets service on top of pq-kms (each request authorized by an Aere Identity presentation signed for that exact request, per-secret policy whose non-admin grants can only narrow, the same refusal for every unauthorized caller, every operation a signed AIP-23 secret-access envelope); identity: a presentation optionally signed for one exact request; proof-kinds: secret-access with requestHash; conformance 240 rules, 626 vectors
This commit is contained in:
1 parent
8c7d72c1a7
commit
ad16b1f69b
97 files changed
+4258
-133
No files matched your search
@@ -117,7 +117,7 @@ async function judeca(artifact, input, online) {
|
||||
// status lists and the revocations it was handed. The verifier makes every check it can reach and names every rule that refused.
|
||||
const M = await incarca('identity'); const R = VERIFICATOARE.identity.reguli;
|
||||
if (typeof input.now !== 'string') throw new Error('an identity presentation is judged on the verifier\'s clock: input.now (an RFC 3339 time) is required');
|
||||
const o = { now: input.now }; for (const k of ['audience', 'nonce', 'trustedIssuers', 'statusLists', 'revocations', 'maxAgeS']) if (input[k] !== undefined) o[k] = input[k];
|
||||
const o = { now: input.now }; for (const k of ['audience', 'nonce', 'trustedIssuers', 'statusLists', 'revocations', 'maxAgeS', 'request']) if (input[k] !== undefined) o[k] = input[k];
|
||||
const r = M.verifyPresentation(input.presentation, o);
|
||||
if (r.valid !== (r.rules.length === 0)) throw new Error('the identity verifier refused without naming a rule');
|
||||
for (const s of r.rules) { if (!R[s]) throw new Error('the identity verifier named a rule this suite does not map: ' + s); pica(acc, R[s][1], R[s][0], r.rows.filter((x) => x.pass === false && x.rule === s).map((x) => x.name + ': ' + x.detail).join('; ')); }
|
||||
@@ -232,7 +232,7 @@ async function judeca(artifact, input, online) {
|
||||
const M = await incarca('compliance'); const R = VERIFICATOARE.compliance.reguli;
|
||||
if (typeof input.now !== 'string') throw new Error('a compliance judgement is made on the verifier\'s clock: input.now (an RFC 3339 time) is required');
|
||||
if (typeof input.audience !== 'string' || typeof input.nonce !== 'string') throw new Error('a compliance judgement needs the verifier\'s audience and nonce (input.audience, input.nonce)');
|
||||
const o = { audience: input.audience, nonce: input.nonce, now: input.now }; for (const k of ['statusLists', 'revocations']) if (input[k] !== undefined) o[k] = input[k];
|
||||
const o = { audience: input.audience, nonce: input.nonce, now: input.now }; for (const k of ['statusLists', 'revocations', 'request']) if (input[k] !== undefined) o[k] = input[k];
|
||||
const r = M.checkCompliance(input.presentation, input.policy, o);
|
||||
if (r.compliant !== (r.rules.length === 0)) throw new Error('the compliance verifier refused without naming a rule');
|
||||
for (const s of r.rules) { if (!R[s]) throw new Error('the compliance verifier named a rule this suite does not map: ' + s); pica(acc, R[s][1], R[s][0], r.rows.filter((x) => !x.pass && x.rule === s).map((x) => x.detail).join('; ')); }
|
||||
@@ -240,7 +240,7 @@ async function judeca(artifact, input, online) {
|
||||
if (!r.rules.includes('presentation')) trece(acc, 'authenticity', 'the presentation is valid for this verifier: judged by the identity verifier with the policy\'s trusted issuers, this audience and nonce (the credential and the presentation signed Ed25519 and ML-DSA-65, both)');
|
||||
// what the identity verifier inside left unjudged: a status the policy waived and nobody read is a claim not checked (PARTIAL)
|
||||
const NEJ = NEJUDECATE_COMPLIANCE;
|
||||
for (const c of r.unjudged) { if (!(c in NEJ)) throw new Error('the compliance verifier left unjudged for a cause this suite does not map: ' + c); if (NEJ[c]) nemasurat(acc, NEJ[c][0], NEJ[c][1], 'the credential names a status list and the verifier read none; the policy waived the status (requireStatus false)'); }
|
||||
for (const c of r.unjudged) { if (!(c in NEJ)) throw new Error('the compliance verifier left unjudged for a cause this suite does not map: ' + c); if (NEJ[c]) nemasurat(acc, NEJ[c][0], NEJ[c][1], c === 'request' ? 'the presentation commits to a request and the verifier gave none to compare it with' : 'the credential names a status list and the verifier read none; the policy waived the status (requireStatus false)'); }
|
||||
for (const l of ['anchoring', 'finality']) nemasurat(acc, l, 'not-judged', 'a compliance judgement is anchored by notarizing its record (an AIP-23 compliance envelope without personal data), judged as the artifact `envelope`');
|
||||
} else if (artifact.startsWith('dataset-')) {
|
||||
const M = await incarca('baza'); let r;
|
||||
|
||||
Reference in new issue
Block a user