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

Secure Witness Support #750

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

pfeairheller
Copy link
Member

This PR includes:

  • Enhanced interact and rotate kli commands to allow for --authenticate parameter to ask user for a 2-factor auth code to send to witnesses for secure witness interactions.
  • Enhancement to streaming CESR or HTTP to allow for path components in location records.
  • Update to receipt endpoint interaction to honor path components in location records to allow for easier multi-tenant witness solutions.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>
… parameter to ask user for a 2-factor auth code to send to witnesses for secure witness interactions.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>
Signed-off-by: pfeairheller <pfeairheller@gmail.com>
Copy link
Contributor

@SmithSamuelM SmithSamuelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that you are using Saider to merely store a SAID. As we discussed some time ago unless one is going to use the Saider methods to create a SAID from some SAD dict. There is no benefit to serializaing and deserlizing via Saider. SuberBase is adequate for the string that is the SAID. If one needs to convert from qb64 to qb2 or raw—code then Diger is more appropriate for that. Since Saids are digests. I am trying to minimize the use of Saider because its functionality except for corner cases is now included in Serder.
So if we use it everywhere we store a SAID digest in a database then it will become much more difficult to pull out later.
As far as I can tell in most instances the SAID stored as a value is just an index to be pulled out an then used in the keyspace for yet another database. So when db value use is to create a keyspace to reference the actual data. then serializing as a Saider obscures its purpose. In LMDB there is really just one space. keyspace but its split between keys and values and so only when the value is some datastructure or a tuple of values is there any benefit to using CESRSuber or SerderSuber. If the value is just a string that is to be used as an index to another table then no reason to incur the serialization/deserialization cost of converting to/vrom a Matter subclass. Just keep it a string.

The purpose of CesrSuber was so we could parse a concatenation of a tuple of values. And to parse them we need the Matter classes who do the heavy lifting. But when we are just storing indexes as single values its a waste of effort. The point was not to convert everything to CESRSubers. The ORM like functionality of having a standard api of get pin put rem is provided just fine by Suber. The Orm is Suber not CESR Suber. I hope this helps.

A string is a python object. Suber is the object that gets rid of the individual function calls in Baser. We only need a Matter object if we are going to use the Matter methods. And for most of the use cases fo rstoring single values Suber works. To restate a Suber gets rid of the set of individual method calls in Baser and replaces them with a Suber instance. We only need CESRSuber so we can ser/des a concatenation of multiple values. Not for single values.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>
@pfeairheller
Copy link
Member Author

Fixed.

Copy link
Member

@m00sey m00sey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive

@pfeairheller pfeairheller merged commit 140eeaa into WebOfTrust:main Apr 11, 2024
6 checks passed
@pfeairheller pfeairheller deleted the feat-secure-witness branch April 11, 2024 23:23
kentbull pushed a commit to kentbull/keripy that referenced this pull request Jul 8, 2024
* Changes to support secure witness transactions.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>

* Enhanced interact and rotate kli commands to allow for --authenticate parameter to ask user for a 2-factor auth code to send to witnesses for secure witness interactions.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>

* Updated setup to include QR code library.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>

* Update misfits to be a suber instead of a CESR suber.

Signed-off-by: pfeairheller <pfeairheller@gmail.com>

---------

Signed-off-by: pfeairheller <pfeairheller@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants