identity: verify and comply as a service can judge (--json, --at), subject in the result, refused input exits 2
- verify: --at <RFC 3339 UTC> judges on that clock (the verifier's clock in any case), so a verdict given at one moment can be checked again later with the same result; a broken --trust-issuer or --max-age exits 2 with the reason instead of failing without a verdict; the JSON result names the subject (type, credential, issuer, holder, presenter, delegations) when no check failed - comply: --json [--with-record] prints the result and the record in one object; with --at the record's time is the same, so the same command gives the same record byte for byte; a refused policy exits 2 with its reason - Aere Cloud runs this command line unmodified behind POST /v1/identity/verify and POST /v1/compliance/check Tests: identity 43/43, negative control 46/46.
This commit is contained in:
1 parent
8f5f0bd00d
commit
aec0ccbead
3 files changed
+41
-11
No files matched your search
+11
-1
@@ -19,7 +19,11 @@ node identity-cli.mjs verify --presentation presentation.json --audience https:/
|
||||
```
|
||||
|
||||
`verify` prints one line per check (`ok`, `FAIL`, or `--` for not judged, with the reason) and `VALID` or `INVALID`; it exits 0 on
|
||||
VALID, 1 on INVALID, 2 on a usage error. The claims it returns are the plain ones plus the ones the holder chose to show.
|
||||
VALID, 1 on INVALID, 2 on a usage error (a broken `--trust-issuer` or `--max-age` included). The claims it returns are the plain ones
|
||||
plus the ones the holder chose to show. `--json` prints the whole result as one object, with `subject` (type, credential, issuer,
|
||||
holder, presenter, number of delegations) when no check failed. `--at <RFC 3339 UTC time>` judges on that clock instead of now: the
|
||||
clock is the verifier's in any case, and a verdict given at one moment (by a service, for instance) can then be checked again later
|
||||
with the same result.
|
||||
|
||||
## What is signed, and by whom
|
||||
|
||||
@@ -94,6 +98,12 @@ node identity-cli.mjs comply --presentation p.json --policy policy.json --audien
|
||||
--status-list list.json --record record.json [--pseudonym-key-file key]
|
||||
```
|
||||
|
||||
`comply --json [--with-record] [--at T]` prints the result and, with `--with-record`, the record in one object; with `--at` the
|
||||
record's time is T too, so the same command gives the same record byte for byte. It exits 0 compliant, 1 not compliant, 2 when the
|
||||
policy or an option is refused (with the reason). Aere Cloud runs this command line, unmodified, behind `POST /v1/identity/verify`
|
||||
and `POST /v1/compliance/check`, and each answer names the SHA-256 of the files that judged and the command, with `--at`, that
|
||||
reproduces it.
|
||||
|
||||
The record (`complianceEnvelope`) is an AIP-23 `compliance` envelope that carries no personal data: the policy's hash, the result, the
|
||||
digest of the presentation, and a pseudonym of the holder bound to this verifier. Without `--pseudonym-key-file` the pseudonym is a
|
||||
SHA-256 over the holder's id and the audience, which anyone who knows both can recompute (it keeps the id out of the record, it does
|
||||
|
||||
Reference in new issue
Block a user