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

Remove the duplicate code of decrypting the encrypted "defaultEncryptionPrivateKey" and "selfEncryptionKey" in apkam flow #1451

Open
sitaram-kalluri opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sitaram-kalluri
Copy link
Member

sitaram-kalluri commented Dec 12, 2024

Describe the bug

In the APKAM flow, when an enrollment is approved, the app requesting enrollment access retrieves the "defaultEncryptionPrivateKey" and "defaultSelfEncryptionKey" using the "keys" verb.

Currently, the logic for decrypting the encrypted keys is duplicated in:

  • at_libraries/packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart (_getEncryptionPrivateKeyFromServer and _getSelfEncryptionKeyFromServer)
  • at_client mobile->at_auth_service_impl.dart (_getDefaultEncryptionPrivateKey and _getDefaultSelfEncryptionKey)
  • at_end2end_test/test/enrollment_setup.dart (getDefaultEncryptionPrivateKey and getDefaultSelfEncryptionKey)

To simplify code maintenance, consolidate this logic into a common location, allowing the methods to be reused.

@sitaram-kalluri sitaram-kalluri added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant