Repository navigation
FFLSDK-267: Add opt-in response signing v1 for Flags - #4049
Draft
leoromanovsky wants to merge 5 commits into
Draft
leoromanovsky wants to merge 5 commits into
leoromanovsky wants to merge 5 commits into
Conversation
Verify full certificate chains and bind assignment admission to the current request and lifecycle. Regenerate the public API while preserving default-off behavior. Ref: FFLSDK-267
2 of 5 tasks
🎉 All green!🧪 All tests passed 🔄 Datadog retried 1 test - 1 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 1b8b032 | Docs | View more details | Give us feedback! |
Rename signing protocol identifiers and refresh shared synthetic fixtures. Keep X.509 v3 certificate encoding and optional rollout behavior unchanged. Ref: FFLSDK-267
4 tasks done
Import the corrected shared corpus byte-for-byte and record its exact source revision and checksum. Preserve native expectations and runtime behavior. Ref: FFLSDK-267
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds optional public v1 response verification to Android Flags with
OFF,OBSERVEandREQUIREDmodes. The default remains off. Observe accepts otherwise-valid unsigned or unverifiable responses with bounded diagnostics; required rejects them. Authentication, transport, redirect and JSON errors keep their ordinary behavior.Motivation
Customers need response integrity without forcing installed mobile applications to update whenever a signing key or intermediate rotates. An explicitly configured public root verifies the full leaf/intermediate chain carried by each response. No production or test root is bundled, and responses cannot replace trusted roots. Client adoption can proceed independently of other SDKs.
Additional Notes
The public v1 transcript binds the exact request, nonce, response body and expiry. X.509 v3 certificate encoding is unchanged. The response to one assignment request carries the proof and certificate chain; verification adds no certificate fetch or unsigned retry. When signing preparation succeeds, observe and required requests send
X-stream: falsefor buffered delivery. Off mode retains ordinary transport selection. This draft does not add signed streaming.Required mode keeps verified assignments in memory and checks their original expiry and scope on every evaluation. Application-ID/context changes, cancellation and shutdown prevent stale responses from being installed. Observe retains ordinary persistence in a fresh full-request-scoped namespace, causing a one-time cold start; unsigned observations cannot replace its separate verified fallback. Server disablement cannot weaken a client's required policy. See configuration and cache behavior.
The main corpus and four isolated certificate-rule cases are copied byte-for-byte from ffe-system-test-data main, at
b57eac6711204a906f0b24e127124a03314e35a9. Two local KeyUsage cases remain separate. The adapters check 52 response cases in total; they do not load the shared nested-DER supplement or server signer-key cases. Siblings are browser #436 and iOS #3357.At
1b8b0321f34279e00158320981f9ac263f1566bb, all 694 host-JVM tests pass with zero failures or skips. Formatting and detekt pass. Coverage includes response verification, factory/client behavior, and cache lifecycle. The request-mode assertions failed in observe and required modes before the fix. They now verify the buffered override and unchanged off-mode headers.DataDog/dd-sdk-android@1b8b0321f34279e00158320981f9ac263f1566bbProduction trust-anchor provisioning and deployed application validation remain release gates.
Review checklist (to be filled by reviewers)