summaryrefslogtreecommitdiffstats
path: root/meta-parsec/README.md
diff options
context:
space:
mode:
authorAnton Antonov <anton.antonov@arm.com>2021-04-09 12:14:07 +0100
committerArmin Kuster <akuster808@gmail.com>2021-04-12 07:06:46 -0700
commit409a8d4276efd9bf8c06a7ccf6ea85fb6e83b04a (patch)
tree3e5f053f021cf8f1154d16bc65f40ee9969142d0 /meta-parsec/README.md
parent6ad6bb0141defbcf25828e39314145eb43dea06b (diff)
downloadmeta-security-409a8d4276efd9bf8c06a7ccf6ea85fb6e83b04a.tar.gz
Add meta-parsec layer into meta-security.
The layer contains recipes for Parsec service version 0.7.0 and parsec-tool version 0.3.0. The Parsec service is built with all supported providers and deployed with the MbedCrypto provider enabled. Both systemd and sysv-init are supported. Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-parsec/README.md')
-rw-r--r--meta-parsec/README.md186
1 files changed, 186 insertions, 0 deletions
diff --git a/meta-parsec/README.md b/meta-parsec/README.md
new file mode 100644
index 0000000..a2736b6
--- /dev/null
+++ b/meta-parsec/README.md
@@ -0,0 +1,186 @@
1meta-parsec layer
2==============
3
4This layer contains recipes for the Parsec service with Mbed-Crypto,
5Pkcs11 and TPM providers and parsec tools.
6
7Dependencies
8============
9
10This layer depends on:
11
12 URI: git://git.openembedded.org/meta-openembedded
13 branch: master
14 revision: HEAD
15 prio: default
16
17 URI git://git.yoctoproject.org/meta-security
18 branch: master
19 revision: HEAD
20 prio: default
21
22 URI https://github.com/meta-rust/meta-rust.git
23 branch: master
24 revision: HEAD
25 prio: default
26
27 URI https://github.com/kraj/meta-clang.git
28 branch: master
29 revision: HEAD
30 prio: default
31
32Adding the meta-parsec layer to your build
33==========================================
34
35In order to use this layer, you need to make the build system aware of it.
36
37You can add it to the build system by adding the
38location of the meta-parsec layer to bblayers.conf, along with any
39other layers needed. e.g.:
40
41 BBLAYERS ?= " \
42 /path/to/yocto/meta \
43 /path/to/yocto/meta-yocto \
44 /path/to/yocto/meta-yocto-bsp \
45 /path/to/meta-openembedded/meta-oe \
46 /path/to/meta-openembedded/meta-python \
47 /path/to/meta-rust \
48 /path/to/meta-clang \
49 /path/to/meta-security/meta-tpm \
50 /path/to/meta-security/meta-parsec \
51 "
52
53To include the Parsec service into your image add following into the
54local.conf:
55
56 IMAGE_INSTALL_append = " parsec-service"
57
58 The Parsec service will be deployed into the image built with all the supported
59providers and with the default config file from the Parsec repository:
60https://github.com/parallaxsecond/parsec/blob/main/config.toml
61 The default Parsec service config file contains the MbedCrypto provider
62enabled. The config file needs to be updated to use the Parsec service
63with other providers like TPM or PKCS11. The required procedures are
64covered in Parsec documentation.
65https://parallaxsecond.github.io/parsec-book/
66
67Updating recipes
68================
69
70 The parsec-service and parsec-tool recipes use include files with lists
71of all rust crates required. This allows bitbake to fetch all the necessary
72dependent crates, as well as a pegged version of the crates.io index,
73to ensure maximum reproducibility.
74 It's recommended to use cargo-bitbake to generate include files for new
75versions of parsec recipes.
76https://github.com/meta-rust/cargo-bitbake
77
78 When you have crago-bitbake built:
791. Checkout the required version of parsec repository.
802. Run cargo-bitbake inside the repository. It will produce a BB file.
813. Create a new include file with SRC_URI and LIC_FILES_CHKSUM from the BB file.
82
83Manual testing with runqemu
84===========================
85
86 This layer also contains a recipe for pasec-tool which can be used for
87manual testing of the Parsec service:
88
89 IMAGE_INSTALL_append += " parsec-tools"
90
91 There are a series of Parsec Demo videos showing how to use parsec-tool
92to test the Parsec service base functionality:
93https://www.youtube.com/watch?v=ido0CyUdMHM&list=PLKjl7IFAwc4S7WQqqphCsyy6DPDxJ2Skg&index=4
94
95 You can use runqemu to start a VM with a built image file and run
96manual tests with parsec-tool.
97
981. MbedCrypto provider
99 The default Parsec service config file contains the MbedCrypto provider
100enabled. No changes required for manual testing.
101
1022. PKCS11 provider
103 The Software HSM can be used for manual testing of the provider by
104including it into your test image:
105
106 IMAGE_INSTALL_append += " softhsm"
107
108Inside the running VM:
109- Stop Parsec
110```bash
111systemctl stop parsec
112```
113- Initialise a token and notice the result slot number
114```bash
115softhsm2-util --init-token --slot 0 --label "Parsec Service" --pin 123456 --so-pin 123456
116```
117- Change the token ownership:
118```bash
119for d in /var/lib/softhsm/tokens/*; do chown -R parsec $d; done
120```
121- Enable the PKCS11 provider and update its parameters in the Parsec config file
122/etc/parsec/config.toml
123```
124library_path = "/usr/lib/softhsm/libsofthsm2.so"
125slot_number = <slot number>
126user_pin = "123456"
127```
128- Start Parsec
129```bash
130systemctl start parsec
131```
132
1333. TPM provider
134 The IBM Software TPM service can be used for manual testing of the provider by
135including it into your test image:
136
137 IMAGE_INSTALL_append += " ibmswtpm2 tpm2-tools libtss2 libtss2-tcti-mssim"
138
139Inside the running VM:
140- Stop Parsec
141```bash
142systemctl stop parsec
143```
144- Start and configure the Software TPM server
145```bash
146 /usr/bin/tpm_server &
147 sleep 5
148 /usr/bin/tpm2_startup -c -T mssim
149 /usr/bin/tpm2_changeauth -c owner tpm_pass
150```
151- Enable the TPM provider and update its parameters in the Parsec config file
152/etc/parsec/config.toml
153```
154tcti = "mssim"
155owner_hierarchy_auth = "hex:74706d5f70617373"
156```
157- Start Parsec
158```bash
159systemctl start parsec
160```
161
162Maintenance
163-----------
164
165Send pull requests, patches, comments or questions to yocto@yoctoproject.org
166
167When sending single patches, please using something like:
168'git send-email -1 --to yocto@yoctoproject.org --subject-prefix=meta-parsec][PATCH'
169
170These values can be set as defaults for this repository:
171
172$ git config sendemail.to yocto@yoctoproject.org
173$ git config format.subjectPrefix meta-parsec][PATCH
174
175Now you can just do 'git send-email origin/master' to send all local patches.
176
177Maintainers: Anton Antonov <Anton.Antonov@arm.com>
178 Armin Kuster <akuster808@gmail.com>
179
180
181License
182=======
183
184All metadata is MIT licensed unless otherwise stated. Source code included
185in tree for individual recipes is under the LICENSE stated in each recipe
186(.bb file) unless otherwise stated.