-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: save enrollment details to local keystore #599
Conversation
…o save_enrollment_details_new
…am_functional_tests # Conflicts: # tests/at_onboarding_cli_functional_tests/pubspec.yaml
waiting for #606 to be merged into this branch. |
test: add couple of functional tests related to APKAM
…ils_new # Conflicts: # packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart
@gkc once the conflicts are resolved, functional tests will fail as a result of changes. Working on updating them |
I've fixed all the ripple effects and pushed to the branch |
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.
- The PR description explains what has been done, but not why. Please add an explanation of the problem that is being addressed here (or link to a ticket which has that explanation).
- This PR handles writing to the keystore ... is the intent that there will be code elsewhere which reads this information from the keystore?
- The information is currently written to
'${enrollmentResponse.enrollmentId}.new.enrollments.__manage${atClient!.getCurrentAtSign()}'
- Given that this is purely for local client-side use, we should use a local key
- And we should not be using the __manage namespace
|
…sing onboarding_cli
…o save_enrollment_details_new
…o save_enrollment_details_new
|
||
// The put operation is expected to fail as the new enrollment only has | ||
// access to wavi namespace | ||
expect(() => client?.put(buzzKey, 'value'), throwsA(predicate((e) { | ||
expect(() async => await client?.put(buzzKey, 'value'), |
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.
it's cleaner to do await expectLater(...)
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.
Please un-skip the test(s) in test/at_onboarding_cli_test.dart
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.
LGTM
Closes #556
Enroll details are needed in local storage for at_client to perform enrollment authorization checks for local secondary verbs. While we started implementing authorization checks in at_client, we wanted to use enroll:fetch instead of local key to get enrollment details. But enroll:fetch approach will not work for 1) offline at_client 2) every verb operation will result in remote call. So we decided to store a local key for enrollment details
- What I did
- How to verify it
- Description for the changelog
fix: save enrollment details to local keystore