Skip to content

Release 0.3.0 - #4

Merged
hasan-muzak merged 17 commits into
mainfrom
feat/v3-anti-spoofing-hardening
Nov 17, 2026
Merged

hasan-muzak merged 17 commits into
mainfrom
feat/v3-anti-spoofing-hardening

Conversation

@hasan-muzak

Copy link
Copy Markdown
Contributor

Releases 0.3.0 on merge (release.yml publishes when the manifest version is new).

Main changes, from the CHANGELOG:

  • Verify a backend action: read an event, check it exists, is recent (300 s by default), carries the expected tag, is identifiable and scored, then consume it once. Consume is also callable on its own and reports an already-consumed event as a typed error.
  • DeviceCheck: read and write the two DeviceCheck bits of the device behind an iOS event, retrying a 503 or a transport failure with the identical request.
  • v3 contract: refreshed OpenAPI and contract fixtures, event reason, identifiable, parsed event document with attestation (attest_skipped, downgrade), and the v3 signal constants.
  • Proxy: single-path relay contract with sanitize-and-restore of the SDK platform header, 400 missing_origin, one channel header upstream, forwarded Sec-Fetch-* and Sec-CH-UA-* headers, optional allowed origins, verbatim raw-byte forwarding, upstream redirects and out-of-range statuses answered with 502.
  • The proxy takes only a proxy key, checks the caller's public key and never sends a secret key upstream.
  • The endpoint option takes a bare https origin; plain http only for loopback with the explicit opt-in.
  • README merged with the redesigned layout from main and updated for 0.3.0.

A request carrying both Origin and a valid platform header now goes
upstream with x-fingerly-origin only, matching the direct API path; the
API refuses a proxied request that carries both. The upstream must be
https; plain http is allowed only on a loopback host with
allow_insecure_loopback=True, so the proxy key never travels in clear.

Refs: fingerly-io/sdks#20
The proxy's own client never follows a redirect, also around a
caller-supplied transport, and a 3xx answer is now refused with 502
instead of being relayed, so its target never sees the proxy key.

Refs: fingerly-io/sdks#46
An upstream status below 200 or above 599 is now answered 502 with
Cache-Control: no-store, as in the Go proxy, instead of reaching the
browser as a status line nothing in between understands.

Refs: fingerly-io/sdks#48
The proxy already matched the method exactly and marked every refusal
no-store; these tests hold it there under both adapters: post and Post
get 405, near-miss, encoded and absolute-form targets get 404.

Refs: fingerly-io/sdks#49
The upstream takes a scheme, a host and an optional port: a path,
query, fragment, credentials, space or control byte is refused, and
the target is rebuilt from the parsed parts. Failure log lines name
the kind of failure only, never the upstream address.

Refs: fingerly-io/sdks#50
The events client endpoint follows the proxy upstream rule: a bare
https origin rebuilt from its parts, plain http only on a loopback host
with allow_insecure_loopback=True, so the secret key never travels in
clear or to a path the operator did not mean.

Refs: fingerly-io/sdks#50
Add attestation_downgrade, probe_errors and fetch_metadata_missing to the
signal list, and decode attest_skipped and downgrade on the archived
attestation. Cover both in the contract tests and the README.

Refs: fingerly-io/server#19
Refs: fingerly-io/server#14
Refresh the vendored OpenAPI snapshot from the server export.
It adds attest_skipped, attest_key_id, the attest_key_status values
and the iOS prev_assertion continuity proof.
FingerlyProxy takes proxy_key only and has no secret_key parameter, so
the server secret key never travels upstream. Every request must present
a public key of the proxy key's environment or gets a 401.

Refs: fingerly-io/sdks#43
fingerly.device_check.query and write spend the token held for an iOS
event, on the sync and the async client. Errors are typed by the API code,
apple_rejected carries Apple's status, and a 503 or a transport failure is
retried with the identical request.
fingerly.events.verify reads an event and checks, in order, that it exists, is recent, carries the expected tag, is identifiable and scored, then consumes it once so one event backs one decision. fingerly.events.consume posts the consume on its own and raises FingerlyEventAlreadyConsumedError, with consumed_at, on a repeat. Both are on the sync and the async client and are never retried.

Refs: fingerly-io/panels#13
Refresh the vendored OpenAPI snapshot and its manifest from server
0f20954: the web ticket request and next_ticket, the consume route,
consumed_at on the event read, and the DeviceCheck write token.
Refresh the vendored OpenAPI snapshot and its manifest from server
2f24510: the prototype's per-key switch and the project's token issuer
on the origins update.
@hasan-muzak
hasan-muzak merged commit 5d42160 into main Nov 17, 2026
6 checks passed
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