Project: Parsec (Provisioning / Security & Compliance)
File: tarball_README.md

This tarball and content is constructed specifically as an introductory quickstart for the Parsec service and client tool. It is not intended for use in any production system. See for more details. These tools were built for a Linux-based `x86_64` system. Please see section if you'd like to generate the Quickstart tarball locally. ``` . bin parsec # The parsec binary parsec-tool # The parsec client tool quickstart README.md # This README build.txt # Information about the Parsec build environment config.toml # The config file used by parsec parsec-cli-tests.sh # Standard parsec-tool tests ``` The following describes standard quickstart usage examples. Calls to the `parsec-tool` assume that there exists an environment variable `PARSECSERVICEENDPOINT` set to the path for the socket created by the `parsec` process. By default, that socket is placed in the directory where you've executed the `parsec` command. It may also be helpful to add the `bin` directory to your path. The examples below assume that this has been done. ``` $ quickstart/ > export PARSECSERVICEENDPOINT=unix:$(pwd)/parsec.sock $ quickstart/ > export PATH=${PATH}:$(pwd)/../bin ``` ```bash $ quickstart/ > parsec & [INFO parsec] Parsec started. Configuring the service... [INFO parsecservice::keyinfomanagers::sqlitemanager] SQLiteKeyInfoManager - Found 0 key info mapping records [INFO parsecservice::utils::servicebuilder] Creating a Mbed Crypto Provider. [INFO parsec] Parsec is ready. $ quickstart/ > ``` ```bash $ quickstart/ > parsec-tool ping [INFO ] Service wire protocol version 1.0 ``` ```bash $ quickstart/ > parsec-tool list-providers [INFO ] Available providers: ID: 0x01 (Mbed Crypto provider) Description: User space software provider, based on Mbed Crypto - the reference implementation of the PSA crypto API Version: 0.1.0 Vendor: Arm UUID: 1c1139dc-ad7c-47dc-ad6b-db6fdb466552 ID: 0x00 (Core provider) Description: Software provider that implements only administrative (i.e. no cryptographic) operations Version: 1.1.0 Vendor: Unspecified UUID: 47049873-2a43-4845-9d72-831eab668784 $ quickstart/ > parsec-tool create-rsa-key --key-name demo1 [INFO ] Creating RSA encryption key... [INFO ] Key "demo1" created. $ quickstart/ > parsec-tool encrypt --key-name demo1 "Super secret data" [INFO ] Encrypting data with RsaPkcs1v15Crypt... RuPgZld6....brHqQd7xJg== $ quickstart/ > parsec-tool decrypt --key-name demo1 RuPgZld6....brHqQd7xJg== [INFO ] Decrypting data with RsaPkcs1v15Crypt... Super secret data ``` ```bash $ quickstart/ > ./parsec-cli-tests.sh Checking Parsec service... [INFO ] Service wire protocol version 1.0 Testing Mbed Crypto provider Test random number generation [INFO ] Generating 10 random bytes... [INFO ] Random bytes: 24 A1 19 DB 3F 3C A0 82 FE 63 .... ``` Building the Quickstart tarball locally can be accomplished by executing the `package.sh` script located in the `quickstart` directory. Default execution will place the generated tarball in the current directory. If you'd like it placed in a specific directory then use the `-o <path>` option. Running `package.sh` will also generate the Quickstart Docker image. ```bash $ quickstart > ./package.sh Packaging started... ... Finalizing packages ``` Alternatively, you can execute the commands directly ```bash $ quickstart > docker build --target tarball_builder --tag parallaxsecond/parsec-quickstart-tarball -f quickstart.Dockerfile .. $ quickstart > docker run -v `pwd`:/opt/mount --rm parallaxsecond/parsec-quickstart-tarball bash -c 'cp /parsec-tar/*.tar.gz /opt/mount/' ``` Tarball generation requires cloning of https://github.com/parallaxsecond/parsec-tool in order to include the `parsec-tool` binary in the built image. This will be done automatically as part of the tarball construction process, but it does necessitate your system having access to Github.