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

This Docker container is constructed specifically as an introductory quickstart for the Parsec service and client tool. It is not intended for use in any production system. The container is started with the following command. This assumes that your Docker system is configured to pull images from ghcr.io. If that's not the case, or if you'd like to build a local image, see section . ```bash $> docker run --rm --name parsec -it parallaxsecond/parsec-quickstart bash qs@319b139eb85e:/parsec/quickstart$ ``` ``` parsec 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 ``` ``` PWD=/parsec/quickstart PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/parsec/bin PARSECSERVICEENDPOINT=unix:/parsec/quickstart/parsec.sock ``` The following describe standard quickstart usage examples. ```bash qs@319b139eb85e:/parsec/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. qs@319b139eb85e:/parsec/quickstart$ ``` ```bash qs@319b139eb85e:/parsec/quickstart$ parsec-tool ping [INFO ] Service wire protocol version 1.0 ``` ```bash qs@319b139eb85e:/parsec/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 qs@319b139eb85e:/parsec/quickstart$ parsec-tool create-rsa-key --key-name demo1 [INFO ] Creating RSA encryption key... [INFO ] Key "demo1" created. qs@319b139eb85e:/parsec/quickstart$ parsec-tool encrypt --key-name demo1 "Super secret data" [INFO ] Encrypting data with RsaPkcs1v15Crypt... RuPgZld6....brHqQd7xJg== qs@319b139eb85e:/parsec/quickstart$ parsec-tool decrypt --key-name demo1 RuPgZld6....brHqQd7xJg== [INFO ] Decrypting data with RsaPkcs1v15Crypt... Super secret data ``` ```bash qs@319b139eb85e:/parsec/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 image locally can be accomplished by executing the `package.sh` script located in the `quickstart` directory. Running `package.sh` will also generate the Quickstart tarball and place it in the current directory. ```bash $ quickstart > ./package.sh Packaging started... ... Finalizing packages ``` Alternatively, you can execute the Docker build command directly ```bash $ quickstart > docker build --target runnable_image --tag parallaxsecond/parsec-quickstart -f quickstart.Dockerfile .. ``` Image construction 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 image construction process, but it does necessitate your system having access to Github.