Policy output now more clearly prints the policy version.

This commit is contained in:
Joe Testa 2020-07-14 17:38:15 -04:00
parent 00ce44e728
commit b95969bbc0
29 changed files with 29 additions and 29 deletions

View File

@ -357,7 +357,7 @@ macs = %s
def get_name_and_version(self) -> str:
'''Returns a string of this Policy's name and version.'''
return '%s v%s' % (self._name, self._version)
return '%s (version %s)' % (self._name, self._version)
def is_server_policy(self) -> bool:

View File

@ -1 +1 @@
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test1 v1"}
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test1 (version 1)"}

View File

@ -1,3 +1,3 @@
Host: localhost
Policy: Docker policy: test1 v1
Policy: Docker policy: test1 (version 1)
Result: ✔ Passed

View File

@ -1 +1 @@
{"errors": ["RSA hostkey (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 3072", "RSA CA key (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 1024"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test10 v1"}
{"errors": ["RSA hostkey (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 3072", "RSA CA key (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 1024"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test10 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker poliicy: test10 v1
Policy: Docker poliicy: test10 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": ["Key exchanges did not match. Expected: ['kex_alg1', 'kex_alg2']; Actual: ['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1']"], "host": "localhost", "passed": false, "policy": "Docker policy: test2 v1"}
{"errors": ["Key exchanges did not match. Expected: ['kex_alg1', 'kex_alg2']; Actual: ['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1']"], "host": "localhost", "passed": false, "policy": "Docker policy: test2 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test2 v1
Policy: Docker policy: test2 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": ["Host key types did not match. Expected: ['ssh-rsa', 'ssh-dss', 'key_alg1']; Actual: ['ssh-rsa', 'ssh-dss']"], "host": "localhost", "passed": false, "policy": "Docker policy: test3 v1"}
{"errors": ["Host key types did not match. Expected: ['ssh-rsa', 'ssh-dss', 'key_alg1']; Actual: ['ssh-rsa', 'ssh-dss']"], "host": "localhost", "passed": false, "policy": "Docker policy: test3 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test3 v1
Policy: Docker policy: test3 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": ["Ciphers did not match. Expected: ['cipher_alg1', 'cipher_alg2']; Actual: ['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se']"], "host": "localhost", "passed": false, "policy": "Docker policy: test4 v1"}
{"errors": ["Ciphers did not match. Expected: ['cipher_alg1', 'cipher_alg2']; Actual: ['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se']"], "host": "localhost", "passed": false, "policy": "Docker policy: test4 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test4 v1
Policy: Docker policy: test4 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": ["MACs did not match. Expected: ['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac_alg1', 'hmac-md5-96']; Actual: ['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96']"], "host": "localhost", "passed": false, "policy": "Docker policy: test5 v1"}
{"errors": ["MACs did not match. Expected: ['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac_alg1', 'hmac-md5-96']; Actual: ['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96']"], "host": "localhost", "passed": false, "policy": "Docker policy: test5 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test5 v1
Policy: Docker policy: test5 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker poliicy: test7 v1"}
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker poliicy: test7 (version 1)"}

View File

@ -1,3 +1,3 @@
Host: localhost
Policy: Docker poliicy: test7 v1
Policy: Docker poliicy: test7 (version 1)
Result: ✔ Passed

View File

@ -1 +1 @@
{"errors": ["RSA CA key (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 2048; Actual: 1024"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test8 v1"}
{"errors": ["RSA CA key (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 2048; Actual: 1024"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test8 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker poliicy: test8 v1
Policy: Docker poliicy: test8 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": ["RSA hostkey (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 3072"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test9 v1"}
{"errors": ["RSA hostkey (ssh-rsa-cert-v01@openssh.com) sizes did not match. Expected: 4096; Actual: 3072"], "host": "localhost", "passed": false, "policy": "Docker poliicy: test9 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker poliicy: test9 v1
Policy: Docker poliicy: test9 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test11 v1"}
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test11 (version 1)"}

View File

@ -1,3 +1,3 @@
Host: localhost
Policy: Docker policy: test11 v1
Policy: Docker policy: test11 (version 1)
Result: ✔ Passed

View File

@ -1 +1 @@
{"errors": ["RSA hostkey (rsa-sha2-256) sizes did not match. Expected: 4096; Actual: 3072", "RSA hostkey (rsa-sha2-512) sizes did not match. Expected: 4096; Actual: 3072", "RSA hostkey (ssh-rsa) sizes did not match. Expected: 4096; Actual: 3072"], "host": "localhost", "passed": false, "policy": "Docker policy: test12 v1"}
{"errors": ["RSA hostkey (rsa-sha2-256) sizes did not match. Expected: 4096; Actual: 3072", "RSA hostkey (rsa-sha2-512) sizes did not match. Expected: 4096; Actual: 3072", "RSA hostkey (ssh-rsa) sizes did not match. Expected: 4096; Actual: 3072"], "host": "localhost", "passed": false, "policy": "Docker policy: test12 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test12 v1
Policy: Docker policy: test12 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test13 v1"}
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test13 (version 1)"}

View File

@ -1,3 +1,3 @@
Host: localhost
Policy: Docker policy: test13 v1
Policy: Docker policy: test13 (version 1)
Result: ✔ Passed

View File

@ -1 +1 @@
{"errors": ["Group exchange (diffie-hellman-group-exchange-sha256) modulus sizes did not match. Expected: 4096; Actual: 2048"], "host": "localhost", "passed": false, "policy": "Docker policy: test14 v1"}
{"errors": ["Group exchange (diffie-hellman-group-exchange-sha256) modulus sizes did not match. Expected: 4096; Actual: 2048"], "host": "localhost", "passed": false, "policy": "Docker policy: test14 (version 1)"}

View File

@ -1,5 +1,5 @@
Host: localhost
Policy: Docker policy: test14 v1
Policy: Docker policy: test14 (version 1)
Result: ❌ Failed!

Errors:

View File

@ -1 +1 @@
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test6 v1"}
{"errors": [], "host": "localhost", "passed": true, "policy": "Docker policy: test6 (version 1)"}

View File

@ -1,3 +1,3 @@
Host: localhost
Policy: Docker policy: test6 v1
Policy: Docker policy: test6 (version 1)
Result: ✔ Passed