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

AuthSig improvements #735

Merged
merged 13 commits into from
Jun 11, 2024
Merged

AuthSig improvements #735

merged 13 commits into from
Jun 11, 2024

Conversation

James-Mart
Copy link
Member

@James-Mart James-Mart commented Jun 5, 2024

This PR is mostly refactoring existing functionality:

  1. Refactors the SPKI library that was previously coupled to AuthSig/RAuthSig, it is now its own library in the same namespace that can be independently linked
  2. Minor improvement to the tester, starting to remove its dependency on the psibase::PublicKey type (secp256k1 keys), which is being deprecated.
  3. Wraps AuthSig and AuthK1 in their own namespaces, to better isolate functionality that is specific to each auth library.

And there are a few additions also related to auth:

  1. Adds some functionality to the AuthSig plugin (The ability to set the key of the caller, and the ability to create and return a new keypair in pem format)
  2. Adds a new library (also in AuthSig namespace) for parsing PEM to PrivateKeyInfo. Basically the private key equivalent to the SPKI library, although there's no packing/unpacking logic because it's intended to be used for signing in tests, not as objects that can packed and sent to the node.

@James-Mart James-Mart added the System app Related to system services and their apps/plugins label Jun 5, 2024
@James-Mart James-Mart changed the title Auth sig plugin AuthSig improvements Jun 5, 2024
@James-Mart James-Mart marked this pull request as ready for review June 5, 2024 19:02
@James-Mart James-Mart requested a review from swatanabe June 5, 2024 19:02
services/system/AuthSig/src/Spki.cpp Outdated Show resolved Hide resolved
@@ -1,9 +1,19 @@
function(add suffix)
add_system_service("${suffix}" AuthSig src/AuthSig.cpp)
add_system_service("${suffix}" RAuthSig src/RAuthSig.cpp)

add_library(Spki${suffix} src/Spki.cpp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The libraries also need to be installed and there should be a way to refer to them from psidk.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I believe this is addressed

@James-Mart James-Mart merged commit aab5726 into main Jun 11, 2024
4 checks passed
@James-Mart James-Mart deleted the auth-sig-plugin branch June 11, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System app Related to system services and their apps/plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants