Skip to content

Update authentication.mdx #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/challenge/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 2
---


# 👐 RUN : Authentication challenge
# 👐 RUN: Authentication Challenge

:::info
The provided scripts are incomplete. Replace all `<CODE_BLOCK>` with the correct code to complete the lab.
Expand All @@ -20,7 +20,7 @@ username = "myUser"
password = "mySecurePassword"
!atlas dbusers create <CODE_BLOCK>
```
> Refer to documentations: [atlas dbusers](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-create/)
> Refer to documentation: [atlas dbusers](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-create/)

:::tip
<details>
Expand All @@ -34,7 +34,7 @@ password = "mySecurePassword"
</details>
:::

### 2. Lets test our SCRAM user successful creation by performing the authentication process
### 2. Let's test our SCRAM user successful creation by performing the authentication process

```python
!pip install pymongo dnspython
Expand All @@ -60,12 +60,12 @@ client.list_database_names()
# create a Atlas-managed X509 user with username: "myX509User" and role: "readAnyDatabase"
!atlas dbusers create <CODE_BLOCK>
```
> Refer to documentations: [atlas dbusers](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-create/)
> Refer to documentation: [atlas dbusers](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-create/)
```python
# Generate a certification for "myX509user", set monthsUntilExpiration to 1, and save it to /tmp/cert.pem
!atlas dbusers certs create <CODE_BLOCK> > /tmp/cert.pem
```
> Refer to documentations: [atlas dbusers certs](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-certs-create/)
> Refer to documentation: [atlas dbusers certs](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-dbusers-certs-create/)

:::tip
<details>
Expand All @@ -81,7 +81,7 @@ client.list_database_names()
</details>
:::

### 4. Let's test our X509 User
### 4. Let's test our X509 user

```python
# Get connection string
Expand All @@ -99,6 +99,6 @@ client = MongoClient(new_connection,
# Access the database
client.list_database_names()
```
## Next Steps
## Next steps

Start the chapter on [RBAC](./rbac) for Role Based Access user management.
Start the chapter on [RBAC](./rbac) for role-based access user management.