-
Notifications
You must be signed in to change notification settings - Fork 13
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
Error on HTTP request to domain without #183
Comments
The functionality you're describing is not something that's natively supported in OkHttp or TrustKit, but it is somewhat possible to implement. I think the only potential issue is if it will make it too easy for devs to shoot themselves in the foot if we allow them to block unpinned domains, as a misconfiguration could mean an unusable app in production. Could you clarify more on what you think are the benefits for such a feature? Would this increase security? |
Yesss, I did a little reading after I posted my question and came to the same conclusion after I found the list of exceptions the
Developers make mistakes. Developers forget things. What if a new service is added to the app and pins for its domain are never added to the
Not in production. It's more about the route to production ... Even if it was just a warning. Even if it was just for a debug build. A message might say;
I appreciate this isn't strictly within the scope of |
I think a feature that blocks all requests for domains that do not have pinned certificates or are in an allowlist would be great! It could increase security for react native apps as it could block malicious packages (e.g. from a supply chain attack) to steal sensitive information by sending them to a third party server. |
Borrowed from a recently closed issue 😅 ty
I would like for the following to error:
I appreciate the previous answer given:
However, might it be possible to extend
react-native-ssl-public-key-pinning
such that a request to a domain that does not match an entry in thePinningOptions
raises an error (or even a warning)?I want a way to identify when a developer adds a
fetch()
request to a domain and forgets to also add thepublicKeyHashes
for that domain.The text was updated successfully, but these errors were encountered: