-
Notifications
You must be signed in to change notification settings - Fork 149
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: move to shared components #666
Conversation
Signed-off-by: Karim Stekelenburg <karim@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
a2cd211
to
9fc47e6
Compare
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
I didn't take it into account. It's not something I've seen before, and the logic wasn't fully known to me.
correct
Having a separate wallet to verify the pin. In our wallets we always just tried to open the wallet and if we get a
It's quite trivial. We have to migrate the custom pin database in addition to the normal wallet database |
@TimoGlastra Sorry to belabour the point, but, our PIN or Biometric has derived from it is stored in the device keychain. Not in the Wallet. Maybe we just need to do something in the keychain to "upgrade" it? |
@jleach see this code: https://github.com/hyperledger/aries-mobile-agent-react-native/blob/feat/upgrading-to-AFJ-040/packages/legacy/core/App/contexts/auth.tsx#L96 It is also there in main, but using indy sdk in askar. |
Indeed, our approach may seem unusual at first, but rest assured, there's a solid reason behind it. Different assurance levels (I think its a NIST standard) exist for wallets. For instance, when a wallet key is secured behind biometrics, it is considered high-assurance. This is because it takes advantage of the device's secure enclave - a dedicated region in the processor designed to safeguard data. If we were to store the derived key in the keychain outside of biometrics that would drop the wallets assurance level. What we do to make everything legit is store the salt in the keychain, derive the key on the fly with |
@TimoGlastra I think I have a fix for this. I need to clean it up and test some more but I'll add i back to this PR when ready. |
@jleach left a comment on your PR, but otherwise LGTM |
Co-authored-by: Bryce McMath <32586431+bryce-mcmath@users.noreply.github.com> Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
@jleach I just added I don't have a device at hand to test, could you take a look? |
I think it will work but I still think there is some confusion. We only have one wallet so we just need state tracked in one place because it can get upgraded in either place, but not both. Print the wallet ID and there will only be one in the app If I print out the wallet ID which is the same in both places I get this from auth.tsx L97.
And this from Splash.txs L215:
Because they have the same ID they're the same wallet. I think the comment in And yes, we should have used a better wallet ID that that 🫤 |
Ah thanks for clarifying. I messed this up then 😅 However we need to be careful here, as this will also initialize the agent now, which means there will also be an auto update of storage, for which all modules must be enabled (so the minimal agent that is created in the migration misses some modules that need migration) So we need to initialize the full agent, or we need to run just the askar migration script on the wallet. |
@TimoGlastra Should we back-out your last changes and add any missing modules or leave 'em? I think we're pretty close to being done. Also, I had a look at the shared code to migrate and it does not seem to care about modules or parameters. |
I was more talking on the JS side of things and the agent auto updating storage. It seems that the migration script doesn't call intialize on the agent and this we should be fine. I think we should set https://github.com/hyperledger/aries-mobile-agent-react-native/blob/feat/upgrading-to-AFJ-040/packages/legacy/core/App/utils/migration.ts#L29 to false, as that can lead to issues if behavioir in afj were to change. But otherwise we can revert my change and we should be good to go. |
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
d5fcd11
to
83e5daf
Compare
@TimoGlastra Done. I reverted your change, made the additional change you suggested, and merged |
Thanks @jleach -- that is great to hear. Super excited about this :) |
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
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.
Great work everyone
Summary of Changes
Updates Bifold to use the new shared component libraries (anoncreds-rs, aries-askar, indy-vdr) and updates AFJ to 0.4.0.
Draft for now until we add the migration script handling and some last released in AFJ have been made