Mongo Kerberos Build Status Code Climate Coverage Status

Provides Kerberos authentication support to the Mongo Ruby Driver.


mongo_kerberos is tested against MRI (1.9.3+) and JRuby (9.1+).


In order to work with Kerberos TGTs that are in the system cache (e.g. obtained with kinit), the JRuby extension sets the JVM system property "" to "true". Note that any other use of the JGSS library will also be affected by this setting, meaning that any TGTs in the system cache will be available for obtaining Kerberos credentials as well.


libsasl is a requirement to be able to install the mongo_kerberos gem. Please see the Cyrus documentation for more information.

With bundler, add the mongo_kerberos gem to your Gemfile.

gem "mongo_kerberos", "~> 2.1"

Require the mongo_kerberos gem in your application.

require "mongo_kerberos"

API Documentation

The API Documentation is located at


As of 2.1.0, this project adheres to the Semantic Versioning Specification.