Skip to content

DOCS-4898, DOCS-4646, DOCS-3199 - http interface notes #2191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ command returns information regarding the number of open connections
to the current database for :program:`mongos` instances and
:program:`mongod` instances in sharded clusters.

Disable HTTP Interfaces
~~~~~~~~~~~~~~~~~~~~~~~

:program:`mongod` provides interfaces to check the status of the
server and, optionally, run queries on it, over HTTP. Ensure that
these are disabled in production environments.

See :ref:`http-interface-security`.


Hardware Considerations
-----------------------

Expand Down
16 changes: 11 additions & 5 deletions source/core/security-interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ behavior by passing the :option:`mongo --norc` option.
the :file:`.mongorc.js` file from :file:`{%HOME%}\.mongorc.js` or
:file:`{%HOMEDRIVE%}\{%HOMEPATH%}\.mongorc.js`.

.. _http-interface-security:

HTTP Status Interface
---------------------

.. include:: /includes/warning-http-interface.rst

The HTTP status interface provides a web-based interface that includes
a variety of operational data, logs, and status reports regarding the
:program:`mongod` or :program:`mongos` instance. The HTTP interface is
Expand All @@ -49,20 +53,22 @@ always available on the port numbered ``1000`` greater than the primary
``28017``, but is indirectly set using the :setting:`~net.port` option which
allows you to configure the primary :program:`mongod` port.

Without the :setting:`net.http.RESTInterfaceEnabled` setting, this interface is entirely
read-only, and limited in scope; nevertheless, this interface may
represent an exposure. To disable the HTTP interface, set the
:setting:`~net.http.enabled` run time option or the
Without the :setting:`net.http.RESTInterfaceEnabled` setting, this
interface is entirely read-only, and limited in scope; nevertheless,
this interface may represent an exposure. To disable the HTTP
interface, set the :setting:`~net.http.enabled` run time option or the
:option:`--nohttpinterface <mongod --nohttpinterface>` command line
option. See also :ref:`security-port-numbers`.

.. include:: /includes/note-http-interface-auth.rst

.. _rest-api:

REST API
--------

The REST API to MongoDB provides additional information and write
access on top of the HTTP Status interface. While the REST API does not
access on top of the HTTP status interface. While the REST API does not
provide any support for insert, update, or remove operations, it does
provide administrative access, and its accessibility represents a
vulnerability in a secure environment. The REST interface is *disabled*
Expand Down
4 changes: 2 additions & 2 deletions source/core/security-network.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The status interface is read-only by default, and the default port for
the status page is ``28017``. Authentication does not control or affect
access to this interface.

.. important:: Disable this interface for production deployments. If
.. warning:: Disable this interface for production deployments. If
you *enable* this interface, you should only allow trusted clients
to access this port. See :ref:`security-firewalls`.

Expand All @@ -62,7 +62,7 @@ to connect to this port.
You may also enable this interface on the command line as
:option:`mongod --rest <--rest>` :option:`--httpinterface`.

.. important:: Disable this option for production deployments. If
.. warning:: Disable this option for production deployments. If
*do* you leave this interface enabled, you should only allow trusted
clients to access this port.

Expand Down
11 changes: 11 additions & 0 deletions source/includes/note-http-interface-auth.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. note::

While MongoDB Enterprise does support Kerberos authentication,
Kerberos is not supported in HTTP status interface in any version of
MongoDB.

.. versionchanged:: 3.0

Neither the HTTP status interface nor the REST API support the
:ref:`SCRAM-SHA-1 <authentication-scram-sha-1>` challenge-response
user authentication mechanism introduced in version 3.0.
7 changes: 7 additions & 0 deletions source/includes/note-http-interface-scram.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. note::

.. versionchanged:: 3.0

Neither the HTTP status interface nor the REST API support the
:ref:`SCRAM-SHA-1 <authentication-scram-sha-1>` challenge-response
user authentication mechanism introduced in version 3.0.
4 changes: 0 additions & 4 deletions source/includes/note-kerberos-unsupported-in-http-console.rst

This file was deleted.

4 changes: 2 additions & 2 deletions source/includes/options-mongod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ description: |

Do not use in conjunction with :option:`--rest` or :option:`--jsonp`.

.. include:: /includes/note-kerberos-unsupported-in-http-console.rst
.. include:: /includes/note-http-interface-auth.rst
optional: true
---
program: mongod
Expand All @@ -559,7 +559,7 @@ description: |
*do* enable this interface, you should only allow trusted clients to
access this port. See :ref:`security-firewalls`.

.. include:: /includes/note-kerberos-unsupported-in-http-console.rst
.. include:: /includes/note-http-interface-auth.rst
optional: true
---
program: mongod
Expand Down
5 changes: 5 additions & 0 deletions source/includes/warning-http-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. warning::

Ensure that the HTTP status interface, the REST API, and the JSON
API are all disabled in production environments to prevent
potential data exposure and vulnerability to attackers.
6 changes: 4 additions & 2 deletions source/reference/configuration-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ Core Options

.. include:: /includes/option/setting-conf-net.wireObjectCheck.rst

.. include:: /includes/option/setting-conf-net.http.enabled.rst

.. PENDING SERVER-13097

.. include:: /includes/option/setting-conf-net.http.port.rst
Expand All @@ -150,6 +148,10 @@ Core Options

.. setting:: net.http

.. include:: /includes/warning-http-interface.rst

.. include:: /includes/option/setting-conf-net.http.enabled.rst

.. include:: /includes/option/setting-conf-net.http.JSONPEnabled.rst

.. include:: /includes/option/setting-conf-net.http.RESTInterfaceEnabled.rst
Expand Down
7 changes: 7 additions & 0 deletions source/release-notes/3.0-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ control. If you have a 3.0 MongoDB deployment that requires
access control, you must use 3.0 versions of the :program:`mongo`
shell.

HTTP Status Interface and REST API Compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Neither the HTTP status interface nor the REST API support the
:ref:`SCRAM-SHA-1 <authentication-scram-sha-1>` challenge-response
user authentication mechanism introduced in version 3.0.

.. _3.0-compatibility-indexes:

Indexes
Expand Down