If you use Kerberos authentication to connect to your MongoDB deployment, you can enable the showKerberosPasswordField option on MongoDB Compass.
About This Task
The password field is not necessary for Kerberos authentication, so Compass disables the showKerberosPasswordField option by default.
If you enable the showKerberosPasswordField, MongoDB Compass displays the Provide password directly option, which contains the Password field. You can find the Kerberos Password under the Advanced Connection Options > Authentication tab on the Compass connection form.
Procedure
You can enable the showKerberosPasswordField option in either:
The Compass Settings panel.
The command line.
Compass Settings Panel
Open MongoDB Compass Settings
Click the gear icon on the left column of the Compass home screen to open MongoDB Compass Settings.
Alternatively, you can use keyboard shortcuts to open the Settings panel:
Windows / Linux:
Ctrl+,Mac:
⌘+,
Compass opens a dialog box where you can configure your MongoDB Compass settings.
Command Line
The following command starts Compass from the command line and sets the --showKerberosPasswordField option:
<path-to-Compass-executable> --readOnly
Note
The name and filepath of the Compass executable depend on your operating system.
Configuration File
You can specify the Compass configuration file in either EJSON or YAML format. The following configurations set the showKerberosPasswordField option to true:
EJSON
{ "showKerberosPasswordField": true }
YAML
showKerberosPasswordField: true
Learn More
To learn more about the MongoDB Compass configuration file, see Configuration File Settings.