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 Turnstile Obfuscation #457

Merged
merged 5 commits into from
Feb 26, 2020
Merged

Fix Turnstile Obfuscation #457

merged 5 commits into from
Feb 26, 2020

Conversation

harvsu
Copy link
Contributor

@harvsu harvsu commented Feb 25, 2020

This pull request fixes the obfuscation/shrinking in Telemetry SDK that causes malformed Turnstile Events as mentioned in #456

  • Prevent obfuscation of Event classes to keep properties in JSON schema unaltered dfor serialization. Use @keep annotation(instead of adding in Proguard config as recommended in Replace Proguard rules with @Keep annotations mapbox-gl-native#8978) as a top level setting to keep Event class as is.

  • Throw Assertion Error in Test App in case of POST failure for an event.

  • Set minifyEnabled true in build.gradle for debug build to make the test app behave close to production app.

  • Add button on test app's main screen, which sends turnstile event on click.

  • Add @SerializedName annotation to Turnstile and Crash Event properties to keep them consistent with other events.

  • Fix Location Schema test to ignore the properties(speed, course, floor,
    speedAccuracy, courseAccuracy, and verticalAccuracy) that are
    added in the backend but not incorporated into the SDK yet!

@codecov
Copy link

codecov bot commented Feb 25, 2020

Codecov Report

Merging #457 into master will increase coverage by 0.09%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #457      +/-   ##
============================================
+ Coverage     68.35%   68.44%   +0.09%     
- Complexity      392      393       +1     
============================================
  Files            68       68              
  Lines          2152     2152              
  Branches        172      172              
============================================
+ Hits           1471     1473       +2     
+ Misses          582      581       -1     
+ Partials         99       98       -1

Copy link
Contributor

@nkukday nkukday left a comment

Choose a reason for hiding this comment

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

🚀

Prevent obfuscation of Event classes to keep properties in JSON schema unaltered.
Throw Assertion Error in Test App in case of POST failure for an event.
Set minifyEnabled true in build.gradle for debug build to make the test
app behave close to production app.
Add button on test app's main screen, which sends turnstile event on click.
Add @SerializedName annotation to Turnstile and Crash Event properties
to keep them consistent with other events.
Fix Location Schema test to ignore the properties(speed, course, floor,
speedAccuracy, courseAccuracy, and verticalAccuracy) that are
added in the backend but not incorporated into the SDK yet!
@harvsu harvsu merged commit 5f6d6ff into master Feb 26, 2020
harvsu pushed a commit that referenced this pull request Mar 12, 2020
harvsu pushed a commit that referenced this pull request Mar 12, 2020
* Fix obfuscation:

Prevent obfuscation of Event classes to keep properties in JSON schema unaltered.
Throw Assertion Error in Test App in case of POST failure for an event.
Set minifyEnabled true in build.gradle for debug build to make the test
app behave close to production app.
Add button on test app's main screen, which sends turnstile event on click.
Add @SerializedName annotation to Turnstile and Crash Event properties
to keep them consistent with other events.
Fix Location Schema test to ignore the properties(speed, course, floor,
speedAccuracy, courseAccuracy, and verticalAccuracy) that are
added in the backend but not incorporated into the SDK yet!

(cherry picked from commit 5f6d6ff)
harvsu pushed a commit that referenced this pull request Mar 16, 2020
harvsu pushed a commit that referenced this pull request Mar 16, 2020
Set version in gradle.properties .
Replace master with long-term-support in config.yml .
harvsu pushed a commit that referenced this pull request Mar 17, 2020
harvsu added a commit that referenced this pull request Mar 17, 2020
harvsu added a commit that referenced this pull request Mar 17, 2020
* Fix obfuscation:

Prevent obfuscation of Event classes to keep properties in JSON schema unaltered.
Throw Assertion Error in Test App in case of POST failure for an event.
Set minifyEnabled true in build.gradle for debug build to make the test
app behave close to production app.
Add button on test app's main screen, which sends turnstile event on click.
Add @SerializedName annotation to Turnstile and Crash Event properties
to keep them consistent with other events.
Fix Location Schema test to ignore the properties(speed, course, floor,
speedAccuracy, courseAccuracy, and verticalAccuracy) that are
added in the backend but not incorporated into the SDK yet!
harvsu added a commit that referenced this pull request Mar 17, 2020
* Fix obfuscation:

Prevent obfuscation of Event classes to keep properties in JSON schema unaltered.
Throw Assertion Error in Test App in case of POST failure for an event.
Set minifyEnabled true in build.gradle for debug build to make the test
app behave close to production app.
Add button on test app's main screen, which sends turnstile event on click.
Add @SerializedName annotation to Turnstile and Crash Event properties
to keep them consistent with other events.
Fix Location Schema test to ignore the properties(speed, course, floor,
speedAccuracy, courseAccuracy, and verticalAccuracy) that are
added in the backend but not incorporated into the SDK yet!
harvsu added a commit that referenced this pull request Mar 18, 2020
* Update Changelog.md for release Core 1.4.0 / Telemetry 4.7.0(#440)

* Update Gradle Versions: (#444)

Gradle Version : 5.6.4
Android Gradle Plugin Version : 3.5.3

* Update Node version to >=10 in package.json (#445)

Update version to 4.7.1 in package.json

* Workaround for Strict mode socket issue: (#443)

Add custom socket factory and set TrafficStats.setThreadStatsTag(1000) for configuration client(okhttpClient).

* Fix Turnstile Obfuscation (#457)

* Fix obfuscation:

Prevent obfuscation of Event classes to keep properties in JSON schema unaltered.
Throw Assertion Error in Test App in case of POST failure for an event.
Set minifyEnabled true in build.gradle for debug build to make the test
app behave close to production app.
Add button on test app's main screen, which sends turnstile event on click.
Add @SerializedName annotation to Turnstile and Crash Event properties
to keep them consistent with other events.
Fix Location Schema test to ignore the properties(speed, course, floor,
speedAccuracy, courseAccuracy, and verticalAccuracy) that are
added in the backend but not incorporated into the SDK yet!

* Update Config.yml to indicate long-term-support as pseudo master branch.
Append -lts to name of the binary while publishing the binary size.
Update Version in gradle.properties and package.json.
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.

5 participants