diff options
author | Lans Zhang <jia.zhang@windriver.com> | 2017-08-16 10:47:33 +0800 |
---|---|---|
committer | Lans Zhang <jia.zhang@windriver.com> | 2017-08-16 10:47:33 +0800 |
commit | 9fc35f2627a194caa45bd7cf217aaf9437d1f5c4 (patch) | |
tree | f455f7e7d23f23e34f32d0672b2b8d236c47328e | |
parent | 4b41056970264494a9b5b45eaa4b99b99aa72845 (diff) | |
download | meta-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.md | 37 |
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 | |||
78 | properly. Otherwise, switch_root will fail to mount the real rootfs and kernel | 78 | properly. Otherwise, switch_root will fail to mount the real rootfs and kernel |
79 | panic will happen due to this failure. | 79 | panic will happen due to this failure. |
80 | 80 | ||
81 | The default external IMA policy is located at `/etc/ima_policy.default` in | 81 | The default external IMA policy is located at `/etc/ima/ima_policy.default` in |
82 | initramfs. If a custom external IMA policy file exists at `/etc/ima_policy`, | 82 | initramfs. |
83 | the default external IMA policy file won't be used. In addition, the IMA | ||
84 | policies signed by the trusted IMA certificate in the real rootfs is also | ||
85 | attempted to be loaded if any. | ||
86 | 83 | ||
87 | ###### The custom external IMA policy | 84 | ###### The custom external IMA policy |
88 | If the default external IMA policy cannot meet the protection requirement, it | 85 | If the default external IMA policy cannot meet the protection requirement, it |
89 | is allowed to define the custom external IMA policy. | 86 | is allowed to define the custom external IMA policy, which will be used instead |
87 | of the default external IMA policy. | ||
90 | 88 | ||
91 | - Deploy the custom policy file to installer image | 89 | The 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 | |||
96 | The custom external IMA policy file is eventually installed to `/etc/ima_policy` | ||
97 | in initramfs. | 90 | in initramfs. |
98 | 91 | ||
92 | In addition, the IMA policies signed by the trusted IMA certificate in the real | ||
93 | rootfs 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 |
100 | The private key come in two flavors; one used to sign all regular files in | 97 | The private key come in two flavors; one used to sign all regular files in |
101 | rootfs and one used by RPM to re-sign the executable, shared library, kernel | 98 | rootfs 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 | |||
113 | demonstration. Please ensure you know what your risk is to use the sample keys | 110 | demonstration. Please ensure you know what your risk is to use the sample keys |
114 | in your product, because they are completely public. | 111 | in your product, because they are completely public. |
115 | 112 | ||
113 | ### RPM File Signing | ||
114 | The payloads in a RPM are signed by the private key during the build, and each | ||
115 | IMA signatures for the corresponding payload file will be eventually written | ||
116 | to the filesystem during RPM installation. | ||
117 | |||
118 | In order to check whether a RPM is signed, run the command | ||
119 | `rpm -qp --queryformat "%{FILESIGNATURES:arraysize}\n" <rpm>` | ||
120 | |||
121 | If the result is not none or zero, the specified RPM contains the signed | ||
122 | payloads. | ||
123 | |||
124 | ### Tarball Signing | ||
125 | Packing the IMA signatures into a tarball is another method to preserve the | ||
126 | IMA signatures. Be aware of using `--xattrs --xattrs-include=security\\.ima` | ||
127 | with both extraction and creation operations. | ||
128 | |||
116 | ### Best practice | 129 | ### Best practice |
117 | The following best practices should be applied with using IMA. | 130 | The following best practices should be applied with using IMA. |
118 | 131 | ||