-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: ATS certificate pinning narrow down on iOS #593
Open
alexruzenhack
wants to merge
15
commits into
master
Choose a base branch
from
poc/network-hardening
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
alexruzenhack
changed the title
feat: extends RCTHTTPRequestHandler to handle authentication challenge for hardening
feat: ATS certificate pinning narrow down on iOS
Nov 1, 2024
alexruzenhack
force-pushed
the
poc/network-hardening
branch
from
November 1, 2024 23:30
e31f355
to
1e91119
Compare
andreabadesso
requested changes
Nov 4, 2024
msbrogli
requested changes
Nov 4, 2024
alexruzenhack
force-pushed
the
poc/network-hardening
branch
from
November 25, 2024 18:41
17f8488
to
239fbe9
Compare
andreabadesso
approved these changes
Dec 5, 2024
- Add a cached list of allowed domains for pinned certificates - Throw and break the application in the lack of the necessary iOS network settings
…cates - remove task scoped auth challenge - refactor pinning certificate validation to operate jointly with anchor certificate validation
alexruzenhack
force-pushed
the
poc/network-hardening
branch
from
December 20, 2024 15:25
c068932
to
6bd6d7a
Compare
@@ -221,7 +221,7 @@ export const PRE_SETTINGS_TESTNET = { | |||
txMiningServiceUrl: TX_MINING_SERVICE_TESTNET_URL, | |||
}; | |||
|
|||
export const NODE_SERVER_MAINNET_URL = 'https://mobile.wallet.hathor.network/v1a/'; | |||
export const NODE_SERVER_MAINNET_URL = 'https://mobile-wallet.trust.hathor.network/v1a/'; | |||
export const EXPLORER_MAINNET_URL = 'https://explorer.hathor.network/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the explorer URLs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And tx mining service
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.
Motivation
The default network security provided by ATS on iOS is broad, and this PR narrows it down to anchor and pinned certificates.
Description
React Native makes use of the iOS network framework in its own way. A possible entry point to hook network events and intercept a connection lay on the RCTHTTPRequestHandler class, which is a category of NSURLSessionDataDelegate, therefore responsible to intercept request events and add logic over it. The React Native implementation of the data delegate doesn't implement the authentication challenge and relies on the default behavior provided by ATS. This fact turns our job easier because we don't need to worry about likely side effects.
Acceptance Criteria
Note
I'm providing an ATS configuration alongside with Android's network configuration used during the tests, but this should change in a further PR with the proper certificate configuration when the certificates are issued.
Security Checklist