Skip to content

Commit 3fa8a7a

Browse files
committed
Simplify scs-0101-v1 to remove gratuitous regulation
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent 19c29f7 commit 3fa8a7a

3 files changed

Lines changed: 13 additions & 22 deletions

File tree

Standards/scs-0101-v1-entropy.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,11 @@ will be available in virtual instances.
9696

9797
### Flavors
9898

99-
It is recommended that all flavors have the following attribute:
99+
The following optional flavor extra_specs are relevant in case an
100+
external HRNG is to be used:
100101

101102
```console
102103
hw_rng:allowed=True
103-
```
104-
105-
The following attributes are optional:
106-
107-
```console
108104
hw_rng:rate_bytes - The allowed amount of bytes for the the guest
109105
to read from the host's entropy per period.
110106
hw_rng:rate_period - Sets the duration of a read period in seconds.
@@ -116,9 +112,10 @@ It is recommended to use images having a kernel (patch level) version 5.18
116112
or up. This condition is already satisfied by every mandatory image defined
117113
in the [Image Metadata Standard](https://github.com/SovereignCloudStack/standards/blob/main/Standards/scs-0102-v1-image-metadata.md).
118114

119-
It is recommended that images activate the attribute `hw_rng_model: virtio`.
115+
An image may activate the attribute `hw_rng_model: virtio` so
116+
that an external HRNG can be used.
120117

121-
The daemon `rngd` must be installed (usually from `rng-tools`
118+
The daemon `rngd` may be installed (usually from `rng-tools`
122119
or `rng-utils`).
123120

124121
The user may choose to use the `virtio-rng` device via `rngd`.

Standards/scs-0101-w1-entropy-implementation-testing.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,16 @@ With reasonably recent hardware—x86 CPU with RDRAND/RDSEED (Intel from 2012,
1212
AMD from 2015) or ARM CPU with FEAT_RNG or FEAT_RNG_TRAP—and recent VM image—Linux
1313
kernel 5.18 or higher—, there is (almost) nothing to be done.
1414

15-
Only the flavor and image attributes required by the standard have to be set:
16-
17-
- flavor extra_spec: `hw_rng:allowed=True` ,
18-
- image property: `hw_rng_model: virtio` .
19-
2015
## Automated tests
2116

2217
The following testcases [are implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py):
2318

24-
- `scs-0101-image-property` ensures that each flavor has the extra spec `hw_rng:allowed=True`,
25-
- `scs-0101-flavor-property` ensures that each public image has the property `hw_rng_model: virtio`,
26-
- `scs-0101-rngd` ensures that the service `rngd` is present on a sample VM,
2719
- `scs-0101-entropy-avail` ensures that the special file `/proc/sys/kernel/random/entropy_avail` contains
2820
the value 256 (pinned since kernel 5.18) on a sample VM,
2921
- `scs-0101-fips-test` ensures that the number of FIPS 140-2 failures is below 5 out of 1000 blocks
3022
tested, as determined by `cat /dev/random | rngtest -c 1000` on a sample VM.
3123

32-
Note: The latter two items act as surrogates for the following item, which
24+
These testcases act as surrogates for the following item, which
3325
cannot be detected directly:
3426

3527
- CPU instructions for accessing entropy are available to the VMs.
@@ -39,6 +31,12 @@ checked, because of two reasons: (a) we already check the file `entropy_avail`
3931
(see subsection on Errors), and (b) users can always choose a recent image,
4032
as ensured by the image metadata standard.
4133

34+
Three further testcases are available, but currently unused:
35+
36+
- `scs-0101-image-property` ensures that each flavor has the extra spec `hw_rng:allowed=True`,
37+
- `scs-0101-flavor-property` ensures that each public image has the property `hw_rng_model: virtio`,
38+
- `scs-0101-rngd` ensures that the service `rngd` is present on a sample VM.
39+
4240
## Manual tests
4341

4442
None.

Tests/scs-compatible-iaas.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,8 @@ modules:
305305
url: https://docs.scs.community/standards/scs-0101-v1-entropy
306306
targets:
307307
main:
308-
- scs-0101-rngd
309308
- scs-0101-entropy-avail
310309
- scs-0101-fips-test
311-
recommended:
312-
- scs-0101-flavor-property
313-
- scs-0101-image-property
314310
- id: scs-0102-v1
315311
name: Image metadata v1
316312
url: https://docs.scs.community/standards/scs-0102-v1-image-metadata
@@ -527,7 +523,7 @@ versions:
527523
include:
528524
- opc-v2022.11
529525
- scs-0100-v3.1
530-
- scs-0101-v1
526+
# - scs-0101-v1 remove this because it hasn't been an issue for quite a while
531527
- scs-0102-v2 # instead of scs-0102-v1
532528
- scs-0103-v1
533529
- ref: scs-0104-v1-2

0 commit comments

Comments
 (0)