Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.4.1

- `AttestSkippedReason` documents each member: when the iOS and Android SDKs
send `not_offered`, `unsupported`, `challenge_unavailable`, `key_error`,
`timeout`, `backoff` and `install_unavailable`.
- The vendored OpenAPI contract declares the enums for the fixed string
values, and the contract test sends signal groups as event triggers.

## 0.4.0

- Added `str` enums for the fixed values the API and webhooks send:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Two clients share one API: `Fingerly` for synchronous code such as Django and Fl
**2. Install.**

```sh
pip install "fingerly>=0.4.0"
pip install "fingerly>=0.4.1"
```

**3. Read an event.**
Expand Down Expand Up @@ -315,7 +315,7 @@ Responses are marked `no-store`. A redirect is never followed, whatever transpor

Incoming headers follow the sanitize-and-restore sequence: all incoming `x-fingerly-*`, `cookie` and `authorization` headers are stripped, restoring `x-fingerly-sdk-platform` only when it matches an exact lowercase native or bridge platform (`ios`, `android`, `react-native`, `react-native-ios`, `react-native-android`, `flutter`, `flutter-ios`, `flutter-android`, `lynx-ios`, `lynx-android`, `capacitor`, `kotlin-multiplatform`). Requests carrying neither `Origin` nor a validated `x-fingerly-sdk-platform` are rejected locally with `400` (`missing_origin`), and `x-fingerly-origin` is never synthesized from `Host`, `Referer` or the request URL. Exactly one channel goes upstream: a request with an `Origin` is forwarded as a browser call with `x-fingerly-origin` and without the platform header, as the API treats the same request sent to it directly.

Alongside verified proxy metadata (`x-fingerly-host` included), only `content-type`, `x-api-key`, `user-agent`, `idempotency-key`, `sec-fetch-*` and `sec-ch-ua-*` are forwarded. Customer cookies and authorization headers are never passed on. The proxy reports itself upstream as `python/0.4.0` in `x-fingerly-proxy-version`, which the dashboard shows per proxy, and sends `fingerly-python/0.4.0` as its user agent.
Alongside verified proxy metadata (`x-fingerly-host` included), only `content-type`, `x-api-key`, `user-agent`, `idempotency-key`, `sec-fetch-*` and `sec-ch-ua-*` are forwarded. Customer cookies and authorization headers are never passed on. The proxy reports itself upstream as `python/0.4.1` in `x-fingerly-proxy-version`, which the dashboard shows per proxy, and sends `fingerly-python/0.4.1` as its user agent.

Back to the browser it relays only `content-type`, `x-request-id`, `ratelimit-limit`, `ratelimit-remaining` and `retry-after`, plus its own `cache-control: no-store` and a `content-length` for the decoded body. A content blocker can match a response header by name, so an allowlist is what keeps anything naming Fingerly off the page.

Expand Down
2 changes: 1 addition & 1 deletion src/fingerly/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
send and the version the proxy reports upstream all come from here.
"""

__version__ = "0.4.0"
__version__ = "0.4.1"
4 changes: 2 additions & 2 deletions tests/test_frameworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_forwards_from_a_route_at_the_issued_path(self) -> None:
assert str(forwarded.url) == INGEST
assert forwarded.headers["x-fingerly-client-ip"] == "203.0.113.5"
assert forwarded.headers["x-fingerly-proxy-key"] == PROXY_KEY
assert forwarded.headers["x-fingerly-proxy-version"] == "python/0.4.0"
assert forwarded.headers["x-fingerly-proxy-version"] == "python/0.4.1"
assert "cookie" not in forwarded.headers

(missing_origin,) = self.post(
Expand Down Expand Up @@ -224,7 +224,7 @@ def test_forwards_beside_the_host_app(self) -> None:
forwarded = upstream.requests[0]
assert forwarded.content == raw_v3
assert forwarded.headers["x-fingerly-client-ip"] == "203.0.113.5"
assert forwarded.headers["x-fingerly-proxy-version"] == "python/0.4.0"
assert forwarded.headers["x-fingerly-proxy-version"] == "python/0.4.1"
assert "cookie" not in forwarded.headers
native_forwarded = upstream.requests[1]
assert native_forwarded.content == raw_v3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_sends_only_vetted_visitor_metadata(self) -> None:
assert upstream.headers["x-fingerly-origin"] == "https://shop.test"
assert upstream.headers["x-fingerly-user-agent"] == "Firefox"
assert upstream.headers["idempotency-key"] == "idem-1"
assert upstream.headers["x-fingerly-proxy-version"] == "python/0.4.0"
assert upstream.headers["x-fingerly-proxy-version"] == "python/0.4.1"
assert "cookie" not in upstream.headers
assert "authorization" not in upstream.headers

Expand Down
Loading