Repository navigation
feat(flags): support obfuscated assignment keys - #1188
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
leoromanovsky
marked this pull request as ready for review
October 5, 2026 22:19
leoromanovsky
requested review from
danyal002 and
greghuels
and removed request for
a team
October 5, 2026 22:19
jeff-morgan-dd
previously approved these changes
Oct 5, 2026
greghuels
previously approved these changes
Oct 6, 2026
leoromanovsky
dismissed stale reviews from greghuels and jeff-morgan-dd
via
October 6, 2026 19:59
7c915bf
fuzzybinary
previously approved these changes
Oct 8, 2026
fuzzybinary
left a comment
Member
There was a problem hiding this comment.
This mostly LGTM, but the README is getting quite long and quite in the weeds - it might be worth looking into splitting it out into an overview and more detailed documentation / implementation details.
barboraplasovska
removed their request for review
October 9, 2026 13:39
fuzzybinary
approved these changes
Oct 14, 2026
Comment on lines
+48
to
+50
| ```bash | ||
| dart run build_runner build --delete-conflicting-outputs | ||
| ``` |
Member
There was a problem hiding this comment.
Reminder to myself - add a pre-commit hook and / or build check that performing dart build_runner doesn't change any files in any packages.
| @@ -1,4 +1,6 @@ | |||
| Component,Origin,License,Copyright | |||
| import,crypto,BSD-3-Clause,"Copyright 2015, the Dart project authors." | |||
| import,typed_data,BSD-3-Clause,"Copyright 2015, the Dart project authors." | |||
Member
There was a problem hiding this comment.
What did we need typed_data for? Is it transitive?
Contributor
Author
There was a problem hiding this comment.
Yes from crypto
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.
Tracking: FFLSDK-264
Motivation
Readable flag keys can reveal upcoming features. Support obfuscated assignments without changing application evaluation calls.
This reduces readable names in payloads; it does not hide values or prevent dictionary guessing. It is not encryption or response signing.
Changes and Decisions
Advertise support through this header instead of a JSON
supported_capabilitiesfield. Existing request fields stay unchanged.X-DD-FEATURE-FLAGS-CAPABILITIES: assignment-encoding-flag-key-256-v1Capabilities are sorted and comma-separated. They describe support, not a requirement. The edge still selects plaintext or obfuscated responses through its rollout.
For
obfuscated: true, validateobfuscation: {scheme, salt}and hash the application key for lookup. The response scheme remainsflag-key-sha256-v1:The public salt contains 16 bytes, encoded as 32 lowercase hexadecimal characters. Keys use exact UTF-8 bytes without normalization.
sequenceDiagram participant App participant SDK as Dart Flags client participant Edge as Fastly SDK->>Edge: Precompute request + capability header Edge-->>SDK: Plaintext, or encoded keys + scheme + salt SDK->>SDK: Validate and retain assignments with encoding App->>SDK: Evaluate original flag key SDK->>SDK: Hash lookup key only for encoded assignments SDK-->>App: Original value and evaluation details SDK->>SDK: Keep original flag key in telemetrydatadog_flags. The Flutter wrapper uses this Dart implementation; no native bridge change is needed.encodedFlags; continue reading legacy plaintext caches.Release requires edge support for the new header. This PR does not deploy backend changes.
Related: edge rollout, browser implementation.