Skip to content

Commit 9786683

Browse files
(DOCSP-7790): OM Containerization Beta - SCRAM-SHA (#136)
* (DOCSP-7790): OM Containerization Beta - SCRAM-SHA * (DOCSP-7790): Copy review * (DOCSP-7790): Tech review * (DOCSP-7790): Tech review 2
1 parent b3e946a commit 9786683

File tree

4 files changed

+104
-7
lines changed

4 files changed

+104
-7
lines changed

source/includes/steps-deploy-k8s-opsmgr.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ content: |
148148
You can add any of the following optional settings to the
149149
|k8s-obj| specification file for an |onprem| deployment:
150150
151-
- :opsmgrkube:`spec.clusterName`
152-
- :opsmgrkube:`spec.configuration`
151+
- ``spec.``:opsmgrkube:`~spec.clusterName`
152+
- ``spec.``:opsmgrkube:`~spec.configuration`
153153
- ``spec.applicationDatabase.``:setting:`~spec.logLevel`
154154
- ``spec.applicationDatabase.``:setting:`~spec.featureCompatibilityVersion`
155155
- ``spec.applicationDatabase.podSpec.``:setting:`~spec.podSpec.cpu`
@@ -163,6 +163,8 @@ content: |
163163
- ``spec.applicationDatabase.podSpec.``:setting:`~spec.podSpec.podAffinity`
164164
- ``spec.applicationDatabase.podSpec.``:setting:`~spec.podSpec.podAntiAffinityTopologyKey`
165165
- ``spec.applicationDatabase.podSpec.``:setting:`~spec.podSpec.nodeAffinity`
166+
- ``spec.applicationDatabase.passwordSecretKeyRef.``:opsmgrkube:`~spec.applicationDatabase.passwordSecretKeyRef.name`
167+
- ``spec.applicationDatabase.passwordSecretKeyRef.``:opsmgrkube:`~spec.applicationDatabase.passwordSecretKeyRef.key`
166168
167169
---
168170
title: "Save this file with a ``.yaml`` file extension."

source/reference/k8s-operator-om-specification.txt

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _k8s-om-specification:
22

3-
================================
4-
Ops Manager Object Specification
5-
================================
3+
==================================
4+
Ops Manager Resource Specification
5+
==================================
66

77
.. default-domain:: mongodb
88

@@ -155,3 +155,23 @@ Optional |onprem| Resource Settings
155155
See :opsmgr:`Ops Manager Configuration Settings
156156
</reference/configuration/>` for property names and descriptions.
157157

158+
.. opsmgrkube:: spec.applicationDatabase.passwordSecretKeyRef.name
159+
160+
*Type*: string
161+
162+
Name of the :ref:`secret <om-db-user-secret>` that contains the
163+
password for the |onprem| database user ``mongodb-ops-manager``.
164+
|onprem| uses this password to :ref:`authenticate to the Application
165+
Database <app-db-auth>`.
166+
167+
168+
.. opsmgrkube:: spec.applicationDatabase.passwordSecretKeyRef.key
169+
170+
*Type*: string
171+
172+
Name of the field in the :ref:`secret <om-db-user-secret>` that
173+
contains the password for the |onprem| database user
174+
``mongodb-ops-manager``. |onprem| uses this password to
175+
:ref:`authenticate to the Application Database <app-db-auth>`.
176+
177+
The default value is ``password``.

source/reference/k8s/example-ops-manager.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ spec:
1111
mms.security.allowCORS: "false"
1212

1313
applicationDatabase:
14+
passwordSecretKeyRef:
15+
name: om-db-user-secret
16+
key: password
1417
members: 3
1518
version: 4.0.7
1619
persistent: true

source/tutorial/deploy-om-container.txt

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ To deploy an |onprem| resource you must:
2929

3030
1. :doc:`Install </tutorial/install-k8s-operator>` the |k8s-op| 1.3.0
3131
or newer.
32+
3233
#. Ensure that the host on which you want to deploy |onprem| has a
3334
minimum of five gigabytes of memory.
35+
3436
#. Create a |k8s| |k8s-secret| for an admin user in the same |k8s-ns| as
3537
the |onprem| resource.
3638

@@ -49,6 +51,38 @@ To deploy an |onprem| resource you must:
4951
--from-literal=LastName="<lastname>"
5052
-n <namespace>
5153

54+
.. _om-db-user-secret:
55+
56+
4. (*Optional*) To set the password for the |onprem| database user,
57+
create a |k8s-secret| in the same |k8s-ns| as the |onprem| resource.
58+
59+
The |k8s-op-short| creates the database user that |onprem| uses to
60+
connect to the :ref:`mms-application-database`. You can set the
61+
password for this database user by invoking the following command to
62+
create a secret:
63+
64+
.. code-block:: sh
65+
66+
kubectl create secret generic <om-db-user-secret-name>
67+
--from-literal=password="<om-db-user-password>"
68+
-n <namespace>
69+
70+
.. note::
71+
72+
If you choose to create a secret for the |onprem| database user,
73+
you must specify the secret's
74+
:opsmgrkube:`~spec.applicationDatabase.passwordSecretKeyRef.name`
75+
in the |onprem| resource definition. By default, the
76+
|k8s-op-short| looks for the password value in the ``password``
77+
key. If you stored the password value in a different key, you
78+
must also specify that
79+
:opsmgrkube:`~spec.applicationDatabase.passwordSecretKeyRef.key`
80+
name in the |onprem| resource definition.
81+
82+
If you don't create a secret, then the |k8s-op-short| automatically
83+
generates a password and stores it internally. For more information,
84+
see :ref:`app-db-auth`.
85+
5286
Considerations
5387
--------------
5488

@@ -68,8 +102,8 @@ the |k8s-op-short| reuses the secret. If you create an |onprem| resource
68102
with a different name, then |k8s-op-short| creates a new secret and
69103
Application Database, and the old secret isn't reused.
70104

71-
Application Database Replica Set
72-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105+
Application Database Topology
106+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73107

74108
When you create an instance of |onprem| through the |k8s-op-short|, the
75109
:ref:`mms-application-database` is deployed as a :term:`replica set`.
@@ -79,6 +113,44 @@ have concerns about performance or size requirements for the Application
79113
Database, contact `MongoDB Support
80114
<https://support.mongodb.com/welcome>`__.
81115

116+
.. _app-db-auth:
117+
118+
Application Database Authentication
119+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120+
121+
The |k8s-op-short| enforces ``SCRAM-SHA-1``
122+
:manual:`authentication </core/security-scram/#scram-mechanisms>` on the
123+
Application Database.
124+
125+
The |k8s-op-short| creates the database user which |onprem| uses to
126+
connect to the Application Database. This database user has the
127+
following attributes:
128+
129+
.. list-table::
130+
:widths: 30 70
131+
:stub-columns: 1
132+
133+
* - Username
134+
- ``mongodb-ops-manager``
135+
136+
* - Authentication Database
137+
- ``admin``
138+
139+
* - Roles
140+
- | :authrole:`readWriteAnyDatabase`
141+
| :authrole:`dbAdminAnyDatabase`
142+
| :authrole:`clusterMonitor`
143+
144+
The |onprem| database user's name and roles cannot be modified. However,
145+
you can set the database user's password by :ref:`creating a
146+
secret <om-db-user-secret>` and can later update the password by editing
147+
that secret. If you don't create a secret, or if you delete a previously
148+
created secret, then the |k8s-op-short| automatically generates a password and stores it internally.
149+
150+
If you need to authenticate to the Application Database as a
151+
different user, you must first deploy the |onprem| resource and then
152+
manually :manual:`add a new user </reference/method/db.createUser/>` to the database.
153+
82154
Procedure
83155
---------
84156

0 commit comments

Comments
 (0)