Repository navigation
Support obfuscated feature flag assignment keys #3941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
leoromanovsky
wants to merge
21
commits into
develop
Choose a base branch
from
flag-key-obfuscation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,460
−269
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d600473
Support obfuscated feature flag assignment keys
leoromanovsky 185a1fa
fix(flags): keep capability negotiation independent of versions
leoromanovsky b3779f8
test(flags): keep obfuscation coverage in JVM suite
leoromanovsky 39ae47b
Merge origin/develop into flag-key-obfuscation
leoromanovsky c63e2d6
fix(flags): gate encoded cache reads until source is known
leoromanovsky 16292d0
Use the feature flags capabilities header
leoromanovsky 751cb76
fix(flags): cache lookup hashes and strengthen obfuscation regressions
leoromanovsky 1c1f39f
Merge develop and preserve obfuscation with first-flags callbacks
leoromanovsky d8a2840
FFLSDK-254: Merge develop into flag-key-obfuscation
leoromanovsky 65fc35c
FFLSDK-254: Mark obfuscation test setup, actions, and assertions
leoromanovsky 3c503fc
FFLSDK-254: Use Mockito annotations in obfuscation tests
leoromanovsky 26d87d6
FFLSDK-254: Generate incidental obfuscation test fixtures
leoromanovsky ad7aa8d
FFLSDK-254: Limit obfuscation suppressions to specific calls
leoromanovsky 1d236bc
FFLSDK-254: Declare obfuscation parser exceptions
leoromanovsky 71cc4df
FFLSDK-254: Generate assignment and cache JSON models
leoromanovsky 935ada0
FFLSDK-261: Add context to generated assignments test
leoromanovsky 586f86a
FFLSDK-261: Explain obfuscation copy visibility
leoromanovsky 36c7d5a
FFLSDK-261: Merge latest develop
leoromanovsky 723409b
FFLSDK-261: Apply documented Kotlin conventions
leoromanovsky f4a6d1f
FFLSDK-261: Tighten obfuscation test assertions
leoromanovsky 27ba428
FFLSDK-261: Keep evaluation tests independent of HTTP
leoromanovsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
features/dd-sdk-android-flags/src/main/json/internal/assignment.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "title": "Assignment", | ||
| "description": "An assignment after conversion of its value to the SDK string representation.", | ||
| "type": "object", | ||
| "properties": { | ||
| "variationType": { "type": "string" }, | ||
| "variationValue": { "type": "string" }, | ||
| "doLog": { "type": "boolean" }, | ||
| "allocationKey": { "type": "string" }, | ||
| "variationKey": { "type": "string" }, | ||
| "extraLogging": { "type": "object", "additionalProperties": true }, | ||
| "reason": { "type": "string" }, | ||
| "serialId": { "type": "integer" } | ||
| }, | ||
| "required": ["variationType", "variationValue", "doLog", "allocationKey", "variationKey", "extraLogging", "reason"] | ||
| } |
22 changes: 22 additions & 0 deletions
22
features/dd-sdk-android-flags/src/main/json/internal/assignments-response.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "title": "AssignmentsResponse", | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "type": "object", | ||
| "properties": { | ||
| "attributes": { | ||
| "type": "object", | ||
| "properties": { | ||
| "flags": { "type": "object", "additionalProperties": true } | ||
| }, | ||
| "required": ["flags"], | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "required": ["attributes"] | ||
| } | ||
| }, | ||
| "required": ["data"] | ||
| } |
21 changes: 21 additions & 0 deletions
21
features/dd-sdk-android-flags/src/main/json/internal/flags-state.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "title": "FlagsState", | ||
| "type": "object", | ||
| "properties": { | ||
| "evaluationContext": { | ||
| "type": "object", | ||
| "properties": { | ||
| "targetingKey": { "type": "string" }, | ||
| "attributes": { "type": "object", "additionalProperties": true } | ||
| }, | ||
| "required": ["targetingKey"] | ||
| }, | ||
| "flags": { "type": "object", "additionalProperties": true }, | ||
| "encodedFlags": { "type": "object", "additionalProperties": true }, | ||
| "lastUpdateTimestamp": { "type": "integer" }, | ||
| "obfuscated": { "type": "boolean" }, | ||
| "obfuscation": { "$ref": "obfuscation.json" } | ||
| }, | ||
| "required": ["evaluationContext", "lastUpdateTimestamp"] | ||
| } |
10 changes: 10 additions & 0 deletions
10
features/dd-sdk-android-flags/src/main/json/internal/obfuscation.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "title": "Obfuscation", | ||
| "type": "object", | ||
| "properties": { | ||
| "scheme": { "type": "string" }, | ||
| "salt": { "type": "string" } | ||
| }, | ||
| "required": ["scheme", "salt"] | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is needed? the same SDK working in React Native SDK setup changes behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaScript consumes the snapshot through the bridge. It cannot decode obfuscated keys yet. A native SDK upgrade alone does not make that JavaScript reader compatible.