Skip to content

Add iOS App Attest verifier and refresh endpoints#21

Merged
aliXsed merged 4 commits into
mainfrom
feat/ios-app-attest-verifier
Jul 17, 2026
Merged

Add iOS App Attest verifier and refresh endpoints#21
aliXsed merged 4 commits into
mainfrom
feat/ios-app-attest-verifier

Conversation

@aliXsed

@aliXsed aliXsed commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Local Apple App Attest verification (CBOR attestation object, X.509 chain to the bundled Apple root, nonce OID / keyId / rpIdHash / counter / AAGUID) with clock-injected cert validity for fixtures and production.
  • POST /v1/attest/ios for initial attestation and POST /v1/attest/refresh for generateAssertion re-proof, including atomic iOS counter CAS (memory + Redis Lua) and lost-response idempotency within the challenge TTL.
  • Conformance coverage against Apple's current documentation fixture (tests/fixtures/apple_app_attest/), plus integration tests for the wallet-authenticated routes.

Builds on the merged claims/plumbing work from #20.

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --check
  • Confirm Apple fixture conformance tests pass (IosAttestationVerifier unit tests)
  • Confirm /v1/attest/ios upgrades a wallet session to attested tier and returns a fresh access token
  • Confirm /v1/attest/refresh rejects non-increasing counters and accepts a valid assertion replay only as an idempotent lost-response case
  • Confirm Redis store path exercises the Lua CAS for put_ios_assertion_record

Made with Cursor

aliXsed and others added 3 commits July 17, 2026 13:28
Bundle Apple's public App Attestation root and pull in the CBOR/x509
stack so the local iOS verifier can land next without secret material.

Co-authored-by: Cursor <[email protected]>
Verify attestation objects against Apple's chain and fixture values,
then persist iOS key material with an atomic counter CAS for re-proof.

Co-authored-by: Cursor <[email protected]>
Expose POST /v1/attest/ios and /v1/attest/refresh so wallet sessions can
upgrade to attested tier and keep the record alive via generateAssertion.

Co-authored-by: Cursor <[email protected]>
Extract only TOTAL from llvm-cov (with color disabled) instead of
falling back to the full summary, and don't fail the job if posting
the sticky comment fails after thresholds already ran.

Co-authored-by: Cursor <[email protected]>
@github-actions

Copy link
Copy Markdown

Coverage report

Thresholds: 80% line · 78% region (condition)

✅ Coverage meets the required threshold.

   13|      1|            .init(),
   14|      3|        _ => registry.with(tracing_subscriber::fmt::layer()).init(),
   15|       |    }
   16|      4|}

@aliXsed
aliXsed merged commit 40919d4 into main Jul 17, 2026
5 checks passed
@aliXsed
aliXsed deleted the feat/ios-app-attest-verifier branch July 17, 2026 01:57
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