@@ -22,9 +22,45 @@ Configure the {+mcli+}
22
22
23
23
You can define the settings that the {+mcli+} uses to interact with
24
24
MongoDB services like |service|, |cloud-short|, and |onprem| by using
25
- the :ref:`mongocli-auth-login` or :ref:`mongocli-config` commands.
26
- The first time you run one of these commands, the {+mcli+} creates a :ref:`configuration file
27
- <mcli-config-file>` called ``mongocli.toml`` to store your settings.
25
+ the :ref:`mongocli-auth-login` or :ref:`mongocli-config` command. The
26
+ first time you run one of these commands, the {+mcli+} creates a
27
+ :ref:`configuration file <mcli-config-file>` called ``mongocli.toml``
28
+ to store your settings.
29
+
30
+ Prerequisites
31
+ -------------
32
+
33
+ To configure the {+mcli+}:
34
+
35
+ - Add your |ipaddr| or |cidr| block to the |api| whitelist for your
36
+ MongoDB service.
37
+ - Generate a |svc-api-key| if you don't already have one.
38
+
39
+ .. note::
40
+
41
+ |svc-api-key|\s are role-based. Different roles have different
42
+ privileges and capabilities, and some {+mcli+} commands are available
43
+ to some roles but not others. Be sure that the roles assigned to
44
+ your |svc-api-key| are appropriate for the commands you intend to
45
+ use.
46
+
47
+ To learn more about generating a |svc-api-key| for
48
+ your MongoDB service, see the following documentation:
49
+
50
+ - :atlas:`Atlas API Access </configure-api-access>`
51
+ - :cloudmgr:`Cloud Manager API Access </tutorial/configure-public-api-access>`
52
+ - :opsmgr:`Ops Manager API Acess </tutorial/configure-public-api-access>`
53
+
54
+ - Set up the ``HTTP_PROXY`` or ``HTTPS_PROXY`` :ref:`environment
55
+ variable <mcli-env-var>` if your {+mcli+} installation is behind a
56
+ firewall and you want to use a proxy |url|. {+mcli+} supports
57
+ ``http``, ``https``, and ``socks5`` schemes. In addition, specify
58
+ ``cloud.mongodb.com/`` as the main target URL in the proxy service's
59
+ access list. You must specify the username and password also if your
60
+ proxy configuration enables authentication.
61
+
62
+ To learn more, see `Proxy server
63
+ <https://en.wikipedia.org/wiki/Proxy_server>`__.
28
64
29
65
Procedure
30
66
---------
0 commit comments