parallaxsecond / parsec

Platform AbstRaction for SECurity service
https://parsec.community/
Apache License 2.0
471 stars 68 forks source link

Quickstart 1.3.0 package does not have pkcs11-provider compiled #773

Open arv1ndh opened 2 months ago

arv1ndh commented 2 months ago

Trying to checkout parsec and was following the instructions mentioned in the book to test out the pkcs11-provider, was getting this error after adding the required configs in config.toml

~/parsec_poc/quickstart-1.3.0-linux-x86_64/bin$ ./parsec -c ../quickstart/config.toml
[INFO  parsec] Parsec started. Configuring the service...
[INFO  parsec_service::key_info_managers::sqlite_manager] SQLiteKeyInfoManager - Found 0 key info mapping records
[ERROR parsec_service::utils::config] Provider (Pkcs11 { name: Some("pkcs11-provider"), key_info_manager: "sqlite-manager", library_path: "/usr/local/lib/softhsm/libsofthsm2.so", slot_number: None, serial_number: None, user_pin: None, software_public_operations: None, allow_export: None }) chosen in the configuration was not compiled in Parsec binary.
Error: provider not compiled

Also minor issue, parsec tool does not read the config.toml file by default,


Error: Failed to read config file from path: config.toml```
gowthamsk-arm commented 2 months ago

The parsec service in quickstart package is compiled only for mbedcrypto provider as seen here https://github.com/parallaxsecond/parsec/blob/main/quickstart/quickstart.Dockerfile#L35

This is intentionally done. For rest of the providers, you can compile the main branch and configure the service.

As for the parsec-tool, can you point me to the command in the parsec-book that you are trying to run? :)