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

improve Android Network Security config #23429

Closed

Conversation

dulmandakh
Copy link
Contributor

@dulmandakh dulmandakh commented Feb 13, 2019

Summary

This PR is trying to improve Android Network Security configuration introduced in 84572c4. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

Changelog

[Android] [Changed] - Android Network Security configuration.

Test Plan

CI is green, and RN apps will work that targets API 28.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Partner labels Feb 13, 2019
@dulmandakh dulmandakh requested a review from cpojer February 13, 2019 13:52
@dulmandakh
Copy link
Contributor Author

@gengjiawen @Salakar @hey99xx please review

@Salakar
Copy link
Contributor

Salakar commented Feb 13, 2019

@dulmandakh thanks for this, good idea changing this to limit it specifically to API 28; LGTM

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 13, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@dulmandakh merged commit 5747094 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 13, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 13, 2019
grabbou pushed a commit that referenced this pull request Feb 13, 2019
Summary:
This PR is trying to improve Android Network Security configuration introduced in 84572c4. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: #23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 14, 2019
grabbou pushed a commit that referenced this pull request Feb 18, 2019
Summary:
This PR is trying to improve Android Network Security configuration introduced in 84572c4. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: #23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
@dulmandakh dulmandakh deleted the android-network-security branch February 22, 2019 14:21
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
This PR is trying to improve Android Network Security configuration introduced in facebook@84572c4. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: facebook#23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Partner Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants