10 Commits
Author SHA1 Message Date
Rick db27086ee1 Extract signature verification failure reasons (#7777)
* Extract signature verification failure reasons

* Log missing signed payload failures
2026-09-23 07:20:50 +02:00
Rick f0eaeff7fe feat(remote-config): use the server clock for X-RC-Last-Refresh-Time (#7314)
* Use server time for remote config refreshes

* Assert production remote config request dates

* Clarify remote config refresh timestamps

* Test production refresh time round trip
2026-07-30 15:10:49 +02:00
Rick b82223e5a1 feat(remote-config): add static fallback config endpoint (#7182)
* feat(remote-config): add static fallback config endpoint

* refactor(remote-config): clarify static fallback path name

* test(remote-config): cover static fallback signature failures

* fix(remote-config): use static fallback only without cache

* test(remote-config): cover static fallback external blobs

* refactor(remote-config): align static fallback naming

* refactor(remote-config): scope static fallback path

* fix(remote-config): mark fallback no content fresh

* fix(remote-config): align fallback accept headers

* refactor(remote-config): rename fallback endpoint types

* fix(remote-config): enable etags for fallback config

* fix(remote-config): skip fallback when proxy is configured

* fix(remote-config): rely on etag cache for fallback

* refactor(remote-config): reuse fallback retry eligibility

* fix(remote-config): disable after fallback client errors
2026-07-10 14:17:31 +02:00
Rick 00251c6e02 feat(remote-config): switch config request to v1 and send app user id (#7080)
* fix(remote-config): use v1 config endpoint

* feat(remote-config): include app user id in request

* feat(remote-config): move domain into config path

* fix(remote-config): always encode prefetched blobs

* chore(remote-config): remove redundant coding key comment

* fix(remote-config): update nonce path test
2026-06-29 13:25:55 +02:00
Rick 48e61c41e9 refactor(remote-config): make rc container validation domain-specific (#7074)
* feat(remote-config): make rc container validation domain-specific

* refactor(remote-config): share config element validation

* refactor(remote-config): decode remote config container in http client

* fix(remote-config): align rebased container tests

* fix(remote-config): fix remote config signature verification

* docs(remote-config): clarify rc container validation comments
2026-06-29 12:19:58 +02:00
b148dd6409 feat(remote-config): add RemoteConfigManager (#7067)
* feat(remote-config): add RemoteConfigManager

* fix(remote-config): adapt RemoteConfigManager to struct-based fetch result

Update the manager and its tests for the struct RemoteConfigFetchResult and
the relocated per-topic blob-ref derivation, and drop the misleading
topicBlobRefs comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(remote-config): update refresh timestamp on no content

---------

Co-authored-by: Antonio Pallares <antonio.pallares@revenuecat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 10:20:11 +02:00
Rick cf77437cc0 feat(remote-config): verify RC container signatures (#7046)
* feat(remote-config): use opaque manifest token models

* fix(remote-config): simplify manifest token model

* feat(remote-config): verify RC container signatures

* refactor(remote-config): isolate signature payload context

* refactor(remote-config): clarify fetch and signing context

* fix(remote-config): log signature payload failures

* fix(remote-config): correct checksum mismatch verification tests

* fix(remote-config): clarify checksum mismatch test behavior

* fix(remote-config): expect enforced checksum verification failure

* fix(remote-config): address signing review feedback

* fix(remote-config): verify no-content response context

* fix(remote-config): expect no-content verification failure code

* refactor(remote-config): group signature verified paths
2026-06-25 17:03:58 +02:00
Rick 9b9e7fce02 feat(remote-config): update request and response models according to spec (#7022)
* Update remote config API endpoint contract

* fix(remote-config): remove request signing content

* feat(remote-config): use opaque manifest token models

* fix(remote-config): simplify manifest token model
2026-06-24 10:36:57 +02:00
Rick 6330937692 feat(remote-config): support RC Container format in network stack and use for remote-config request (#7037)
* feat(remote-config): request RC Container format

* fix(remote-config): handle no content responses

* chore(remote-config): allow snapshot todo

* fix(remote-config): disable response verification

* chore(remote-config): document disabled signing

* refactor(remote-config): parse RC containers in HTTP stack
2026-06-19 14:38:38 +02:00
Rick 7ee15c73a2 feat(remote-config): add network scaffolding for GET /v2/config endpoint (#6854)
* feat(remote-config): add network scaffolding for GET /v2/config endpoint

Adds RemoteConfigResponse model, GetRemoteConfigOperation, RemoteConfigAPI,
and wires everything into Backend. Unknown topic keys in the manifest are
silently dropped for forward compatibility. Mirrors Android PR #3435.

* fix(remote-config): use lowercase "default" variant key in test fixtures

Aligns with Android convention (DEFAULT_ENTRY_ID = "default") established
in purchases-android PR #3437.

* test(remote-config): add snapshot files for all CI OS versions

BackendGetRemoteConfigTests was only recording snapshots for iOS 26.
CI also runs tests on iOS 14/15/16/17/18, tvOS 18, macOS, and watchOS,
each of which requires its own snapshot file.

Derived from existing snapshot patterns in BackendGetRewardVerificationStatusTests.

* fix(remote-config): log warning when unknown topic key is received

Follows the codebase convention of logging unknown backend values
(e.g. WorkflowsResponse unknown_workflow_trigger_type) rather than
silently dropping them.

* refactor(remote-config): rename wireKey to rawValue, add WIP comment for signature verification

Aligns Topic with Swift's RawRepresentable convention and matches the
Android SDK's comment indicating signature verification will be enabled
once the remote config endpoint is finalized.

* refactor(remote-config): enable etag and simplify HTTPRequestPath cases
2026-06-02 17:19:05 +02:00