|
1 | 1 | .. list-table::
|
2 | 2 | :header-rows: 1
|
3 |
| - :widths: 20 25 35 20 |
| 3 | + :widths: 20 18 42 20 |
4 | 4 |
|
5 | 5 | * - Field
|
6 | 6 |
|
|
86 | 86 |
|
87 | 87 | - string
|
88 | 88 |
|
| 89 | + * - ``useAuthorizationClaim`` |
| 90 | + |
| 91 | + - Optional |
| 92 | + |
| 93 | + - Determines if the ``authorizationClaim`` is required. The default value is |
| 94 | + ``true``. |
| 95 | + |
| 96 | + If the ``useAuthorizationClaim`` field is set to ``true``, the server requires |
| 97 | + an ``authorizationClaim`` for the identity provider's config. This is the |
| 98 | + default behavior. |
| 99 | + |
| 100 | + If the ``useAuthorizationClaim`` field is set to ``false``, the |
| 101 | + ``authorizationClaim`` field is optional (and ignored if provided). |
| 102 | + Instead, the server does the following: |
| 103 | + |
| 104 | + - Searches the token for a claim whose name is listed in the |
| 105 | + ``principalNameClaim`` field. This is typically named ``sub``. For |
| 106 | + example: |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + - Constructs the internal username by concatenating the ``authNamePrefix``, |
| 111 | + a forward slash (`/`), and the contents of the claim identified by |
| 112 | + ``principalNameClaim`` within the access token. For example, with a |
| 113 | + ``authNamePrefix`` field value of "mdbinc", the internal username is: |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + - Looks for the user with this username and authorize the client with the |
| 118 | + roles:: |
| 119 | + |
| 120 | + .. code-block:: javascript |
| 121 | + |
| 122 | + { user: "mdbinc/[email protected]", |
| 123 | + db: "$external" } |
| 124 | + |
| 125 | + .. versionadded:: 7.2 |
| 126 | + |
| 127 | + - boolean |
| 128 | + |
89 | 129 | * - ``authorizationClaim``
|
90 | 130 |
|
91 |
| - - Required |
| 131 | + - Conditional |
92 | 132 |
|
93 |
| - - Claim extracted from access token that contains MongoDB role names. |
| 133 | + - Required, unless ``useAuthorizationClaim`` is set to ``false``. |
| 134 | + |
| 135 | + Claim extracted from access token that contains MongoDB role names. |
94 | 136 |
|
95 | 137 | - string
|
96 | 138 |
|
|
0 commit comments