docs/user_guide/connecting/mongodb.md
!!! note "Enterprise feature" Kerberos authentication requires a Beekeeper Studio Enterprise license.
Beekeeper Studio connects to MongoDB with a connection URL, and Kerberos auth is
configured entirely through that URL using the GSSAPI auth mechanism:
mongodb://user%[email protected]/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:mongodb
@ between the
user and the realm as %40 (e.g. user@REALM becomes user%40REALM).authMechanismProperties is a comma-separated list of KEY:VALUE pairs. Common keys:
SERVICE_NAME — the service principal name, defaults to mongodb.SERVICE_REALM — the realm of the service, when it differs from the user's realm.CANONICALIZE_HOST_NAME — none, forward, or forwardAndReverse./etc/krb5.conf.kinit before connecting.mongodb/<fqdn>). Connect by the server's
fully-qualified domain name so the SPN matches.Kerberos relies on the server's hostname to match the SPN. An SSH tunnel rewrites the host the driver connects to, which breaks SPN matching — connect directly to the FQDN rather than tunnelling when using Kerberos.