From ca770d87e2de6164321b9baca77436d1e0426be1 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 15 Nov 2015 17:36:59 +0000 Subject: tests: Added OAUTHBEARER failure response tests --- tests/data/Makefile.inc | 7 +++--- tests/data/test844 | 54 +++++++++++++++++++++++++++++++++++++++++++++ tests/data/test845 | 54 +++++++++++++++++++++++++++++++++++++++++++++ tests/data/test889 | 56 +++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test890 | 55 ++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test948 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test949 | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 338 insertions(+), 3 deletions(-) create mode 100644 tests/data/test844 create mode 100644 tests/data/test845 create mode 100644 tests/data/test889 create mode 100644 tests/data/test890 create mode 100644 tests/data/test948 create mode 100644 tests/data/test949 (limited to 'tests') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index b6ef6c13a..9e02b3f56 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -86,20 +86,21 @@ test800 test801 test802 test803 test804 test805 test806 test807 test808 \ test809 test810 test811 test812 test813 test814 test815 test816 test817 \ test818 test819 test820 test821 test822 test823 test824 test825 test826 \ test827 test828 test829 test830 test831 test832 test833 test834 test835 \ -test836 test837 test838 test839 test840 test841 test842 test843 \ +test836 test837 test838 test839 test840 test841 test842 test843 test843 \ +test844 \ \ test850 test851 test852 test853 test854 test855 test856 test857 test858 \ test859 test860 test861 test862 test863 test864 test865 test866 test867 \ test868 test869 test870 test871 test872 test873 test874 test875 test876 \ test877 test878 test879 test880 test881 test882 test883 test884 test885 \ -test886 test887 test888 \ +test886 test887 test888 test889 test890 \ \ 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 test942 test943 test944 \ -test945 test946 test947 \ +test945 test946 test947 test948 test949 \ \ test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \ test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \ diff --git a/tests/data/test844 b/tests/data/test844 new file mode 100644 index 000000000..461ef5d60 --- /dev/null +++ b/tests/data/test844 @@ -0,0 +1,54 @@ + + + +IMAP +SASL +SASL AUTH OAUTH2 +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +REPLY AUTHENTICATE + +REPLY dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0= +REPLY AQ== A002 NO Authentication failed + + + +# +# Client-side + + +imap + + +IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation + + +'imap://%HOSTIP:%IMAPPORT/844/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "LOGOUT" + +A001 CAPABILITY +A002 AUTHENTICATE OAUTHBEARER +dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + diff --git a/tests/data/test845 b/tests/data/test845 new file mode 100644 index 000000000..e98af664a --- /dev/null +++ b/tests/data/test845 @@ -0,0 +1,54 @@ + + + +IMAP +SASL +SASL AUTH OAUTH2 +SASL-IR +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +CAPA SASL-IR +REPLY AUTHENTICATE + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0= +REPLY AQ== A002 NO Authentication failed + + + +# +# Client-side + + +imap + + +IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response + + +'imap://%HOSTIP:%IMAPPORT/845/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "LOGOUT" + +A001 CAPABILITY +A002 AUTHENTICATE OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + diff --git a/tests/data/test889 b/tests/data/test889 new file mode 100644 index 000000000..9b8a024f0 --- /dev/null +++ b/tests/data/test889 @@ -0,0 +1,56 @@ + + + +POP3 +SASL +SASL AUTH OAUTH2 +RFC1734 +RFC5034 +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +REPLY AUTH + +REPLY dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AQ== -ERR Authentication failed + + + +# +# Client-side + + +pop3 + + +POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation + + +pop3://%HOSTIP:%POP3PORT/889 -u user --oauth2-bearer mF_9.B5f-4.1JqM + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "QUIT" + +CAPA +AUTH OAUTHBEARER +dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + diff --git a/tests/data/test890 b/tests/data/test890 new file mode 100644 index 000000000..819e9d36a --- /dev/null +++ b/tests/data/test890 @@ -0,0 +1,55 @@ + + + +POP3 +SASL +SASL AUTH OAUTH2 +SASL-IR +RFC1734 +RFC5034 +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +REPLY AUTH + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AQ== -ERR Authentication failed + + + +# +# Client-side + + +pop3 + + +POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response + + +pop3://%HOSTIP:%POP3PORT/890 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "QUIT" + +CAPA +AUTH OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + diff --git a/tests/data/test948 b/tests/data/test948 new file mode 100644 index 000000000..317934d1b --- /dev/null +++ b/tests/data/test948 @@ -0,0 +1,58 @@ + + + +SMTP +SASL +SASL AUTH OAUTH2 +RFC4954 +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +REPLY AUTH 334 OAUTHBEARER supported +REPLY dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth + + + +#vi +# Client-side + + +smtp + + +SMTP OAuth 2.0 (OAUTHBEARER) failure as continuation + + +mail body + + +smtp://%HOSTIP:%SMTPPORT/948 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T - + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "QUIT" + +EHLO 948 +AUTH OAUTHBEARER +dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + diff --git a/tests/data/test949 b/tests/data/test949 new file mode 100644 index 000000000..c78407db8 --- /dev/null +++ b/tests/data/test949 @@ -0,0 +1,57 @@ + + + +SMTP +SASL +SASL AUTH OAUTH2 +SASL-IR +RFC4954 +RFC6749 +RFC7628 + + + +# +# Server-side + + +AUTH OAUTHBEARER +REPLY AUTH 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth + + + +# +# Client-side + + +smtp + + +SMTP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response + + +mail body + + +smtp://%HOSTIP:%SMTPPORT/949 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T - + + + +# +# Verify data after the test has been "shot" + +# 67 - CURLE_LOGIN_DENIED + +67 + +# +# The multi interface considers a broken "CONNECT" as a prematurely broken +# transfer and such a connection will not get a "QUIT" + +EHLO 949 +AUTH OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +AQ== + + + -- cgit v1.2.3