From d82528c9c9bef5a411cab9e92e75b1514391750e Mon Sep 17 00:00:00 2001 From: Sergii Kipot Date: Thu, 19 Mar 2020 13:33:32 +0100 Subject: [PATCH] TT#76668 Add goss check for absence of old dsa1024 sipwise apt key Also check that there are no expired keys The key was used to sign repos for old unsupported releases. Change-Id: Ia5dd91c4d8b2e54f4fc18626ef3968c95265bdf6 --- templates/140_apt-keys.yaml.tt2 | 13 +++++++++++++ templates/goss.yaml.tt2 | 1 + 2 files changed, 14 insertions(+) create mode 100644 templates/140_apt-keys.yaml.tt2 diff --git a/templates/140_apt-keys.yaml.tt2 b/templates/140_apt-keys.yaml.tt2 new file mode 100644 index 0000000..ad95056 --- /dev/null +++ b/templates/140_apt-keys.yaml.tt2 @@ -0,0 +1,13 @@ +command: + apt-key list 2>&1 | grep -q expired: + exit-status: 1 + stdout: [] + stderr: [] + timeout: 10000 + + apt-key list --with-colons | grep '^pub' | cut -d':' -f 5 | egrep -o '.{8}$': + exit-status: 0 + stdout: + - "!A42C4F2A" + stderr: [] + timeout: 10000 diff --git a/templates/goss.yaml.tt2 b/templates/goss.yaml.tt2 index 6ef0ce4..1a14eff 100644 --- a/templates/goss.yaml.tt2 +++ b/templates/goss.yaml.tt2 @@ -9,6 +9,7 @@ gossfile: 132_filesys-ngcp-templates.yaml: {} 133_filesys-deprecated.yaml: {} 134_filesys-voisniff.yaml: {} + 140_apt-keys.yaml: {} 200_user-debian.yaml: {} 210_user-ngcp.yaml: {} 310_package-ngcp.yaml: {}