summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorPhillip Smyth <phillip.smyth@codethink.co.uk>2017-10-07 15:57:15 +0100
committerPhillip Smyth <phillip.smyth@codethink.co.uk>2017-10-07 15:57:15 +0100
commit66ab24a4f21fb0d0978938bb0ad661e12fa25e4c (patch)
tree856bad582c466d19df6705a59aa44e56169a9fea /testing
parent1228c8dc2b1624c8e8c866107c3768d8a47fad29 (diff)
downloadgitano-nexus/ed25519.tar.gz
Ticket: Check for ED25519 support in ssh keynexus/ed25519
Added ED25519 support. config.lua: Changed the manual keytype check into a function call from util.lua usercommand: Changed the manual keytype check into a function call from util.lua util.lua: Added a keycheck function that returns true if an invalid keytype is detected library.yarn: Added implementation of createsshkey which uses ED25519 as a parameter 02-commands-sshkey.yarn: Modified the "ssh key basics" Scenario to create a second key of type ED25519 and test it
Diffstat (limited to 'testing')
-rw-r--r--testing/.library.yarn.swpbin0 -> 16384 bytes
-rw-r--r--testing/02-commands-sshkey.yarn8
-rw-r--r--testing/keys/testinstance@newkey_Ed255197
-rw-r--r--testing/keys/testinstance@newkey_Ed25519.pub1
-rw-r--r--testing/library.yarn6
5 files changed, 20 insertions, 2 deletions
diff --git a/testing/.library.yarn.swp b/testing/.library.yarn.swp
new file mode 100644
index 0000000..d62016e
--- /dev/null
+++ b/testing/.library.yarn.swp
Binary files differ
diff --git a/testing/02-commands-sshkey.yarn b/testing/02-commands-sshkey.yarn
index da8a309..fc024b4 100644
--- a/testing/02-commands-sshkey.yarn
+++ b/testing/02-commands-sshkey.yarn
@@ -24,15 +24,20 @@ This information is also shown in `sshkey list`.
New keys can be added.
- GIVEN testinstance has keys called newkey
+ GIVEN testinstance has keys called newkey
+ AND testinstance has keys called edkey of type Ed25519
WHEN testinstance uses their ssh public key called newkey as stdin
AND testinstance adminkey runs sshkey add newkey
+ THEN the output contains SSH authorised key file updated
+ WHEN testinstance uses their ssh public key called edkey as stdin
+ AND testinstance adminkey runs sshkey add edkey
THEN the output contains SSH authorised key file updated
Verify the new keys are listed for the user.
WHEN testinstance adminkey runs sshkey list
THEN the output contains newkey
+ AND the output contains edkey
We can delete the old key and proceed with the new key in future.
@@ -44,6 +49,7 @@ We can delete the old key and proceed with the new key in future.
FINALLY the instance is torn down
+
SSH key tracking
----------------
diff --git a/testing/keys/testinstance@newkey_Ed25519 b/testing/keys/testinstance@newkey_Ed25519
new file mode 100644
index 0000000..369d60b
--- /dev/null
+++ b/testing/keys/testinstance@newkey_Ed25519
@@ -0,0 +1,7 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACAwGjSnIXXiyuszXalOR24kstP2q5z/eUz3czF1Co6FjgAAAKCJ+h3Zifod
+2QAAAAtzc2gtZWQyNTUxOQAAACAwGjSnIXXiyuszXalOR24kstP2q5z/eUz3czF1Co6Fjg
+AAAECwQpGPDj/DisyXljioqnTv+MdCuBc9SKDBco/qOQ3gZDAaNKchdeLK6zNdqU5HbiSy
+0/arnP95TPdzMXUKjoWOAAAAG3Rlc3RpbnN0YW5jZS1FZDI1NTE5QG5ld2tleQEC
+-----END OPENSSH PRIVATE KEY-----
diff --git a/testing/keys/testinstance@newkey_Ed25519.pub b/testing/keys/testinstance@newkey_Ed25519.pub
new file mode 100644
index 0000000..94ff2bc
--- /dev/null
+++ b/testing/keys/testinstance@newkey_Ed25519.pub
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDAaNKchdeLK6zNdqU5HbiSy0/arnP95TPdzMXUKjoWO testinstance-Ed25519@newkey
diff --git a/testing/library.yarn b/testing/library.yarn
index cc03122..85e1523 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -43,9 +43,13 @@ SSH keys. Sometimes it's helpful to be able to work with these...
IMPLEMENTS GIVEN a unix user called ([a-z][a-z0-9]*)
$GTT createunixuser "$MATCH_1"
- IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called ([a-z][a-z0-9]*)
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called ([a-z][a-z0-9]*)
$GTT createsshkey "$MATCH_1" "$MATCH_2"
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called ([a-z][a-z0-9]*) of type ([a-z][a-z0-9]*)?
+ $GTT createsshkey "$MATCH_1" "$MATCH_2" "$MATCH_3"
+
+
IMPLEMENTS WHEN ([a-z][a-z0-9]*) uses their ssh public key called ([a-z][a-z0-9]*) as stdin
cp "$DATADIR/user-home-$MATCH_1/.ssh/$MATCH_2.pub" "$DATADIR/stdin"