Commit Graph

50 Commits

Author SHA1 Message Date
Bernie Hackett
a22719853e PYTHON-1613 Invalidate cache on changed salt or iterations 2018-07-14 12:38:53 -07:00
Bernie Hackett
466fdde12a PYTHON-1609 - Fix authing the same user more than once 2018-07-09 14:59:53 -07:00
Bernie Hackett
709b28467f PYTHON-1586 - Deprecate database_names and collection_names 2018-06-18 10:52:11 -07:00
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Bernie Hackett
bb8130abd8 PYTHON-1273 - Cache SCRAM ClientKey and ServerKey 2018-06-08 14:24:05 -07:00
Bernie Hackett
984977ba9e PYTHON-1425 - Implement the auth spec and tests 2018-04-25 10:25:00 -07:00
Bernie Hackett
82c6bdbac1 PYTHON-1526 - Update SCRAM-SHA-256 for spec change 2018-04-16 21:05:10 -07:00
Bernie Hackett
5b9257644f PYTHON-1464 - Implement SCRAM-SHA-256 2018-03-06 17:54:40 -08:00
Bernie Hackett
4fa72033dd PYTHON-1488 - Fix auth tests for MongoDB 3.7 2018-02-26 15:32:55 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
A. Jesse Jiryu Davis
72e61277b2 Deprecate db.authenticate and db.eval
PYTHON-1313, and PYTHON-1315.
2017-08-01 16:30:42 -04:00
Shane Harvey
5905a86785 PYTHON-1075 Support running the entire test suite with SSL/TLS
SSL connections are configurable via the environment variables
"CLIENT_PEM", "CA_PEM", and "CERT_REQS".
2016-09-28 16:34:14 -07:00
Bernie Hackett
e89ba4bcd0 PYTHON-1026 - Remove test assumption about primary host 2016-09-21 11:15:43 -07:00
Bernie Hackett
80fc55aae7 PYTHON-750 - Support cross realm GSSAPI tests 2016-05-26 16:23:53 -07:00
Bernie Hackett
fe6f485de8 Really test SERVICE_REALM 2016-05-26 16:23:53 -07:00
Bernie Hackett
0abfba6155 PYTHON-750 - Kerberos SSPI support for Windows 2016-05-26 16:23:53 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
30af616009 PYTHON-821 - Migrate most tests to new the CRUD API. 2015-02-13 08:46:43 -08:00
Bernie Hackett
eb99dc7d0d PYTHON-798 - Fix auth tests. 2015-01-12 12:17:40 -08:00
A. Jesse Jiryu Davis
e8be121a89 PYTHON-785 Don't use requests in tests. 2014-11-20 22:57:56 -05:00
A. Jesse Jiryu Davis
0e222c4c4c Rename "set_name" to "replica_set_name".
Rename the attributes of IsMaster, ServerDescription, TopologyDescription, and
TopologySettings from "set_name" to "replica_set_name" for greater clarity.
2014-11-17 20:29:16 -05:00
A. Jesse Jiryu Davis
5991635553 Unused imports in test files. 2014-11-17 16:15:12 -05:00
Luke Lovett
74699ec555 Assert that MongoClient raises OperationFailure when connecting to a host with bad credentials using SASL PLAIN. 2014-11-04 21:07:31 +00:00
Bernie Hackett
429aa9c582 PYTHON-768 - Support authMechanismProperties.
This change also removes the gssapiServiceName option (deprecated in
PyMongo 2.8), which is replaced by authMechanismProperties=SERVICE_NAME:<service name>.
2014-10-30 22:01:38 -07:00
A. Jesse Jiryu Davis
ee11436675 PYTHON-764 SCRAM-SHA-1 automatic upgrade / downgrade. 2014-10-23 16:30:55 -04:00
A. Jesse Jiryu Davis
c5eae2f99f Use replica set connection in tests wherever possible.
Most tests now inherit from IntegrationTest and use self.client for all MongoDB
operations. self.client is now a replica set connection if an RS is available,
otherwise a connection to a standalone.
2014-10-07 13:36:52 -04:00
A. Jesse Jiryu Davis
3c9fd60fed PYTHON-525 Use MongoClient in replica set tests.
Connect the MongoClient to the replica set if one is running,
otherwise connect it to the standalone. Only continue to use
MongoReplicaSetClient when testing the specific behavior of
that deprecated class.

Also suppress some warnings when running tests, and better
determine whether to test IPv6.
2014-09-20 08:42:23 -04:00
A. Jesse Jiryu Davis
41c1a9afa6 PYTHON-525 Reimplement auth for new MongoClient.
The new MongoClient, based on Cluster and Server,
includes functionality that had been split between the
old MongoClient and MongoReplicaSetClient. A
previous commit introduced the new MongoClient
but broke authentication.
2014-09-03 17:39:52 -04:00
Bernie Hackett
bad4a109b4 PYTHON-706 - SCRAM-SHA-1 2014-08-13 15:02:28 -07:00
Luke Lovett
d7ec3a7704 PYTHON-715 Fix tests for MongoDB >= 2.7.1 when running with auth enabled. 2014-07-07 19:05:21 +00:00
Luke Lovett
4fa96c6c2e PYTHON-683 Separate unit tests and integration tests in the pymongo test suite.
Raise SkipTest in tests that require a connection to MongoDB when none is available.
2014-06-30 17:42:29 +00:00
Luke Lovett
26fb43cf78 PYTHON-681 Reuse MongoClient whenever possible in the tests 2014-05-21 20:41:18 +00:00
Luke Lovett
141200083e PYTHON-680 Stop using nose in favor of pure unittest/unittest2 2014-04-25 22:57:33 +00:00
Luke Lovett
4d6d1e067b PYTHON-676 python 2/3 single-source for the test module 2014-04-23 18:37:02 +00:00
Luke Lovett
494e510881 add failure case to test_auth.TestSASL 2014-02-21 13:42:14 -08:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
hawka
a02e37ba5e PYTHON-552: Manipulate user objects exclusively via commands for 2.6 2013-09-24 17:30:33 -07:00
A. Jesse Jiryu Davis
f1f7b14bf6 Allow MongoClients to be GC'ed after test runs.
Work around http://bugs.python.org/issue11798 to reduce max connection count during tests.
2013-08-27 09:00:50 -04:00
behackett
ae6aa79ae6 Support gssapiServiceName PYTHON-524
This also adds general support for authentication
mechanism specific options and validation.
2013-06-20 10:53:23 -07:00
behackett
39943aa62a Support the SASL PLAIN mechanism PYTHON-519
This is initially for LDAP authentication support in
MongoDB 2.6 (forthcoming). Warning: the username and
password are sent over the wire in clear text per
RFC 4616. SSL with cert validation should be used in
conjunction with the PLAIN mechanism to encrypt the
channel.
2013-06-12 13:30:54 -07:00
Bernie Hackett
1ed7718ad1 Don't mask authentication failure details.
These changes should make it easier to debug
kerberos configuration issues on the client
and server.
2013-03-22 07:56:15 -07:00
behackett
346fa24c17 Fix a bug in and pep8ify test_auth.py 2013-03-21 16:59:15 -07:00
behackett
6a5a8b95ac Support MongoDB 2.4 options in add_user. 2013-03-21 15:51:47 -07:00
Bernie Hackett
9dc5e7a0fe Minor test fix for python 2.5. 2013-02-27 15:34:21 -08:00
Bernie Hackett
a59255ff63 Spelling. 2013-02-23 13:26:49 -08:00
A. Jesse Jiryu Davis
8536acb4a0 Standardize tests' handling of DB_IP and DB_PORT, fix PYTHON-475 2013-02-19 15:09:28 -05:00
behackett
902c1d67ec Minor fixes to authentication tests. 2013-02-15 16:00:19 -08:00
behackett
8de9051228 Remove MongoAuthenticationMechanism PYTHON-465
The spec changed - MongoAuthenticationMechanism is
no longer required.
2013-02-12 14:30:11 -08:00
behackett
1ba0d26dbb Skip auth tests when auth isn't enabled. 2013-02-08 17:18:57 -08:00
behackett
18d20ed181 Support GSSAPI (Kerberos) authentication PYTHON-465
This only works with the subscriber addition of MongoDB
>= 2.4 and requires the python "kerberos" module, sometimes
referred to as pykerberos.

http://pypi.python.org/pypi/kerberos

This change also adds support for the authMechanism
and authSource URI options.
2013-02-08 16:04:53 -08:00