Skip to content

Fail closed when receipt verification is unavailable#1

Open
manuelsampedro1 wants to merge 1 commit into
permission-protocol:mainfrom
manuelsampedro1:codex/verify-fail-closed
Open

Fail closed when receipt verification is unavailable#1
manuelsampedro1 wants to merge 1 commit into
permission-protocol:mainfrom
manuelsampedro1:codex/verify-fail-closed

Conversation

@manuelsampedro1
Copy link
Copy Markdown

Summary

  • make verify() require an authoritative /api/v1/receipts/verify response instead of swallowing API errors
  • default missing valid fields in verification responses to false
  • add regression coverage for verification-service failures and stale fetched receipt metadata

Why

verify() fetched a receipt first and then swallowed APIError from the verification endpoint. If the fetched receipt object already had valid=True, callers could receive a verified-looking receipt even though the signature/scope verification call failed. Verification should fail closed.

Validation

  • python3 -m pytest -q
  • git diff --check

Related to permission-protocol/deploy-gate#36 / permission-protocol/deploy-gate#49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant