test: add test cases for sasl external authentication (imap/pop3/smtp).

This commit is contained in:
Patrick Monnerat 2015-01-27 18:03:56 +01:00
Родитель fe79f20957
Коммит ed9a4b9fc4
13 изменённых файлов: 674 добавлений и 1 удалений

Просмотреть файл

@ -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 \

56
tests/data/test942 Normal file
Просмотреть файл

@ -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>

56
tests/data/test943 Normal file
Просмотреть файл

@ -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>

56
tests/data/test944 Normal file
Просмотреть файл

@ -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>

56
tests/data/test945 Normal file
Просмотреть файл

@ -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>

57
tests/data/test946 Normal file
Просмотреть файл

@ -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>

57
tests/data/test947 Normal file
Просмотреть файл

@ -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>

56
tests/data/test948 Normal file
Просмотреть файл

@ -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>

56
tests/data/test949 Normal file
Просмотреть файл

@ -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>

56
tests/data/test950 Normal file
Просмотреть файл

@ -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>

56
tests/data/test951 Normal file
Просмотреть файл

@ -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>

55
tests/data/test952 Normal file
Просмотреть файл

@ -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>

55
tests/data/test953 Normal file
Просмотреть файл

@ -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>