{"id":28042344,"url":"https://github.com/parallaxsecond/hello-parsec","last_synced_at":"2026-01-24T10:06:17.622Z","repository":{"id":40387035,"uuid":"486938358","full_name":"parallaxsecond/hello-parsec","owner":"parallaxsecond","description":"A simple Parsec demo application that builds and runs in a Docker container","archived":false,"fork":false,"pushed_at":"2022-05-11T12:25:08.000Z","size":21,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-11T14:34:21.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parallaxsecond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-29T10:57:53.000Z","updated_at":"2022-10-27T10:10:48.000Z","dependencies_parsed_at":"2022-08-09T19:00:55.551Z","dependency_job_id":null,"html_url":"https://github.com/parallaxsecond/hello-parsec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/parallaxsecond/hello-parsec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallaxsecond%2Fhello-parsec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallaxsecond%2Fhello-parsec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallaxsecond%2Fhello-parsec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallaxsecond%2Fhello-parsec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parallaxsecond","download_url":"https://codeload.github.com/parallaxsecond/hello-parsec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallaxsecond%2Fhello-parsec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28724378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-11T14:26:21.159Z","updated_at":"2026-01-24T10:06:17.596Z","avatar_url":"https://github.com/parallaxsecond.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello, Parsec!\n\nThis repository contains the sources to build a very simple demo client application for Parsec and\nmake it ready for publication as a Docker container image.\n\nThe aim of this demo application is to show, in a simple and visually-obvious way, that a Parsec\nservice instance is running and responding on the host platform. The application will \"ping\" the\nservice and, if this succeeds, will display a Parsec-themed banner message and run a small number of\nadditional basic tests. The published container will be a small image that can easily be downloaded\nand used by developers or systems integrators who wish to validate that Parsec is running and\nresponsive on a system. It can also be used in live demo contexts to show a watching audience that\nParsec is available and running correctly. Additionally, it will provide options to run more\ncomprehensive sets of tests, although these will not execute by default.\n\n# What's Here?\n\nAn important use case for Parsec is to allow containerised, cloud-native applications to access the\nhardware-backed security facilities of a host platform, using straightforward interfaces in a\nvariety of popular programming languages. This repository contains the resources needed to build a\nsimple example of such a containerised application. It uses just a small number of Parsec's basic\nfunctions, but does so in a way that showcases the ability of Parsec to be consumed in different\nlanguages, such as Go, Rust or shell scripts.\n\nThe `hello-parsec.sh` file is the primary script that runs as the container's entry point. This\nscript will use the command-line [`parsec-tool`](https://github.com/parallaxsecond/parsec-tool) to\nping the service and display some simple details about its configuration. The script then uses the\nsame `parsec-tool` to create an RSA key pair with a well-known name, which is then used to encrypt\nsome small string messages. The ciphertext of these messages is piped in base-64 format into some\nsimple decryption programs that are written in some of the programming languages that Parsec\nsupports with client libraries. These programs recover the plaintext messages using the private key\nheld by Parsec. The plaintext messages are then echoed out to the console, bringing the demo to a\nclose.\n\nThe `parsec_banner.txt` file contains the banner message that is displayed to the console when the\nscript discovers that Parsec is available and running.\n\nThe `go` folder contains a very small Go program to decrypt the base-64 ciphertext that it receives\non its standard input. It uses the [Parsec Go\nClient](https://github.com/parallaxsecond/parsec-client-go) to decrypt the ciphertext with the\nwell-known demo key. It writes the recovered plaintext message to its console output. It is a very\nsimple demonstration of a single Parsec API call in Go, requiring just a few lines of code.\n\nThe `rust` folder contains a Rust implementation of the identical decryption program, using the\n[Parsec Rust Client](https://github.com/parallaxsecond/parsec-client-rust).\n\nFinally, the `Dockerfile` resource is used to build the entire application into a Docker container\nso that it can easily be executed an published. Only a single `docker build` command is needed. The\nDockerfile uses a [multi-stage build\nprocess](https://docs.docker.com/develop/develop-images/multistage-build/). The Rust and Go\napplications are built inside staging containers that provide the required tool chains and build\nenvironments. But the final compiled applications are then copied into a slimmer runtime container\nimage for execution.\n\n# How to Build\n\nThe build process uses Docker, so you must first have Docker\n[installed](https://docs.docker.com/get-docker/). However, all other build tools are provided by the\nmulti-stage container images, so there is nothing else that you need to install.\n\nTo build and tag the Docker image locally, simply clone this repo and execute the following command\nfrom within its top-level folder:\n\n```\ndocker build -t hello-parsec .\n```\n\nThis command should download the required dependencies and construct the `hello-parsec` container\nimage.\n\nYou may wish to use the image locally, or push it to a suitable private container repository. Please\nnote that the Parsec maintenance team will ensure that the `hello-parsec` container images are\navailable in a suitable public location.\n\n# How to Run\n\nThis container is designed to check a system where the Parsec service is running. If you do not have\nParsec running yet, you might want to view the [quickstart\nguide](https://parallaxsecond.github.io/parsec-book/getting_started/index.html) to get started with\nthe service.\n\nParsec clients talk to the service using a Unix domain socket. When the client application is\nrunning in a container, as is the case here, the container needs to be able to see the domain socket\non the host. This can be achieved by running the Docker image with a [bind\nmount](https://docs.docker.com/storage/bind-mounts/). By default, Parsec expects to find the domain\nsocket file in the folder `/run/parsec`. If this is the folder that your service is using (which,\nagain, will be the case unless you have explicitly configured it to do otherwise), then the bind\nmount is very simple:\n\n```\ndocker run -v /run/parsec:/run/parsec hello-parsec\n```\n\nThis command will execute the demo client application.\n\n# What Should I See?\n\nIf the `hello-parsec` demo container application successfully connects with the service, you should\nsee the banner message, followed by some details of the service configuration, and finally the\nresults of the RSA encryption round-trips using the example programs in their different languages.\n\nThe output should be similar to what is shown below. It may vary slightly depending on your service\nconfiguration. If you do not see the Parsec banner, then something has gone wrong, and you will need\nto ensure that Parsec is running correctly on your system, and that you have supplied the correct\nbind mount. Make sure, for example, that the file `/run/parsec/parsec.sock` exists, or that you have\nadjusted the above command with the correct path where `parsec.sock` can be found.\n\n```\nChecking for availability of the Parsec service on your system... \n\n                             o   o----------------\n                             |  --------o     o  |\n                             |  |  ---------  |  |\n                             |  |  |       |  |  |\n                             |  |  |       |  |  |\n                             |  |  |       |  |  |\n                             |  |   \\      o  |  |\n                             \\  o    \\        /  /\n                              \\   o   \\      /  /\n                               \\   \\   o    /  o\n                                \\   \\      /  o\n                                 \\   \\    /  /\n                                  \\   \\  /  /\n                                   ---------\n                                    -------\n\n\n+++++++          +          +++++++         ++++++       ++++++++        +++++   \n+       +       + +         +      +       +      +      +              +      +\n+       +      +   +        +       +      +             +             +\n+++++++       +     +       +++++++          ++++        +++++++      +\n+            ++++++  +      +    +                +      +             +\n+           +         +     +     +       +       +      +              +      +\n+          +           +    +      +       +++++++       ++++++++         +++++\n\n          ---- Congratulations! Parsec Is Enabled On This System! -----\n          \n                            https://parsec.community\n                     https://github.com/parallaxsecond/parsec\n\n\nParsec back-end providers enabled (the topmost entry is the default):-\nID: 0x01 (Mbed Crypto provider)\nRunning RSA encryption demo. Three 'Hello Parsec' messages should appear below...\n\nHello Parsec from Rust!\nHello Parsec from Go!\nHello Parsec from the Parsec CLI Tool!\n\nFinished!\n```\n\n# Running More Extensive Tests\n\nThe `hello-parsec` container can optionally be used to execute a full suite of functional tests in\nplace of the default demo. This is achieved by supplying an override to the `docker run` command so\nthat it executes the `parsec-cli-tests.sh` script, which is included in the container image.\n\nRunning the container as follows will execute the tests:\n\n```\ndocker run --rm -v /run/parsec:/run/parsec hello-parsec ./parsec-cli-tests.sh\n```\n\nWhen executed in this way, the output will be different from what is described above. The Parsec\nlogo and banner will not be displayed. Instead, the console will show all of the output from the\ncommand-line test script, which will include a variety of key management and cryptographic\noperations.\n\nThe `parsec-cli-tests.sh` script also accepts some command-line parameters to adjust its behaviour.\nYou can use the `-h` option to get additional help on these.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallaxsecond%2Fhello-parsec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparallaxsecond%2Fhello-parsec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallaxsecond%2Fhello-parsec/lists"}