Skip to content

Commit

Permalink
PD-5464: MongoDB config roles OSS/Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-velonis1 committed Jan 7, 2025
1 parent 399aa15 commit 6b763d5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<body>
<h2>Configure MongoDB</h2>
<ol>
<li>Ensure that your <MadCap:xref href="../../../start/tutorials/mongodb-pro/config-user-roles-mongodb-pro.htm">MongoDB Pro Extension User Roles</MadCap:xref> are established before continuing.</li>
<li>
<MadCap:xref href="../../../start/tutorials/mongodb-pro/config-user-roles.htm">Configure User Roles for MongoDB</MadCap:xref> before continuing.</li>
<li><a href="https://www.mongodb.com/try/download/shell">Download and Install mongosh</a> if it is not already installed on your machine.</li>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;"><code>mongosh</code> is mandatory to use MongoDB with <MadCap:variable name="General.LBPro" /> and it must be accessible to <MadCap:variable name="General.Liquibase" />. We recommend that mongosh is in the system <code>PATH</code>&#160;environment variable. If it is not, that location of mongosh must be manually specified in the <code>liquibase.mongosh.conf</code> file.</p>
<li><a href="https://www.oracle.com/java/technologies/downloads/#java11">Download Java 11</a>. The MongoDB Pro extension requires it.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<MadCap:snippetBlock src="../../../Z_Resources/Snippets/images/icon-pro-top.flsnp" />
<h1>Configuring User Roles for MongoDB Pro</h1>
<p>The <MadCap:variable name="General.Liquibase" /> <a href="home.htm">MongoDB Pro Extension</a> accesses MongoDB as a user and respects all MongoDB role-based security structures. That means that you must provide sufficient privileges to the user ID that <MadCap:variable name="General.Liquibase" /> is using so that <MadCap:variable name="General.Liquibase" /> can operate the way you want.</p>
<p>This guide discusses two approaches to creating a user with sufficient privileges for <MadCap:variable name="General.Liquibase" /> and the MongoDB Pro Extension to perform all of their functionality. The two methods include the <a href="https://www.mongodb.com/docs/manual/reference/built-in-roles/">built-in roles</a> method and the <a href="https://www.mongodb.com/docs/manual/core/security-user-defined-roles/">user-defined role</a> method. It is possible to create more restrictive setups, but depending on which restrictions are imposed, some <MadCap:variable name="General.Liquibase" /> and Mongo DB Pro Extension features may not work.<br /></p>
<h1>Configure User Roles for MongoDB</h1>
<p>The <MadCap:variable name="General.Liquibase" /> <a href="home.htm">MongoDB Pro Extension</a> and <a href="https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/mongodb/">OSS&#160;extension</a> access MongoDB as a user and respects all MongoDB role-based security structures. That means that you must provide sufficient privileges to the user ID that <MadCap:variable name="General.Liquibase" /> is using so that <MadCap:variable name="General.Liquibase" /> can operate the way you want.</p>
<p>This guide discusses two approaches to creating a user with sufficient privileges for <MadCap:variable name="General.Liquibase" /> and the MongoDB extension to perform all of their functionality. The two methods include the <a href="https://www.mongodb.com/docs/manual/reference/built-in-roles/">built-in roles</a> method and the <a href="https://www.mongodb.com/docs/manual/core/security-user-defined-roles/">user-defined role</a> method. It is possible to create more restrictive setups, but depending on which restrictions are imposed, some <MadCap:variable name="General.Liquibase" /> and MongoDB extension features may not work.<br /></p>
<h2>Role requirements</h2>
<p>The two methods to create a user with privileges for <MadCap:variable name="General.Liquibase" /> include the <a href="https://www.mongodb.com/docs/manual/reference/built-in-roles/">built-in roles</a> method and the <a href="https://www.mongodb.com/docs/manual/core/security-user-defined-roles/">user-defined role</a> method. The built-in role method allows you to provide different levels of access commonly needed in a database system. The user-defined role method allows for custom role creation when the built-in roles cannot describe the privileges necessary for the job.</p>
<h3>Permissions: roles required to manage non-administrative database changes</h3>
Expand All @@ -29,8 +28,8 @@ <h3>Roles Required to Manage Administrative Tasks</h3>
</ul>
<p>As a MongoDB administrator, you have the ability to create a user using these standard roles or you can create your own custom roles. <MadCap:variable name="General.Liquibase" /> supports both approaches as long as the resulting permissions meet the above requirements.</p>
<h2>Built-in roles method</h2>
<p>This method allows you to create a user that has <code>readWrite</code> and <code>dbAdmin</code> roles. when <code>dbAdmin</code> roles are enabled, this user can run the <MadCap:variable name="General.LBPro" /> MongoDB&#160;extension directly from the administrative perspective. As mentioned above, the built-in role method allows you to provide different levels of access commonly needed in a database system. If you need a user to have administrative access, use this guide.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Without <b><code>dbAdmin</code></b> role permissions, you cannot run the MongoDB Pro extension from the administrative perspective.</p>
<p>This method allows you to create a user that has <code>readWrite</code> and <code>dbAdmin</code> roles. when <code>dbAdmin</code> roles are enabled, this user can run the <MadCap:variable name="General.Liquibase" /> MongoDB&#160;extension directly from the administrative perspective. As mentioned above, the built-in role method allows you to provide different levels of access commonly needed in a database system. If you need a user to have administrative access, use this guide.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Without <b><code>dbAdmin</code></b> role permissions, you cannot run the MongoDB extension from the administrative perspective.</p>
<p>Create a user with the built-in <code>readWrite</code> and <code>dbAdmin</code> roles by executing the following code in one of two ways:</p>
<ol>
<li>With your own user, password, and database content, use Mongo Shell directly in MongoDB to execute the code.</li>
Expand Down
10 changes: 5 additions & 5 deletions Content/start/tutorials/mongodb-pro/home.htm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>Using <MadCap:variable name="General.Liquibase" /> MongoDB Pro with MongoDB
<p>You can use <MadCap:variable name="General.Liquibase" /> with several MongoDB providers, including MongoDB&#160;Atlas, MongoDB&#160;Community Server, MongoDB Enterprise Server, and the Amazon DocumentDB clone. The <MadCap:variable name="General.Liquibase" /> MongoDB Pro extension lets you use all the features of <MadCap:variable name="General.LBPro" /> with MongoDB, including <MadCap:xref href="../../../liquibase-pro/policy-checks/home.htm">Policy Checks</MadCap:xref>, <MadCap:xref href="../../../liquibase-pro/secrets-management/home.htm">Secrets Management</MadCap:xref>, and <MadCap:xref href="../../../liquibase-pro/observability/structured-logging.htm">[%=General.StructuredLogging%]</MadCap:xref>. These features enhance your database's security, reliability, and compatibility with other tools in your development pipeline.</p>
<p>Using <MadCap:variable name="General.Liquibase" /> with MongoDB is similar to using it with other databases. You still track changes within <MadCap:variable name="General.changeset" />s in <MadCap:variable name="General.changelog" />s, and use commands such as <code><MadCap:xref href="../../../commands/update/update.html">update</MadCap:xref></code> and <code><MadCap:xref href="../../../commands/rollback/rollback.htm">rollback</MadCap:xref></code> to deploy changes and manage your database. However, because MongoDB&#160;does not use SQL, you cannot use SQL&#160;<MadCap:variable name="General.changelog" />s or <MadCap:variable name="General.Liquibase" /> commands that generate SQL&#160;output.</p>
<MadCap:snippetBlock src="../../../Z_Resources/Snippets/text/database-tutorials/database-mongodb-changelog-formats.flsnp" />
<p>To learn how to specify changes in each format, see <MadCap:xref href="../../../liquibase-pro/native-executors/mongodb-mongosh.htm">Use Native Executors with MongoDB&#160;Pro</MadCap:xref>.</p>
<p>To learn how to specify changes in each format, see <MadCap:xref href="../../../liquibase-pro/native-executors/mongodb-mongosh.htm">Use Native Executors with MongoDB Pro</MadCap:xref>.</p>
<h2>Getting started tutorials</h2>
<p>To learn how to configure the <MadCap:variable name="General.Liquibase" /> MongoDB Pro extension with your installation of MongoDB, see the following topics:</p>
<ul>
Expand Down Expand Up @@ -51,7 +51,7 @@ <h3>Supported commands</h3>
<li>Policy checks commands. For example, <code><MadCap:xref href="../../../commands/policy-checks/subcommands/copy.htm">copy</MadCap:xref></code>, <code><MadCap:xref href="../../../commands/policy-checks/subcommands/show.htm">show</MadCap:xref></code>, and <code><MadCap:xref href="../../../commands/policy-checks/subcommands/run.htm">run</MadCap:xref></code> are supported.</li>
<li>All other commands, unless otherwise specified in the <MadCap:xref href="#Limitati">Limitations</MadCap:xref> section.</li>
</ul>
<p>For more information, see <MadCap:xref href="../../../commands/home.htm">About [%=General.Liquibase%] Commands</MadCap:xref>.</p>
<p>For more information, see <MadCap:xref href="../../../commands/home.htm">[%=General.Liquibase%] Commands</MadCap:xref>.</p>
<h3>Supported policy checks</h3>
<p> You can use <MadCap:variable name="General.changelog" />-scoped policy checks in MongoDB Pro. For example:</p>
<ul>
Expand All @@ -68,7 +68,7 @@ <h3>Supported policy checks</h3>
</li>
<li><code><MadCap:xref href="../../../liquibase-pro/policy-checks/checks/changelog-checks/rollback-required.htm">RollbackRequired</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../liquibase-pro/policy-checks/checks/changelog-checks/require-changeset-id-is-uuid.htm">RequireChangesetDisUUID</MadCap:xref></code>
<li><code><MadCap:xref href="../../../liquibase-pro/policy-checks/checks/changelog-checks/require-changeset-id-is-uuid.htm">RequireChangesetIDisUUID</MadCap:xref></code>
</li>
<li><code><MadCap:xref href="../../../liquibase-pro/policy-checks/checks/changelog-checks/sql-user-defined-pattern-check.htm">SqlUserDefinedPatternCheck</MadCap:xref></code>
</li>
Expand All @@ -79,7 +79,7 @@ <h2><a name="Limitati"></a>Limitations</h2>
// changeset authorname:1 runWith:mongosh</code></pre>
<li><MadCap:variable name="General.Liquibase" />&#160;<a href="../../../concepts/changelogs/preconditions.html">preconditions</a> are not supported.</li>
<li>The <code><MadCap:xref href="../../../change-types/modifychangesets.htm">modifyChangeSets</MadCap:xref></code> tag is not supported.</li>
<li>MongoDB is a NoSQL database, so you cannot use any commands that generate SQL output (such as <code><MadCap:xref href="../../../commands/update/update-sql.htm">update-sql</MadCap:xref></code> and <code><MadCap:xref href="../../../commands/utility/changelog-sync-sql.htm">changelog-sync-sql</MadCap:xref></code>). MongoDB also does not support the database inspection command family (such as <code><MadCap:xref href="../../../commands/inspection/diff.htm">diff</MadCap:xref></code> and <code><MadCap:xref href="../../../commands/inspection/generate-changelog.html">generate-changelog</MadCap:xref></code>). Learn more <MadCap:xref href="../../../commands/home.htm">About [%=General.Liquibase%] Commands</MadCap:xref> here.</li>
<li>MongoDB is a NoSQL database, so you cannot use any commands that generate SQL output (such as <code><MadCap:xref href="../../../commands/update/update-sql.htm">update-sql</MadCap:xref></code> and <code><MadCap:xref href="../../../commands/utility/changelog-sync-sql.htm">changelog-sync-sql</MadCap:xref></code>). MongoDB also does not support the database inspection command family (such as <code><MadCap:xref href="../../../commands/inspection/diff.htm">diff</MadCap:xref></code> and <code><MadCap:xref href="../../../commands/inspection/generate-changelog.html">generate-changelog</MadCap:xref></code>). Learn more <MadCap:xref href="../../../commands/home.htm">[%=General.Liquibase%] Commands</MadCap:xref> here.</li>
<li><MadCap:variable name="General.LBPro" /> policy checks have limited support. <a href="../../../liquibase-pro/policy-checks/checks/database-checks/home.htm">Database-scoped policy checks</a> are not supported because they are database-specific.</li>
<li>OIDC&#160;authentication is supported only for MongoDB&#160;Atlas. LDAP and Kerberos authentication are not supported for any MongoDB&#160;platform. Learn more about MongoDB&#160;authentication here: <a href="https://www.mongodb.com/docs/v6.0/core/authentication/">authentication</a>.<br /></li>
</ul>
Expand Down Expand Up @@ -165,7 +165,7 @@ <h2>Deprecated database versions</h2>
<h2>Related links</h2>
<ul>
<li>
<MadCap:xref href="config-user-roles-mongodb-pro.htm">Configuring User Roles for MongoDB Pro</MadCap:xref>
<MadCap:xref href="config-user-roles.htm">Configure User Roles for MongoDB</MadCap:xref>
</li>
</ul>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<MadCap:snippetBlock src="../../../Z_Resources/Snippets/images/icon-pro-top.flsnp" />
<h1>Using <MadCap:variable name="General.Liquibase" /> MongoDB Pro with MongoDB Community and Enterprise Server</h1>
<p>MongoDB offers several NoSQL database products. This guide describes how to use <a href="home.htm"><MadCap:variable name="General.Liquibase" /> MongoDB Pro</a> with <a href="https://www.mongodb.com/try/download/community">MongoDB Community Server</a> and <a href="https://www.mongodb.com/try/download/enterprise">MongoDB Enterprise Server</a>. You need a <a href="../../../liquibase-pro/license-key.htm"><MadCap:variable name="General.LBPro" /> license key</a> to use it.</p>
<p>This guide does not imply support for third-party clones or emulations of MongoDB. For a tutorial on using <MadCap:variable name="General.Liquibase" /> with Amazon DocumentDB, see <MadCap:xref href="amazon-documentdb.htm">MongoDB Pro and Amazon DocumentDB</MadCap:xref>. This guide also does not describe the community-maintained <MadCap:variable name="General.Liquibase" /> MongoDB extension. For information on that extension, see <a href="https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/mongodb/">Contribute&#160;Docs:&#160;Use Liquibase with MongoDB</a>.</p>
<p>This guide does not imply support for third-party clones or emulations of MongoDB. For a tutorial on using <MadCap:variable name="General.Liquibase" /> with Amazon DocumentDB, see <MadCap:xref href="amazon-documentdb.htm">Using [%=General.Liquibase%] MongoDB Pro with Amazon DocumentDB</MadCap:xref>. This guide also does not describe the community-maintained <MadCap:variable name="General.Liquibase" /> MongoDB extension. For information on that extension, see <a href="https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/mongodb/">Contribute&#160;Docs:&#160;Use Liquibase with MongoDB</a>.</p>
<h2>Verified database versions</h2>
<MadCap:snippetBlock src="../../../Z_Resources/Snippets/text/database-tutorials/verified-versions/mongodb-pro.flsnp" />
<MadCap:snippetBlock src="../../../Z_Resources/Snippets/text/database-tutorials/database-mongodb-versions-table.flsnp" />
Expand Down Expand Up @@ -73,13 +73,13 @@ <h2>Test connection</h2>
<h2>Related links</h2>
<ul>
<li>
<MadCap:xref href="config-user-roles-mongodb-pro.htm">MongoDB Pro Extension User Roles</MadCap:xref>
<MadCap:xref href="config-user-roles.htm">Configure User Roles for MongoDB</MadCap:xref>
</li>
<li>
<MadCap:xref href="amazon-documentdb.htm">MongoDB Pro and Amazon DocumentDB</MadCap:xref>
<MadCap:xref href="amazon-documentdb.htm">Using [%=General.Liquibase%] MongoDB Pro with Amazon DocumentDB</MadCap:xref>
</li>
<li>
<MadCap:xref href="mongodb-atlas.htm">MongoDB Atlas</MadCap:xref>
<MadCap:xref href="mongodb-atlas.htm">Using [%=General.Liquibase%] MongoDB Pro with MongoDB Atlas</MadCap:xref>
</li>
<li><a href="https://contribute.liquibase.com/extensions-integrations/directory/tutorials/mongodb/">Contributor Docs:&#160;Open Source MongoDB Extension</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion Project/TOCs/TOC.fltoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
Link="/Content/start/tutorials/mongodb-pro/mongodb-community-enterprise-server.htm" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" />
<TocEntry
Title="[%=System.LinkedTitle%]"
Link="/Content/start/tutorials/mongodb-pro/config-user-roles-mongodb-pro.htm" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" />
Link="/Content/start/tutorials/mongodb-pro/config-user-roles.htm" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" />
</TocEntry>
<TocEntry
Title="MySQL"
Expand Down

0 comments on commit 6b763d5

Please sign in to comment.