summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-08-16 10:47:33 +0800
committerLans Zhang <jia.zhang@windriver.com>2017-08-16 10:47:33 +0800
commit9fc35f2627a194caa45bd7cf217aaf9437d1f5c4 (patch)
treef455f7e7d23f23e34f32d0672b2b8d236c47328e
parent4b41056970264494a9b5b45eaa4b99b99aa72845 (diff)
downloadmeta-secure-core-9fc35f2627a194caa45bd7cf217aaf9437d1f5c4.tar.gz
meta-integrity/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--meta-integrity/README.md37
1 files changed, 25 insertions, 12 deletions
diff --git a/meta-integrity/README.md b/meta-integrity/README.md
index 4d73c38..ee22850 100644
--- a/meta-integrity/README.md
+++ b/meta-integrity/README.md
@@ -78,24 +78,21 @@ switch_root from the real rootfs is launched and it must be already signed
78properly. Otherwise, switch_root will fail to mount the real rootfs and kernel 78properly. Otherwise, switch_root will fail to mount the real rootfs and kernel
79panic will happen due to this failure. 79panic will happen due to this failure.
80 80
81The default external IMA policy is located at `/etc/ima_policy.default` in 81The default external IMA policy is located at `/etc/ima/ima_policy.default` in
82initramfs. If a custom external IMA policy file exists at `/etc/ima_policy`, 82initramfs.
83the default external IMA policy file won't be used. In addition, the IMA
84policies signed by the trusted IMA certificate in the real rootfs is also
85attempted to be loaded if any.
86 83
87###### The custom external IMA policy 84###### The custom external IMA policy
88If the default external IMA policy cannot meet the protection requirement, it 85If the default external IMA policy cannot meet the protection requirement, it
89is allowed to define the custom external IMA policy. 86is allowed to define the custom external IMA policy, which will be used instead
87of the default external IMA policy.
90 88
91- Deploy the custom policy file to installer image 89The custom external IMA policy file is eventually installed to `/etc/ima/ima_policy`
92
93- Create `/opt/installer/sbin/config-installer.sh` in installer image
94 Define the IMA_POLICY variable, pointing to the path of policy file.
95
96The custom external IMA policy file is eventually installed to `/etc/ima_policy`
97in initramfs. 90in initramfs.
98 91
92In addition, the IMA policies signed by the trusted IMA certificate in the real
93rootfs are also attempted to be loaded if any, in the pattern of file name as
94`/etc/ima/ima_policy*`.
95
99##### IMA certificate & private Key 96##### IMA certificate & private Key
100The private key come in two flavors; one used to sign all regular files in 97The private key come in two flavors; one used to sign all regular files in
101rootfs and one used by RPM to re-sign the executable, shared library, kernel 98rootfs and one used by RPM to re-sign the executable, shared library, kernel
@@ -113,6 +110,22 @@ default, the sample keys are used for the purpose of development and
113demonstration. Please ensure you know what your risk is to use the sample keys 110demonstration. Please ensure you know what your risk is to use the sample keys
114in your product, because they are completely public. 111in your product, because they are completely public.
115 112
113### RPM File Signing
114The payloads in a RPM are signed by the private key during the build, and each
115IMA signatures for the corresponding payload file will be eventually written
116to the filesystem during RPM installation.
117
118In order to check whether a RPM is signed, run the command
119`rpm -qp --queryformat "%{FILESIGNATURES:arraysize}\n" <rpm>`
120
121If the result is not none or zero, the specified RPM contains the signed
122payloads.
123
124### Tarball Signing
125Packing the IMA signatures into a tarball is another method to preserve the
126IMA signatures. Be aware of using `--xattrs --xattrs-include=security\\.ima`
127with both extraction and creation operations.
128
116### Best practice 129### Best practice
117The following best practices should be applied with using IMA. 130The following best practices should be applied with using IMA.
118 131