atsign-foundation / at_client_sdk

The Dart implementation of atSDK used for implementing Atsign's technology into other software
https://pub.dev/publishers/atsign.org/packages
BSD 3-Clause "New" or "Revised" License
1.47k stars 31 forks source link

Deprecate either isPublic or isEncrypted in Metadata #365

Closed gkc closed 3 months ago

gkc commented 2 years ago

Lead: @gkc

Is your feature request related to a problem? Please describe. isEncrypted and isPublic are inverses of each other, and one of them is therefore redundant and should be deprecated

Describe the solution you'd like I'd suggest we deprecate isEncrypted, since everything is always encrypted unless it is marked public.

See also #345

In order to fully determine that deprecation is safe, we need to review all current uses of isEncrypted for decision making (if conditions etc) and, in each case, evaluate what changes need to be made in order to not use isEncrypted for that purpose. https://github.com/search?q=org%3Aatsign-foundation+isEncrypted&type=code

In order to preserve functioning of existing code while we are in transition, we need to ensure that isEncrypted continues to be set appropriately in those usages.

Once all required changes have been made to ensure there is no decision making done in the code based on the value of isEncrypted, then we can mark as deprecated, and then set about removing all setting of isEncrypted

Usages in conditional logic:

Usages where the value is being set:

gkc commented 2 years ago

@murali-shris can we incorporate this into the AtKey refactoring PR also?

gkc commented 3 months ago

Closing this issue as (a) it is ancient and (b) we shouldn't preclude atProtocol clients having cleartext in values of shared data / notifications if that is what they wish