Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROTON-2502: Stop testing using MD5 SASL mechanisms #359

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Linux dependencies

- GNU Make 3.81+
- GCC 4.8.4+
- Cyrus SASL 2.1+ (for SASL support)
- Cyrus SASL 2.1.26+ (for SASL support)
- OpenSSL 1.0+ (for SSL support)
- JsonCpp 1.8+ for C++ connection configuration file support
- Python 2.7, 3.5+ (for the Python binding)
- Python 3.5+ (for the Python binding)

Windows dependencies

Expand All @@ -44,7 +44,7 @@ language.
$ yum install openssl-devel

# Dependencies needed for Cyrus SASL support
$ yum install cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl-md5
$ yum install cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl-scram

# Dependencies needed for bindings
$ yum install swig # Required for all bindings
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
pool:
vmImage: 'ubuntu-18.04'
steps:
- script: sudo apt-get install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev
- script: sudo apt-get install -y swig sasl2-bin libpython3-dev libsasl2-dev libjsoncpp-dev
name: InstallExtraStuff
- template: steps.yml
- job: MacOS
Expand Down
2 changes: 0 additions & 2 deletions python/setuputils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@


import errno
import os
import subprocess
import sys

from . import log

Expand Down
41 changes: 12 additions & 29 deletions python/tests/proton_tests/sasl.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,20 +326,6 @@ def testANON(self):
self.t2.bind(self.c2)
_testSaslMech(self, 'ANONYMOUS', authUser='anonymous')

def testCRAMMD5(self):
common.ensureCanTestExtendedSASL()

self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'CRAM-MD5')

def testDIGESTMD5(self):
common.ensureCanTestExtendedSASL()

self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5')

# PLAIN shouldn't work without encryption without special setting
def testPLAINfail(self):
common.ensureCanTestExtendedSASL()
Expand Down Expand Up @@ -367,15 +353,12 @@ def testPLAIN(self):
self.t2.bind(self.c2)
_testSaslMech(self, 'PLAIN')

# SCRAM not supported before Cyrus SASL 2.1.26
# so not universal and hence need a test for support
# to keep it in tests.
# def testSCRAMSHA1(self):
# common.ensureCanTestExtendedSASL()
#
# self.t1.bind(self.c1)
# self.t2.bind(self.c2)
# _testSaslMech(self, 'SCRAM-SHA-1')
def testSCRAMSHA1(self):
common.ensureCanTestExtendedSASL()

self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'SCRAM-SHA-1')


def _sslConnection(domain, transport, connection):
Expand Down Expand Up @@ -550,7 +533,7 @@ def testNormalAuthenticationClient(self):
self.c1.collect(self.collector)
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5')
_testSaslMech(self, 'SCRAM-SHA-1')
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.CONNECTION_REMOTE_OPEN)
Expand All @@ -560,7 +543,7 @@ def testNormalAuthenticationServer(self):
self.c2.collect(self.collector)
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5')
_testSaslMech(self, 'SCRAM-SHA-1')
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.CONNECTION_REMOTE_OPEN)
Expand All @@ -572,7 +555,7 @@ def testFailedAuthenticationClient(self):
self.c1.collect(self.collector)
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5', clientUser=clientUser, authenticated=False)
_testSaslMech(self, 'SCRAM-SHA-1', clientUser=clientUser, authenticated=False)
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.TRANSPORT_ERROR,
Expand All @@ -586,7 +569,7 @@ def testFailedAuthenticationServer(self):
self.c2.collect(self.collector)
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5', clientUser=clientUser, authenticated=False)
_testSaslMech(self, 'SCRAM-SHA-1', clientUser=clientUser, authenticated=False)
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.TRANSPORT_ERROR,
Expand All @@ -599,7 +582,7 @@ def testNoMechClient(self):
self.s2.allowed_mechs('IMPOSSIBLE')
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5', authenticated=False)
_testSaslMech(self, 'SCRAM-SHA-1', authenticated=False)
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.TRANSPORT_ERROR,
Expand All @@ -611,7 +594,7 @@ def testNoMechServer(self):
self.s2.allowed_mechs('IMPOSSIBLE')
self.t1.bind(self.c1)
self.t2.bind(self.c2)
_testSaslMech(self, 'DIGEST-MD5', authenticated=False)
_testSaslMech(self, 'SCRAM-SHA-1', authenticated=False)
self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
Event.TRANSPORT_TAIL_CLOSED,
Expand Down