mgo r2014.03.12 with SASL/Kerberos support

Skip to first unread message

Gustavo Niemeyer

Mar 12, 2014, 7:08:52 PM3/12/14
The r2014.03.12 release of the mgo ( MongoDB driver for Go
was just tagged. This release has both new features and bug fixes, and is API
compatible with the prior release.

The following changes were made:

- Experimental SASL and Kerberos support.

To enable the feature, mgo must be built with the -tags sasl
option, which is disabled by default because it forces the
dynamic linkage with the system Cyrus SASL library.

The new Session.Login method takes the new mgo.Credential type as
a parameter for authenticating with mechanisms other than straight

The mgo.DialInfo type also received new fields, matching those
in mgo.Credential, to establish the authentication at dial time:

The new DialInfo.Source field allows selecting a database for
authentication other than the default database, even when using
the standard username/password mechanism (MONGODB-CR).

These new options are also supported using URL parameters that
are common to all MongoDB drivers with Kerberos support (authSource,
authService, and gssapiServiceName):

For details on configuring the MongoDB server with Kerberos support,
see the documentation at:

- Fixed improper lock handling during error on Iter.Next.

Problem reported by Evan Shaw.

- Prevent calling reply func twice on forcefully closed sockets.

There was a small chance that the reply handling function might
be called twice when a socket was killed during the reply
handling phase.

Problem reported by Francisco Souza and John Morales.

gustavo @
Reply all
Reply to author
0 new messages