chore: [SIW-1208] Use base64url for iOS integrity keys #88
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.
List of Changes
generateIntegrityHarwareKeyTag
to use the function exposedio-react-native-jwt
to convert thebase64
key returned from the native method tobase64url
;getHardwareSignatureWithAuthData
andgetAttestation
to convert thebase64url
key used in this package tobase64
which is whatio-react-native-integrity
uses;getAttestation
for Android as well due to different implementation which previously converged into the same native method.Motivation and Context
Currently,
io-wallet
might return a500
while creating a wallet instance on iOS due to the hardware key tag being encoded in base64 and thus having characters which can't be stored on the underlying Cosmos DB.This PR converts the
base64
key tag tobase64url
in theIntegrityContext
, thus making it safe to be stored on Cosmos DB.This doesn't happen on Android as the we can decide the name of the key tag used.
I belive this change belongs to this package rather than
io-react-native-integrity
which should be agnostic.How Has This Been Tested?
apps/io-wallet-user-func
from io-wallet with an appropriatelocal.settings.json
(I can provide it privately) by pointing at the branch used for this PR;dev-proxy
in this example folder by providing a.env
file pointing at the running azure function of the previous point (http://localhost:7071/api/v1
by default). I can provide the remaining variables privately);.env
file. TheWALLET_PROVIDER_BASE_URL
should point to the IP of your local machine URL where thedev-proxy
is running (again, I can provide the remaining variables privately). Consequentially press every available button in the app and everything should work just fine.Checklist: