From e2a28dfa05af41fbc7aa3a525c03115a74016119 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 12 Jan 2018 16:50:20 +0000 Subject: [PATCH 6/7] test: Add a test for authenticating with an empty authorization identity Signed-off-by: Simon McVittie --- test/Makefile.am | 1 + test/data/auth/external-auto.auth-script | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/data/auth/external-auto.auth-script diff --git a/test/Makefile.am b/test/Makefile.am index feb84a65..e40088ff 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -472,6 +472,7 @@ static_data = \ data/auth/anonymous-server-successful.auth-script \ data/auth/cancel.auth-script \ data/auth/client-out-of-mechanisms.auth-script \ + data/auth/external-auto.auth-script \ data/auth/external-failed.auth-script \ data/auth/external-root.auth-script \ data/auth/external-silly.auth-script \ diff --git a/test/data/auth/external-auto.auth-script b/test/data/auth/external-auto.auth-script new file mode 100644 index 00000000..ddef4e1e --- /dev/null +++ b/test/data/auth/external-auto.auth-script @@ -0,0 +1,18 @@ +# Test that we can authenticate with an empty authorization identity +SERVER +EXPECT_HAVE_NO_CREDENTIALS + +# C: "I want to use EXTERNAL, I decline to specify an initial response" +SEND 'AUTH EXTERNAL' +# S: "OK, who do you claim to be?" +EXPECT_COMMAND DATA +EXPECT_STATE WAITING_FOR_INPUT +EXPECT_HAVE_NO_CREDENTIALS +# C: "I am whoever the kernel says I am" +SEND 'DATA' +# S: "I suppose I can't argue with that" +EXPECT_COMMAND OK +EXPECT_STATE WAITING_FOR_INPUT +SEND 'BEGIN' +EXPECT_STATE AUTHENTICATED +EXPECT_HAVE_SOME_CREDENTIALS -- 2.15.1