diff options
author | Patrick Monnerat <pm@datasphere.ch> | 2015-01-27 18:03:56 +0100 |
---|---|---|
committer | Patrick Monnerat <pm@datasphere.ch> | 2015-01-27 18:03:56 +0100 |
commit | ed9a4b9fc46f967da9e6a355f860f2a43505f41b (patch) | |
tree | e594764fb0482c878a2befb4c8382794b04ec6e4 | |
parent | fe79f20957a1e66cd5566236e9e7b873888b0ce0 (diff) |
test: add test cases for sasl external authentication (imap/pop3/smtp).
-rw-r--r-- | tests/data/Makefile.inc | 3 | ||||
-rw-r--r-- | tests/data/test942 | 56 | ||||
-rw-r--r-- | tests/data/test943 | 56 | ||||
-rw-r--r-- | tests/data/test944 | 56 | ||||
-rw-r--r-- | tests/data/test945 | 56 | ||||
-rw-r--r-- | tests/data/test946 | 57 | ||||
-rw-r--r-- | tests/data/test947 | 57 | ||||
-rw-r--r-- | tests/data/test948 | 56 | ||||
-rw-r--r-- | tests/data/test949 | 56 | ||||
-rw-r--r-- | tests/data/test950 | 56 | ||||
-rw-r--r-- | tests/data/test951 | 56 | ||||
-rw-r--r-- | tests/data/test952 | 55 | ||||
-rw-r--r-- | tests/data/test953 | 55 |
13 files changed, 674 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 6467ca0bb..3101da69f 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -97,7 +97,8 @@ test900 test901 test902 test903 test904 test905 test906 test907 test908 \ test909 test910 test911 test912 test913 test914 test915 test916 test917 \ test918 test919 test920 test921 test922 test923 test924 test925 test926 \ test927 test928 test929 test930 test931 test932 test933 test934 test935 \ -test936 test937 test938 test939 test940 test941 \ +test936 test937 test938 test939 test940 test941 test942 test943 test944 \ +test945 test946 test947 test948 test949 test950 test951 test952 test953 \ \ test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \ test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \ diff --git a/tests/data/test942 b/tests/data/test942 new file mode 100644 index 000000000..fb4cfbfb3 --- /dev/null +++ b/tests/data/test942 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +IMAP +SASL +SASL AUTH EXTERNAL +RFC4422 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTHENTICATE + +REPLY dXNlcg== A002 OK AUTHENTICATE completed +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +imap +</server> + <name> +IMAP external authentication + </name> + <command> +'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/942/;UID=1' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL
+dXNlcg==
+A003 SELECT 942
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test943 b/tests/data/test943 new file mode 100644 index 000000000..833a92b83 --- /dev/null +++ b/tests/data/test943 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +IMAP +SASL +SASL AUTH EXTERNAL +RFC4422 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTHENTICATE + +REPLY = A002 OK AUTHENTICATE completed +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +imap +</server> + <name> +IMAP external authentication without credentials + </name> + <command> +'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/943/;UID=1' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL
+=
+A003 SELECT 943
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test944 b/tests/data/test944 new file mode 100644 index 000000000..3328953c2 --- /dev/null +++ b/tests/data/test944 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +IMAP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +CAPA SASL-IR +REPLY AUTHENTICATE A002 OK AUTHENTICATE completed +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +imap +</server> + <name> +IMAP external authentication with initial response + </name> + <command> +'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/944/;UID=1' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL dXNlcg==
+A003 SELECT 944
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test945 b/tests/data/test945 new file mode 100644 index 000000000..158b3579a --- /dev/null +++ b/tests/data/test945 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +IMAP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +CAPA SASL-IR +REPLY AUTHENTICATE A002 OK AUTHENTICATE completed +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +imap +</server> + <name> +IMAP external authentication with initial response without credentials + </name> + <command> +'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/945/;UID=1' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL =
+A003 SELECT 945
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test946 b/tests/data/test946 new file mode 100644 index 000000000..46f7b10b3 --- /dev/null +++ b/tests/data/test946 @@ -0,0 +1,57 @@ +<testcase> +<info> +<keywords> +POP3 +SASL +SASL AUTH EXTERNAL +RFC1734 +RFC4422 +RFC5034 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH + +REPLY dXNlcg== +OK Login successful +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +pop3 +</server> + <name> +POP3 external authentication + </name> + <command> +'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/946' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +CAPA
+AUTH EXTERNAL
+dXNlcg==
+RETR 946
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test947 b/tests/data/test947 new file mode 100644 index 000000000..df1474ea2 --- /dev/null +++ b/tests/data/test947 @@ -0,0 +1,57 @@ +<testcase> +<info> +<keywords> +POP3 +SASL +SASL AUTH EXTERNAL +RFC1734 +RFC4422 +RFC5034 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH + +REPLY = +OK Login successful +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +pop3 +</server> + <name> +POP3 external authentication without credentials + </name> + <command> +'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/947' +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +CAPA
+AUTH EXTERNAL
+=
+RETR 947
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test948 b/tests/data/test948 new file mode 100644 index 000000000..4ed21cb1f --- /dev/null +++ b/tests/data/test948 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +POP3 +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC1734 +RFC4422 +RFC5034 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH +OK Login successful +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +pop3 +</server> + <name> +POP3 external authentication with initial response + </name> + <command> +'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/948' --sasl-ir +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +CAPA
+AUTH EXTERNAL dXNlcg==
+RETR 948
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test949 b/tests/data/test949 new file mode 100644 index 000000000..93f7f97f4 --- /dev/null +++ b/tests/data/test949 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +POP3 +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC1734 +RFC4422 +RFC5034 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH +OK Login successful +</servercmd> +<data> +From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data> +</reply> + +# +# Client-side +<client> +<server> +pop3 +</server> + <name> +POP3 external authentication with initial response without credentials + </name> + <command> +'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/949' --sasl-ir +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +CAPA
+AUTH EXTERNAL =
+RETR 949
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test950 b/tests/data/test950 new file mode 100644 index 000000000..b4dab8ae8 --- /dev/null +++ b/tests/data/test950 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +SMTP +SASL +SASL AUTH EXTERNAL +RFC4422 +RFC4954 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH 334 EXTERNAL supported +REPLY dXNlcg== 235 Authenticated +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +smtp +</server> + <name> +SMTP external authentication + </name> +<stdin> +mail body
+</stdin> + <command> +'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/950' --mail-rcpt recipient@example.com --mail-from sender@example.com -T - +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +EHLO 950
+AUTH EXTERNAL
+dXNlcg==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol> +<upload> +mail body
+.
+</upload> +</verify> +</testcase> diff --git a/tests/data/test951 b/tests/data/test951 new file mode 100644 index 000000000..1dd21a679 --- /dev/null +++ b/tests/data/test951 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +SMTP +SASL +SASL AUTH EXTERNAL +RFC4422 +RFC4954 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH 334 EXTERNAL supported +REPLY = 235 Authenticated +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +smtp +</server> + <name> +SMTP external authentication without credentials + </name> +<stdin> +mail body
+</stdin> + <command> +'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/951' --mail-rcpt recipient@example.com --mail-from sender@example.com -T - +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +EHLO 951
+AUTH EXTERNAL
+=
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol> +<upload> +mail body
+.
+</upload> +</verify> +</testcase> diff --git a/tests/data/test952 b/tests/data/test952 new file mode 100644 index 000000000..8537afd12 --- /dev/null +++ b/tests/data/test952 @@ -0,0 +1,55 @@ +<testcase> +<info> +<keywords> +SMTP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +RFC4954 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH 235 Authenticated +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +smtp +</server> + <name> +SMTP external authentication with initial response + </name> +<stdin> +mail body
+</stdin> + <command> +'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/952' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T - +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +EHLO 952
+AUTH EXTERNAL dXNlcg==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol> +<upload> +mail body
+.
+</upload> +</verify> +</testcase> diff --git a/tests/data/test953 b/tests/data/test953 new file mode 100644 index 000000000..94db3aaae --- /dev/null +++ b/tests/data/test953 @@ -0,0 +1,55 @@ +<testcase> +<info> +<keywords> +SMTP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +RFC4954 +</keywords> +</info> + +# +# Server-side +<reply> +<servercmd> +AUTH EXTERNAL +REPLY AUTH 235 Authenticated +</servercmd> +</reply> + +# +# Client-side +<client> +<server> +smtp +</server> + <name> +SMTP external authentication with initial response without credentials + </name> +<stdin> +mail body
+</stdin> + <command> +'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/953' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T - +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +EHLO 953
+AUTH EXTERNAL =
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol> +<upload> +mail body
+.
+</upload> +</verify> +</testcase> |