at_client_sdk icon indicating copy to clipboard operation
at_client_sdk copied to clipboard

atClientPreference in at_client_service.dart includes the atSign private key as a public member

Open nickelskevin opened this issue 2 years ago • 4 comments

Describe the bug A clear and concise description of what the bug is.

In the at_client_service.dart source code, the atClientPreference in at_client_service.dart includes the atSign private key as a public member. I cannot think of any need for the private key to be accessible from the preference object and am suggesting that it be private or removed.

To Reproduce

  1. Create an instance AtClientManager atClientManager = AtClientManager.getInstance();
  2. get the private key from the atClient atatClientManager.atClient.getPreferences()?.privateKey;

Expected behavior The private key should likely not be accessible from the preferences object.

Additional context Add any other context about the problem here.

nickelskevin avatar Sep 06 '22 02:09 nickelskevin

Move to high priority after arch discussion

ksanty avatar Sep 06 '22 16:09 ksanty

Spent 8SP in this sprint. https://github.com/atsign-foundation/at_client_sdk/pull/698 When app or client is init for the first time, we have to read the private key from keychain and pass it to at_client_impl create. Have to discuss in architecture call whether passing private key to at client impl create is an acceptable approach.

murali-shris avatar Sep 19 '22 05:09 murali-shris

Was this discussed, and what was the conclusion?

gkc avatar Oct 14 '22 15:10 gkc

Was this discussed, and what was the conclusion?

not yet Gary.Arch call discussion pending.

murali-shris avatar Oct 17 '22 09:10 murali-shris

discussion in architecture call.

  • persisting private key from keychain to keystore should be independent of at client --> create
  • work on design and finalise implementation approach in PR48

murali-shris avatar Oct 20 '22 06:10 murali-shris

Hi @murali-shris - please see also #756

gkc avatar Oct 31 '22 14:10 gkc

Closing this issue as has been superseded by #756

gkc avatar Nov 13 '22 16:11 gkc