aqta-verify-receipt 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -18
- package/dist/index.d.ts +15 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,172 @@
|
|
|
1
1
|
# aqta-verify-receipt
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/aqta-verify-receipt)
|
|
4
|
+
[](https://github.com/Aqta-ai/attestation-spec/actions/workflows/test.yml)
|
|
5
|
+
[](https://github.com/Aqta-ai/attestation-spec/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
Independent verifier for [AqtaCore](https://app.aqta.ai) attestation
|
|
8
|
+
receipts. Checks the Ed25519 signature on an enforcement-attestation
|
|
9
|
+
receipt using only the published public key: **no dependency on Aqta's
|
|
10
|
+
servers**.
|
|
6
11
|
|
|
7
12
|
## Why this exists
|
|
8
13
|
|
|
9
14
|
AqtaCore returns a signed receipt with every AI enforcement decision.
|
|
10
|
-
Regulators, auditors, and internal compliance teams need to verify
|
|
11
|
-
receipts independently, without trusting the issuer. This
|
|
12
|
-
reference implementation of that verifier, maintained
|
|
15
|
+
Regulators, auditors, and internal compliance teams need to verify
|
|
16
|
+
those receipts independently, without trusting the issuer. This
|
|
17
|
+
package is the reference implementation of that verifier, maintained
|
|
18
|
+
by Aqta under the open
|
|
13
19
|
[ATTESTATION-v1](https://github.com/Aqta-ai/attestation-spec/blob/main/spec/ATTESTATION-v1.md)
|
|
14
20
|
format specification.
|
|
15
21
|
|
|
22
|
+
This verifier is the same code path AqtaCore uses internally to
|
|
23
|
+
validate its own production receipts and to power the receipt-
|
|
24
|
+
verification endpoint exposed to customer audit teams.
|
|
25
|
+
|
|
16
26
|
## Install
|
|
17
27
|
|
|
18
28
|
```bash
|
|
19
29
|
npm install aqta-verify-receipt
|
|
20
30
|
```
|
|
21
31
|
|
|
32
|
+
Two dependencies: `tweetnacl` and `tweetnacl-util`, for constant-time
|
|
33
|
+
Ed25519 verification.
|
|
34
|
+
|
|
22
35
|
## Usage
|
|
23
36
|
|
|
24
37
|
```ts
|
|
25
38
|
import { verifyReceipt, fetchPublishedPublicKey } from 'aqta-verify-receipt';
|
|
26
39
|
|
|
27
|
-
//
|
|
40
|
+
// ONE-TIME, on first use of this library in your environment.
|
|
28
41
|
const trustedPublicKey = await fetchPublishedPublicKey();
|
|
42
|
+
saveToConfig(trustedPublicKey); // file, database, KMS, secret manager
|
|
29
43
|
|
|
30
|
-
//
|
|
31
|
-
const
|
|
44
|
+
// EVERY VERIFICATION: load the pinned value, do not re-fetch.
|
|
45
|
+
const pinned = loadFromConfig();
|
|
46
|
+
const result = verifyReceipt(receipt, { trustedPublicKey: pinned });
|
|
32
47
|
|
|
33
48
|
if (!result.valid) {
|
|
34
49
|
throw new Error(`Receipt invalid: ${result.reason}`);
|
|
35
50
|
}
|
|
36
|
-
console.log('Receipt verified without contacting Aqta.');
|
|
37
51
|
```
|
|
38
52
|
|
|
53
|
+
## ⚠️ Pin the public key. Do not re-fetch on every call.
|
|
54
|
+
|
|
55
|
+
`fetchPublishedPublicKey()` performs a live HTTPS fetch. Calling it
|
|
56
|
+
inside a verification loop collapses the trust model back to "trust the
|
|
57
|
+
issuer's server right now", which is exactly what this format is
|
|
58
|
+
designed to avoid.
|
|
59
|
+
|
|
60
|
+
**The correct pattern is:**
|
|
61
|
+
|
|
62
|
+
1. Fetch once, on first use.
|
|
63
|
+
2. Persist the result (configuration, database, KMS, secret manager).
|
|
64
|
+
3. Pass the persisted value as `trustedPublicKey` on every verification
|
|
65
|
+
thereafter.
|
|
66
|
+
4. Rotate only when you receive a documented key-rotation notice via a
|
|
67
|
+
channel you already trust.
|
|
68
|
+
|
|
69
|
+
Re-fetching the key on every verification is a misuse.
|
|
70
|
+
|
|
39
71
|
## API
|
|
40
72
|
|
|
41
73
|
### `verifyReceipt(receipt, options?) → { valid, reason? }`
|
|
42
74
|
|
|
43
|
-
Verifies an attestation receipt against the declared (or pinned)
|
|
75
|
+
Verifies an attestation receipt against the declared (or pinned)
|
|
76
|
+
public key.
|
|
44
77
|
|
|
45
78
|
Options:
|
|
46
|
-
- `trustedPublicKey`: base64url public key. If set, the receipt's
|
|
47
|
-
field must match byte for byte. Strongly recommended
|
|
48
|
-
|
|
49
|
-
|
|
79
|
+
- `trustedPublicKey`: base64url public key. If set, the receipt's
|
|
80
|
+
`public_key` field must match byte for byte. **Strongly recommended
|
|
81
|
+
for production.**
|
|
82
|
+
- `strictFields` (default `true`): any unknown top-level field causes
|
|
83
|
+
rejection, per ATTESTATION-v1 §4. See "Forward compatibility" below.
|
|
84
|
+
|
|
85
|
+
Returns `{ valid: boolean, reason?: string }`. **Never throws.**
|
|
50
86
|
|
|
51
87
|
### `fetchPublishedPublicKey(url?) → Promise<string>`
|
|
52
88
|
|
|
53
89
|
Fetches the AqtaCore public key from
|
|
54
|
-
`https://app.aqta.ai/security/pubkey.txt`. Pass a custom URL for
|
|
55
|
-
issuers.
|
|
90
|
+
`https://app.aqta.ai/security/pubkey.txt`. Pass a custom URL for
|
|
91
|
+
self-hosted issuers. **Pin the result; see the warning above.**
|
|
92
|
+
|
|
93
|
+
## Forward compatibility
|
|
94
|
+
|
|
95
|
+
`strictFields: true` (the default) rejects any receipt containing a
|
|
96
|
+
field not defined in the version of the spec this library was built
|
|
97
|
+
against. This is the correct behaviour for a security-critical
|
|
98
|
+
verifier: a receipt containing an unknown field may carry
|
|
99
|
+
attacker-controlled metadata that downstream systems should not treat
|
|
100
|
+
as signed evidence.
|
|
101
|
+
|
|
102
|
+
ATTESTATION-v1 versioning policy:
|
|
103
|
+
|
|
104
|
+
- **Patch** versions of the spec (v1.0.x): clarifications only, no
|
|
105
|
+
field changes. Your verifier keeps working.
|
|
106
|
+
- **Minor** versions of the spec (v1.x.0): may add new optional
|
|
107
|
+
fields. A v1.0-era verifier will reject v1.1 receipts under
|
|
108
|
+
`strictFields: true`. Upgrade the verifier, or set
|
|
109
|
+
`strictFields: false` to let forward receipts through the signature
|
|
110
|
+
check. Cryptographic verification still holds in both cases; only
|
|
111
|
+
the structural-allowlist check is relaxed.
|
|
112
|
+
- **Major** versions (vN.0, N ≥ 2): breaking changes; upgrade
|
|
113
|
+
required.
|
|
114
|
+
|
|
115
|
+
Set `strictFields: false` only if your compliance team has reviewed
|
|
116
|
+
the forward-compatibility trade-off.
|
|
117
|
+
|
|
118
|
+
## Test vectors
|
|
119
|
+
|
|
120
|
+
A conformance suite for this library (6 valid + 8 invalid receipts,
|
|
121
|
+
each documenting one specific behaviour) lives in the spec repository:
|
|
122
|
+
|
|
123
|
+
- Vectors: [`test-vectors/`](https://github.com/Aqta-ai/attestation-spec/tree/main/test-vectors)
|
|
124
|
+
- Reproducible generator:
|
|
125
|
+
[`test-vectors/generate.py`](https://github.com/Aqta-ai/attestation-spec/blob/main/test-vectors/generate.py)
|
|
126
|
+
|
|
127
|
+
If your verifier disagrees with any vector, please file an issue on
|
|
128
|
+
[Aqta-ai/attestation-spec](https://github.com/Aqta-ai/attestation-spec/issues).
|
|
129
|
+
|
|
130
|
+
### Quick self-test
|
|
131
|
+
|
|
132
|
+
To confirm your environment and this library behave as the spec
|
|
133
|
+
intends, run all 14 vectors in one command after installing:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
git clone https://github.com/Aqta-ai/attestation-spec.git
|
|
137
|
+
cd attestation-spec
|
|
138
|
+
npm install aqta-verify-receipt
|
|
139
|
+
node - <<'JS'
|
|
140
|
+
const fs = require('node:fs');
|
|
141
|
+
const path = require('node:path');
|
|
142
|
+
const { verifyReceipt } = require('aqta-verify-receipt');
|
|
143
|
+
|
|
144
|
+
const TRUSTED = 'alWzEnrA_z9McN9z_MFfQCnH9mVgOwRZ26wrI7oix4E';
|
|
145
|
+
|
|
146
|
+
for (const sub of ['valid', 'invalid']) {
|
|
147
|
+
const shouldPass = sub === 'valid';
|
|
148
|
+
for (const name of fs.readdirSync(path.join('test-vectors', sub)).sort()) {
|
|
149
|
+
const r = JSON.parse(fs.readFileSync(path.join('test-vectors', sub, name), 'utf8'));
|
|
150
|
+
const { valid } = verifyReceipt(r, { trustedPublicKey: TRUSTED });
|
|
151
|
+
if (valid !== shouldPass) throw new Error(`${sub}/${name} behaved wrong`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
console.log('all 14 vectors behave as specified');
|
|
155
|
+
JS
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
A clean run prints `all 14 vectors behave as specified` and exits 0.
|
|
56
159
|
|
|
57
160
|
## Receipt format
|
|
58
161
|
|
|
59
162
|
See [ATTESTATION-v1](https://github.com/Aqta-ai/attestation-spec/blob/main/spec/ATTESTATION-v1.md).
|
|
60
163
|
|
|
164
|
+
## Security issues
|
|
165
|
+
|
|
166
|
+
Please do not open public GitHub issues for cryptographic
|
|
167
|
+
vulnerabilities. See
|
|
168
|
+
[SECURITY.md](https://github.com/Aqta-ai/attestation-spec/blob/main/SECURITY.md).
|
|
169
|
+
|
|
61
170
|
## Licence
|
|
62
171
|
|
|
63
|
-
Apache-2.0.
|
|
172
|
+
Apache-2.0.
|
package/dist/index.d.ts
CHANGED
|
@@ -63,8 +63,21 @@ export declare function verifyReceipt(receipt: unknown, options?: VerifyOptions)
|
|
|
63
63
|
* Fetch the AqtaCore public key from the published URL and return it as a
|
|
64
64
|
* base64url string ready to pass to `verifyReceipt` as `trustedPublicKey`.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* **PIN THE RESULT.** This helper performs a live HTTPS fetch. Calling it
|
|
67
|
+
* inside a verification loop collapses the trust model back to "trust the
|
|
68
|
+
* issuer's server right now", which is exactly what the attestation format
|
|
69
|
+
* is designed to avoid.
|
|
70
|
+
*
|
|
71
|
+
* Correct usage:
|
|
72
|
+
* 1. Call this once on first use.
|
|
73
|
+
* 2. Persist the returned string (configuration file, database, KMS,
|
|
74
|
+
* environment variable, secret manager).
|
|
75
|
+
* 3. Pass the persisted value as `trustedPublicKey` on every subsequent
|
|
76
|
+
* verification.
|
|
77
|
+
* 4. Rotate only in response to a documented key-rotation notice
|
|
78
|
+
* received via a channel you already trust.
|
|
79
|
+
*
|
|
80
|
+
* Re-fetching the key on every verification is a misuse.
|
|
68
81
|
*/
|
|
69
82
|
export declare function fetchPublishedPublicKey(url?: string): Promise<string>;
|
|
70
83
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,aAAkB,GAC1B,YAAY,CAuEd;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,aAAkB,GAC1B,YAAY,CAuEd;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,SAA4C,GAC9C,OAAO,CAAC,MAAM,CAAC,CAMjB"}
|
package/dist/index.js
CHANGED
|
@@ -162,8 +162,21 @@ function verifyReceipt(receipt, options = {}) {
|
|
|
162
162
|
* Fetch the AqtaCore public key from the published URL and return it as a
|
|
163
163
|
* base64url string ready to pass to `verifyReceipt` as `trustedPublicKey`.
|
|
164
164
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
165
|
+
* **PIN THE RESULT.** This helper performs a live HTTPS fetch. Calling it
|
|
166
|
+
* inside a verification loop collapses the trust model back to "trust the
|
|
167
|
+
* issuer's server right now", which is exactly what the attestation format
|
|
168
|
+
* is designed to avoid.
|
|
169
|
+
*
|
|
170
|
+
* Correct usage:
|
|
171
|
+
* 1. Call this once on first use.
|
|
172
|
+
* 2. Persist the returned string (configuration file, database, KMS,
|
|
173
|
+
* environment variable, secret manager).
|
|
174
|
+
* 3. Pass the persisted value as `trustedPublicKey` on every subsequent
|
|
175
|
+
* verification.
|
|
176
|
+
* 4. Rotate only in response to a documented key-rotation notice
|
|
177
|
+
* received via a channel you already trust.
|
|
178
|
+
*
|
|
179
|
+
* Re-fetching the key on every verification is a misuse.
|
|
167
180
|
*/
|
|
168
181
|
async function fetchPublishedPublicKey(url = 'https://app.aqta.ai/security/pubkey.txt') {
|
|
169
182
|
const res = await fetch(url);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;AA8HH,sCA0EC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;AA8HH,sCA0EC;AAsBD,0DAQC;AApOD,0DAA6B;AAC7B,oEAAsC;AA0CtC,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC;IACpD,SAAS;IACT,SAAS;IACT,YAAY;IACZ,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC;IACnD,GAAG;IACH,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,cAAc;IACd,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,oBAAoB;IACpB,WAAW;IACX,YAAY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C;AACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aqta-verify-receipt",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Independent verifier for AqtaCore attestation receipts. Verifies the Ed25519 signature on an attestation receipt without trusting any third-party server. Reference implementation of ATTESTATION-v1.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|