Open cconstab opened 1 year ago
Un-assigning myself as I am already at capacity in PR56. However, this is important, so it needs another assignee for PR56.
I will work with @purnimavenkatasubbu and @srieteja on this
The "reset" option is currently disabled in the staging and production dashboards.In order to debug the bug, We need the reset atsign option
You can test locally : tomorrow afternoon I will commit some scripts I use for testing which you can use to test reset scenarios
in the meanwhile - we should enable reset in staging - @athandle @naresh0689 can you do that please? (But it must remain disabled in prod for now)
Hi @purnimavenkatasubbu - see https://github.com/atsign-foundation/at_server/pull/1231 for some scripts I use to run things locally
@athandle @naresh0689 Can you re-enable reset in staging please? (But it must remain disabled in prod for now)
Hi @purnimavenkatasubbu - see atsign-foundation/at_server#1231 for some scripts I use to run things locally
Sure. I'll check
@athandle @naresh0689 Can you re-enable reset in staging please? (But it must remain disabled in prod for now)
I have a build to deploy after that I will move. If any thing urgent @gkc then I gave reset in admin, I can give demo to you
Hi @purnimavenkatasubbu - see atsign-foundation/at_server#1231 for some scripts I use to run things locally
Sure. I'll check
I see that this scripts are for macOS. Mine is Linux
@purnimavenkatasubbu Indeed. However, they are bash scripts, with nothing OS-specific in them, so they should work on Linux
Logs after testing locally. ErrorLogs.txt
@VJag and I are brainstorming an approach for this. Moving to the next sprint for implementation
Had to put the implementation on hold due to some unplanned work. Carrying this over to the next sprint.
My intial approach:
Introduce two methods to atClient:
isRemoteReset(): If the public key present in the LocalSecondary and the one on the RemoteSecondary are different the method throws an exception indicating that a reset has occurred.
resetLocalStorage(): This method will be the after-action for isRemoteReset(). If the remote is reset, the client-consumer(agent who has control of the client instance e.g. an app) should catch the exception and take user consent for local secondary purge. If the user consents for LocalStorage purge the directories of hive, commitLog and any other local data needs to be removed. The method resetLocalStorage() is responsible for this data removal.
When initializing an atClient instance, check if the remote has been reset. Purge LocalSecondary storage if a reset has occurred. This would be preferably in the AtClientManager.setCurrentAtsign() as this is currently used to instantiate an AtClient for an atsign.
The implementation of solution for this is https://github.com/atsign-foundation/at_client_sdk/tree/reset_local_secondary. Currently testing this and discussing the validity of the approach with @VJag
Is this still being actively worked on?
I have an implementation ready in https://github.com/atsign-foundation/at_client_sdk/pull/1033. We need to discuss this in an arch call preferably. Will bring it up in the next arch call.
I was able to complete the fix and testing in PR68. The PR is being reviewed and this ticket will be closed once the PR has been merged.
Tested the fix in the PR by the following steps
isResetSecondary should return true as the atSign has been reset, but here it returns null.
Is your feature request related to a problem? Please describe.
When an atSign has been "reset" and new keys are cut by a client, old clients break as they are using the wrong keys. This is particulary acute with atclients that send notifications first (at_talk as an example).
Describe the solution you'd like
atclient should delete entire local datastore if it detects that the public key on the server is not the same as the public key in its local datastore
Describe alternatives you've considered
No response
Additional context
No response