Skip to content
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

fix: allow offline init with unobfuscated config #143

Merged

Conversation

typotter
Copy link
Collaborator

@typotter typotter commented Dec 20, 2024

fixes: FF-3751

Motivation and Context

Due to the sensitive nature of the client configuration payload, the decision was made to support only obfuscated configuration in the Android SDK through its standard initialization method. This decision was made prior to the introduction of the format field in FlagConfigResponse. This was short-sighted as

  1. This is a popular development approach
  2. The configuration payload now contains the format field which can be used to determine the format of the configuration.

Changes

  • migrated the client init entry points to call into the Configuration.Builder without forcing isConfigObfuscated to true
  • tests

Future work

  • deprecated methods where isConfigObfuscated can be provided in the jvm-common-sdk

eppo/build.gradle Outdated Show resolved Hide resolved
Copy link
Contributor

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Given the small scope of this change and the tests I'm comfortable with a release 🚀

@@ -175,13 +175,13 @@ public Builder assignmentCache(IAssignmentCache assignmentCache) {
public Builder initialConfiguration(byte[] initialFlagConfigResponse) {
this.initialConfiguration =
CompletableFuture.completedFuture(
Configuration.builder(initialFlagConfigResponse, true).build());
new Configuration.Builder(initialFlagConfigResponse).build());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! By omitting it will parse the flag response and then check the format field 🚀

@typotter typotter enabled auto-merge (squash) December 20, 2024 15:01
@typotter typotter merged commit ffd6204 into main Dec 20, 2024
3 checks passed
@typotter typotter deleted the typo/ff-3751-android-sdk-ability-to-use-unobfuscated-initial branch December 20, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants