Skip to content

Commit e7c3004

Browse files
ArkForgeclaude
andcommitted
spec(api): add API Response Filtering section — v2.1.1
Implementations MAY filter sensitive fields from public API responses: parties, certification_fee amounts, receipt URLs, parsed_fields. Owner-only endpoints MAY expose full proof after fingerprint ownership check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7c6e490 commit e7c3004

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

SPEC.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,25 @@ See [`test-vectors.json`](test-vectors.json) for machine-readable test cases.
479479

480480
Implementers MUST pass all test vectors to claim conformance.
481481

482-
## 9. Versioning
482+
## 9. API Response Filtering
483+
484+
Implementations MAY filter sensitive fields from public API responses while keeping the internal proof structure intact.
485+
486+
When a proof is returned via an **unauthenticated** endpoint:
487+
488+
- `parties` (buyer_fingerprint, seller, agent_identity) SHOULD be omitted
489+
- `certification_fee` amounts and receipt URLs SHOULD be omitted
490+
- `buyer_reputation_score` and `buyer_profile_url` SHOULD be omitted
491+
- `provider_payment`: only `type`, `receipt_content_hash`, and `verification_status` SHOULD be retained; `receipt_url` and `parsed_fields` SHOULD be omitted
492+
493+
When a proof is returned via an **authenticated owner-only** endpoint:
494+
495+
- All fields MAY be included
496+
- Ownership SHOULD be verified by comparing `sha256(api_key)` against `parties.buyer_fingerprint`
497+
498+
**Note:** these filtering rules apply to API responses only. The stored proof structure is not affected; `verify_proof_integrity()` always operates on the full internal proof.
499+
500+
## 10. Versioning
483501

484502
This spec follows [Semantic Versioning](https://semver.org/).
485503

0 commit comments

Comments
 (0)