Skip to content

Commit 91a847d

Browse files
Chris Choschmalliso
authored andcommitted
DOCSP-15817: aws auth (#169)
* DOCSP-15817: MONGODB-AWS auth
1 parent 2356cf7 commit 91a847d

File tree

2 files changed

+74
-3
lines changed

2 files changed

+74
-3
lines changed

source/kafka-connection-mongodb.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ To configure your MongoDB Kafka Source or Sink Connector, specify your
8080
connection URI in the ``connection.uri`` setting. Refer to the configuration
8181
guides for more detail:
8282

83-
- :doc:`Sink Configuration Properties </kafka-sink-properties>`
84-
- (TODO: Fix Broken Link) Source Connector Configuration Properties <source-connector-configuration-properties>
83+
- :ref:`Sink Connector Configuration Properties <kafka-sink-configuration-properties>`
84+
- :ref:`Source Connector Configuration Properties <source-configuration-index>`
8585

8686
For more information on how to build your connection URI, navigate
8787
to the :guilabel:`Authentication` section in the
Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,76 @@
1+
.. _kafka-mongodb-aws:
2+
13
================================
24
MongoDB AWS-based Authentication
35
================================
46

5-
TODO:
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 2
13+
:class: singlecol
14+
15+
Overview
16+
--------
17+
18+
In this guide, you can learn how to authenticate your {+mkc+} with your
19+
MongoDB replica set using the ``MONGODB-AWS`` authentication mechanism.
20+
The ``MONGODB-AWS`` authentication mechanism uses your Amazon Web
21+
Services Identity and Access Management (AWS IAM) credentials to authenticate
22+
your user.
23+
24+
To learn how to set up your MongoDB replica set in MongoDB Atlas to use
25+
AWS IAM credentials, see the guide on :atlas:`How to Set Up Unified AWS Access </security/set-up-unified-aws-access/>`.
26+
27+
.. important::
28+
29+
You need to use {+mkc+} version 1.5 of later to connect to a MongoDB
30+
server set up to authenticate using your AWS IAM credentials. AWS IAM
31+
credential authentication is available in MongoDB server version 4.4
32+
and later.
33+
34+
Connector Connection Settings
35+
-----------------------------
36+
37+
You can specify your ``MONGODB-AWS`` authentication credentials in your
38+
connection URI connector property as shown in the following example:
39+
40+
.. code-block:: ini
41+
42+
connection.uri="mongodb://<AWS access key id>:<AWS secret access key>@<hostname>:<port>/?authSource=<authentication database>&authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:<AWS session token>"
43+
44+
The preceding example uses the following placeholders which you need to
45+
replace:
46+
47+
.. list-table::
48+
:header-rows: 1
49+
:widths: 40 60
50+
51+
* - Placeholder
52+
- Description
53+
54+
* - **AWS access key id**
55+
- Value of your ``AWS_ACCESS_KEY_ID``.
56+
57+
* - **AWS secret access key**
58+
- Value of your ``AWS_SECRET_KEY``.
59+
60+
* - **hostname**
61+
- Network address of your MongoDB server.
62+
63+
* - **port**
64+
- Port number of your MongoDB server.
65+
66+
* - **authentication database**
67+
- MongoDB database that contains your user's authentication data. If
68+
you omit the ``authSource`` parameter and placeholder value, the
69+
driver uses the default value ``admin``.
70+
71+
* - **AWS session token**
72+
- | Value of your ``AWS_SESSION_TOKEN``. If you do not need to specify an
73+
AWS session token, omit the ``authMechanismProperties`` parameter
74+
and placeholder value.
75+
| *Optional*
76+

0 commit comments

Comments
 (0)