Skip to content

Commit f7040d3

Browse files
(DOCSP-20913): mongocli auth login (#671)
* (DOCSP-20913): mongocli auth login * Update quickstarts * yaml fix * Tech review * copy review * Ensure submodule is on v1.23.0
1 parent 07442c3 commit f7040d3

File tree

11 files changed

+311
-173
lines changed

11 files changed

+311
-173
lines changed

source/configure.txt

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,13 @@ Configure the {+mcli+}
2222

2323
You can define the settings that the {+mcli+} uses to interact with
2424
MongoDB services like |service|, |cloud-short|, and |onprem| by using
25-
the :ref:`mongocli-config` command. The first time you run this
26-
command, the {+mcli+} creates a :ref:`configuration file
27-
<mcli-config-file>` called ``mongocli.toml`` to store your settings.
28-
29-
Prerequisites
30-
-------------
31-
32-
To configure the {+mcli+}:
33-
34-
- Add your |ipaddr| or |cidr| block to the |api| whitelist for your
35-
MongoDB service.
36-
- Generate a |svc-api-key| if you don't already have one.
37-
38-
.. note::
39-
40-
|svc-api-key|\s are role-based. Different roles have different
41-
privileges and capabilities, and some {+mcli+} commands are available
42-
to some roles but not others. Be sure that the roles assigned to
43-
your |svc-api-key| are appropriate for the commands you intend to
44-
use.
45-
46-
To learn more about generating a |svc-api-key| for
47-
your MongoDB service, see the following documentation:
48-
49-
- :atlas:`Atlas API Access </configure-api-access>`
50-
- :cloudmgr:`Cloud Manager API Access </tutorial/configure-public-api-access>`
51-
- :opsmgr:`Ops Manager API Acess </tutorial/configure-public-api-access>`
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.
5228

5329
Procedure
5430
---------
5531

56-
The :ref:`mongocli-config` command varies slightly depending on the
57-
MongoDB service for which you want to configure the {+mcli+}.
58-
5932
.. tabs::
6033

6134
.. tab:: Atlas
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. note::
2+
3+
|svc-api-key|\s are role-based. Different roles have different
4+
privileges and capabilities, and some {+mcli+} commands are available
5+
to some roles but not others. Be sure to assign roles to
6+
your |svc-api-key| that are appropriate for the commands you intend to
7+
use.

source/includes/steps-configure-mcli-atlas.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
stepnum: 1
22
source:
33
file: steps-configure-mcli.yaml
4-
ref: create-profile
4+
ref: auth-login
55
replacement:
6+
service: "|service|"
67
serviceOption: ""
78
---
89
stepnum: 2
910
source:
1011
file: steps-configure-mcli.yaml
11-
ref: enter-api-key
12-
replacement:
13-
apiKeys: ":atlas:`Programmatic API Key </configure-api-access>`"
14-
service: "|service|"
12+
ref: auth-create-profile
1513
---
1614
stepnum: 3
1715
source:
1816
file: steps-configure-mcli.yaml
19-
ref: enter-orgid-atlas-cm
17+
ref: auth-enter-orgid-atlas-cm
2018
---
2119
stepnum: 4
2220
source:
2321
file: steps-configure-mcli.yaml
24-
ref: enter-projectid
22+
ref: auth-enter-projectid
2523
---
2624
stepnum: 5
2725
source:
@@ -34,6 +32,14 @@ source:
3432
ref: enter-mongo-shell-path
3533
---
3634
stepnum: 7
35+
source:
36+
file: steps-configure-mcli.yaml
37+
ref: add-api-keys
38+
replacement:
39+
service: "|service|"
40+
api-access-url: ":atlas:`Programmatic API Key </configure-api-access>`"
41+
---
42+
stepnum: 8
3743
source:
3844
file: steps-configure-mcli.yaml
3945
ref: verify-profile

source/includes/steps-configure-mcli-cm.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
stepnum: 1
22
source:
33
file: steps-configure-mcli.yaml
4-
ref: create-profile
4+
ref: auth-login
55
replacement:
6-
serviceOption: "--service cloud-manager"
6+
service: "|cloud|"
7+
serviceOption: "--cm"
78
---
89
stepnum: 2
910
source:
1011
file: steps-configure-mcli.yaml
11-
ref: enter-api-key
12-
replacement:
13-
apiKeys: ":cloudmgr:`API keys </tutorial/configure-public-api-access>`"
14-
service: "|cloud|"
12+
ref: auth-create-profile
1513
---
1614
stepnum: 3
1715
source:
1816
file: steps-configure-mcli.yaml
19-
ref: enter-orgid-atlas-cm
17+
ref: auth-enter-orgid-atlas-cm
2018
---
2119
stepnum: 4
2220
source:
2321
file: steps-configure-mcli.yaml
24-
ref: enter-projectid
22+
ref: auth-enter-projectid
2523
---
2624
stepnum: 5
2725
source:
@@ -34,6 +32,14 @@ source:
3432
ref: enter-mongo-shell-path
3533
---
3634
stepnum: 7
35+
source:
36+
file: steps-configure-mcli.yaml
37+
ref: add-api-keys
38+
replacement:
39+
service: "|cloud|"
40+
api-access-url: ":cloudmgr:`API keys </tutorial/configure-public-api-access>`"
41+
---
42+
stepnum: 8
3743
source:
3844
file: steps-configure-mcli.yaml
3945
ref: verify-profile

source/includes/steps-configure-mcli-om.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,52 @@
11
stepnum: 1
2+
source:
3+
file: steps-configure-mcli.yaml
4+
ref: config-prereqs
5+
replacement:
6+
service: "|onprem|"
7+
api-access-url: ":opsmgr:`Ops Manager API Access </tutorial/configure-public-api-access>`"
8+
---
9+
stepnum: 2
210
source:
311
file: steps-configure-mcli.yaml
412
ref: create-profile
513
replacement:
614
serviceOption: "--service ops-manager"
715
---
8-
stepnum: 2
16+
stepnum: 3
917
source:
1018
file: steps-configure-mcli.yaml
1119
ref: enter-base-url
1220
---
13-
stepnum: 3
21+
stepnum: 4
1422
source:
1523
file: steps-configure-mcli.yaml
1624
ref: enter-api-key
1725
replacement:
1826
apiKeys: ":opsmgr:`API keys </tutorial/configure-public-api-access>`"
1927
service: "|onprem|"
2028
---
21-
stepnum: 4
29+
stepnum: 5
2230
source:
2331
file: steps-configure-mcli.yaml
2432
ref: enter-orgid-om
2533
---
26-
stepnum: 5
34+
stepnum: 6
2735
source:
2836
file: steps-configure-mcli.yaml
2937
ref: enter-projectid
3038
---
31-
stepnum: 6
39+
stepnum: 7
3240
source:
3341
file: steps-configure-mcli.yaml
3442
ref: enter-fileformat
3543
---
36-
stepnum: 7
44+
stepnum: 8
3745
source:
3846
file: steps-configure-mcli.yaml
3947
ref: enter-mongo-shell-path
4048
---
41-
stepnum: 8
49+
stepnum: 9
4250
source:
4351
file: steps-configure-mcli.yaml
4452
ref: verify-profile

0 commit comments

Comments
 (0)