-
Notifications
You must be signed in to change notification settings - Fork 208
doc: DOCSP-54251 -- Document how to move from or to Service Accounts authentication #3753
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
base: CLOUDP-334161-service-accounts-dev
Are you sure you want to change the base?
Conversation
APIx bot: a message has been sent to Docs Slack channel |
|
||
The JWT token is only valid during its set duration time. See [Generate Service Account Token](https://www.mongodb.com/docs/atlas/api/service-accounts/generate-oauth2-token/#std-label-generate-oauth2-token-atlas) for more details on creating an SA token. | ||
|
||
**IMPORTANT:** Currently, the MongoDB Terraform provider does not support additional Token OAuth features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: what do we mean with this?
|
||
**IMPORTANT:** Currently, the MongoDB Terraform provider does not support additional Token OAuth features. | ||
|
||
**NOTE:** You can not use ``mongodbatlas_event_trigger`` with Service Accounts as the authentication method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a why? @lantoli
} | ||
``` | ||
|
||
2. Provide a valid JSON Web Token (JWT): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% clear on this. When I read it seems like we're saying
Step 1. Use client_id
and client_secret
Step 2. Add the access_token
attribute
which should not be the case. Instead it's "you either use client_id+client_secret or access_token"
This guide helps you migrate from Programmatic Access Key (PAK) authentication to Service | ||
Accounts (SA) authentication and viceversa without impacting your deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this guide just to demonstrate how to migrate from PAK to SA? Should we recommend/suggest migrating from SA to PAK? Also vice versa is a latin phrase that doesn't translate well.
This guide helps you migrate from Programmatic Access Key (PAK) authentication to Service | |
Accounts (SA) authentication and viceversa without impacting your deployment. | |
This guide helps to you migrate from Programmatic Access Key (PAK) authentication to Service | |
Accounts (SA) authentication without impacting your deployment. |
The following example declares PAK authentication: | ||
|
||
```terraform | ||
provider "mongodbatlas" { | ||
public_key = var.mongodbatlas_public_key | ||
private_key = var.mongodbatlas_private_key | ||
``` | ||
|
||
To change to SA, declare the variables as in the following example: | ||
|
||
```terraform | ||
provider "mongodbatlas" { | ||
client_id = var.mongodbatlas_client_id | ||
client_secret = var.mongodbatlas_client_secret | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve clarity, suggest:
The following example declares PAK authentication: | |
```terraform | |
provider "mongodbatlas" { | |
public_key = var.mongodbatlas_public_key | |
private_key = var.mongodbatlas_private_key | |
``` | |
To change to SA, declare the variables as in the following example: | |
```terraform | |
provider "mongodbatlas" { | |
client_id = var.mongodbatlas_client_id | |
client_secret = var.mongodbatlas_client_secret | |
} | |
``` | |
For example, consider the following sample PAK authentication variables: | |
```terraform | |
provider "mongodbatlas" { | |
public_key = var.mongodbatlas_public_key | |
private_key = var.mongodbatlas_private_key | |
``` | |
To change to SA, modify the variables to use your SA client_id and client_secret: | |
```terraform | |
provider "mongodbatlas" { | |
client_id = var.mongodbatlas_client_id | |
client_secret = var.mongodbatlas_client_secret | |
} | |
``` |
|
||
**IMPORTANT:** Currently, the MongoDB Terraform provider does not support additional Token OAuth features. | ||
|
||
**NOTE:** You can not use ``mongodbatlas_event_trigger`` with Service Accounts as the authentication method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**NOTE:** You can not use ``mongodbatlas_event_trigger`` with Service Accounts as the authentication method. | |
**NOTE:** You can't use ``mongodbatlas_event_trigger`` with Service Accounts as the authentication method. |
|
||
**Note:** For more information on SA, see [Service Accounts Overview](https://www.mongodb.com/docs/atlas/api/service-accounts-overview/) | ||
in the MongoDB documentation. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a Prerequisites or Before You Begin section?
Description
DOCSP-54251
Creates a guide to move to Service Accounts auth.
Link to any related issue(s):
Type of change:
Required Checklist:
Further comments