Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test cases for sasl external authentication (imap/pop3/smtp).
- Loading branch information
Patrick Monnerat
committed
Jan 27, 2015
1 parent
fe79f20
commit ed9a4b9
Showing
13 changed files
with
674 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Oops, something went wrong.