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

Integrate AppTP with privacy remote config #1832

Merged
merged 3 commits into from
Mar 31, 2022

Conversation

aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Mar 30, 2022

Task/Issue URL: https://app.asana.com/0/72649045549333/1202005414608950/f

Description

NOTE: originally stacked PR onto #1830 -> #1829

Integrates AppTP with privacy remote config

Steps to test this PR

Test internal builds

  • fresh install from INTERNAL debug builds
  • launch the app
  • verify the apptp_remote_config.db contains a table dubbed vpn_config_toggles
  • verify the vpn_config_toggles table contains ipv6Support, privateDnsSupport, networkSwitchHandling and badHealthMitigation entries
  • verify all entries are false (0) for both enabled and isManualOverride columns except for badHealthMitigation that should have enabled set to true (1)
  • go to Settings -> AppTP dev settings
  • verify all toggles are disabled
  • go to Settings -> App Tracking Protection and enable AppTP
  • go to Settings -> AppTP dev settings
  • verify all toggles are in state enabled
  • verify only VPN debug logging, Bad health monitoring and Bad health mitigation action toggles are ON, remaining ones should be OFF
  • filter logcat by Dropping ipv6
  • open instagram and verify logs appear (dropping IPv6 packets) - you may need to in cellular if you don't see logs on WIFI
  • close instagram
  • go to Settings -> AppTP dev settings and toggle IPv6 support ON
  • open instagram and verify no logs appear
  • go to Settings -> AppTP dev settings and toggle IPv6 support OFF
  • filter logcat by private dns
  • go to Android settings and search for private DNS
  • set Private DNS provider hostname to one.one.one.one
  • verify Private DNS support is disabled...skip appear
  • set Private DNS to off
  • verify Private DNS support is disabled...skip appear
  • go to Settings -> AppTP dev settings and toggle Private DNS support ON
  • set Private DNS provider hostname to one.one.one.one
  • verify Setting private DNS: ... appear and VPN is restarted (look at the key icon in the status bar)
  • set Private DNS to off
  • verify Setting private DNS: ... DO NOT appear and VPN is restarted (look at the key icon in the status bar)
  • go to Settings -> AppTP dev settings and toggle IPv6 Support and private DNS support ON
  • In AS, open privacy_config.json file and set the version to 1648641758000 to force reload the remote settings on app launch
  • Filter logcat by AppTpFeatureConfigImpl
  • rebuild and install the app
  • launch the app
  • verify Skip setEnabled... appear for both Ipv6Support and PrivateDnsSupport
  • go to Settings -> AppTP dev settings
  • verify both IPv6 and privacy support toggles are still ON
  • verify opening instagram does not log any Dropping ipv6... message in logcat

Test PLAY build

  • Modify AppTPHealthMonitor:simulateHealthStatusIfEnabled method, so that the first if condition is if (!appBuildConfig.isDebug)
  • build and fresn install from PLAY debug build
  • Enable AppTp - grab invice code from here
  • Verify in logcat ipv6 packets are dropped when opening instagram
  • Verify in logcat Private DNS support is disabled...skip appears when trying to set private DNS from Android settings
  • Go to Settings -> App Tracking Protection screen -> overflo menu -> Diagnostics
    = [ ] filter logcat by AppBadHealthStateHandler
  • scroll down and click on BAD HEALTH button
  • verify the AppBadHealthStateHandler: Restarting the VPN.... message appears in logcat after a while
  • Click in GOOD HEALTH and wait for no alerts message
  • Click on CRITICAL HEALTH
  • verify that after a while Restarting the VPN... meessage appears and the diagnostics screen is killed (becauase we killed that process)

Test app update

  • install from develop branch the INTERNAL build
  • launch app and enable AppTP
  • verify there is no apptp_remote_config.db database
  • go to Settings -> AppTP settings
  • verify VPN debug logging and Bad health monitoring and Bad health mitigation toggles are ON
  • verify the rest of toggles are OFF
  • click on View diagnostics Data
  • scroll down and click on CRITICAL HEALTH
  • verify the current activity is killed (it can take a while) - this is because the VPN process is restarted
  • verify AppTP is enabled
  • update the app from this branch (INTERNAL build)
  • verify the apptp_remote_config.db exists and it has an EMPTY vpn_config_toggles table
  • go to Settings -> AppTP settings
  • verify VPN debug logging and Bad health monitoring and Bad health mitigation toggles are ON
  • click on View diagnostics Data
  • scroll down and click on CRITICAL HEALTH
  • verify the current activity is killed (it can take a while) - this is because the VPN process is restarted
  • verify AppTP is enabled
  • go to Settings -> AppTP settings and enable IPv6 support
  • verify the vpn_config_toggles db table contains the ipv6Support entry with enabled and isManuallyOverride columns set to 1
  • force kill the app and relaunch it
  • go to Settings -> AppTP settings
  • verify ipv6 support toggle is still ON
  • verify the vpn_config_toggles db table contains the ipv6Support entry with enabled and isManuallyOverride columns set to 1

Test remote config updates

  • install from this branch the INTERNAL build
  • open the app and enable AppTP
  • go to Settings -> AppTP dev settings
  • verify all toggles under CONFIG section are OFF
  • verify the vpn_config_toggles table in the apptp_remote_config.db also has entries for all toggles (only badHealthMitigation` entry is enabled)
  • use Charles to update the remote config file and update the ipv6 config to enabled and update the version
  • kill and restart the app
  • go to Settings -> AppTP dev settings
  • verify the ipv6 toggle is ON
  • verify the vpn_config_toggles table in the apptp_remote_config.db also has the ipv6 config as enabled and with isManuallyOverride set to 0

@aitorvs
Copy link
Collaborator Author

aitorvs commented Mar 30, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@aitorvs aitorvs changed the title AppTP remote config 3/N - Add persistance AppTP remote config 3/3 - Add persistance Mar 30, 2022
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

Everything working as expected 👍 🚢 🇮🇹

@aitorvs aitorvs changed the title AppTP remote config 3/3 - Add persistance AppTP remote config 3/3 - Add persistance Mar 30, 2022
@aitorvs aitorvs force-pushed the feature/aitor/atp/remote_config_integration_2 branch from d9d7ad9 to 18f24b0 Compare March 30, 2022 13:55
@aitorvs aitorvs force-pushed the feature/aitor/atp/remote_config_integration_3 branch from 319c40a to 705fd39 Compare March 30, 2022 13:55
@aitorvs aitorvs changed the base branch from feature/aitor/atp/remote_config_integration_2 to develop March 30, 2022 14:13
@aitorvs aitorvs force-pushed the feature/aitor/atp/remote_config_integration_3 branch from 705fd39 to 8031eba Compare March 30, 2022 14:13
@aitorvs aitorvs force-pushed the feature/aitor/atp/remote_config_integration_3 branch from 8031eba to 66b9ea0 Compare March 30, 2022 15:33
@aitorvs aitorvs changed the title AppTP remote config 3/3 - Add persistance Integrate AppTP with privacy remote config Mar 30, 2022
@aitorvs
Copy link
Collaborator Author

aitorvs commented Mar 30, 2022

@marcosholgado after the last commit that added the support for default values, I have added to the description one more test case to run to ensure it works as expected.
I have run it and seems all good, lmk

@marcosholgado
Copy link
Contributor

@marcosholgado after the last commit that added the support for default values, I have added to the description one more test case to run to ensure it works as expected.
I have run it and seems all good, lmk

LGTM!

@aitorvs aitorvs merged commit 39c6a29 into develop Mar 31, 2022
@aitorvs aitorvs deleted the feature/aitor/atp/remote_config_integration_3 branch March 31, 2022 10:54
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.

2 participants