-
Notifications
You must be signed in to change notification settings - Fork 208
doc: DOCSP-54251 & DOCSP-54252 -- 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
Merged
Merged
doc: DOCSP-54251 & DOCSP-54252 -- Document how to move from or to Service Accounts authentication #3753
Changes from 6 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
dc87d3c
DOCSP-54251 -- 1ST draft of guide for using SA auth
xargom 4895ec4
Apply suggestions from code review
xargom cd61fcf
Update docs/guides/migrate-to-service-accounts-authentication-guide.md
xargom 56b31fb
DOCSP-54251 -- Addressed feedback
xargom d11783d
DOCSP-54251 -- Changed typos
xargom c7abf1a
DOCSP-54252 -- Additional lading page changes
xargom 72bc941
Apply suggestions from code review
xargom 232235e
DOCSP-54251 -- Additional corrections
xargom e96ef48
DOCSP-54251 & DOCSP-54252 -- Added detailed auth information by source
xargom 437a40e
DOCSP-54251 -- Added mention of 10 tokens per minute limitation
xargom 17dc6b2
rename guide file
lantoli da37e85
move Programmatic access to
lantoli 42d5b92
remove Gov as it's already in index and not relevant here
lantoli 00ce211
restructure info in index
lantoli a049841
access token
lantoli 6443863
typos
lantoli d12bd52
doc warning about multiple credentials
lantoli 9b187fe
fix important box
lantoli 268e732
DOCSP-54251 & DOCSP-54252 -- Minor style adjustments
xargom 7033ab7
DOCSP-54251 & DOCSP-54252 -- Adjusted links to specific sections
xargom e759fdc
DOCSP-54251 & DOCSP-54252 -- Adjusted links to specific sections 2
xargom 8709fc8
DOCSP-54251 & DOCSP-54252 -- Adjusted links to specific sections 3
xargom 63b4b8b
Merge branch 'CLOUDP-334161-service-accounts-dev' into DOCSP-54251
lantoli c7ac17b
provider configuration page with smaller index
lantoli 8afc210
apply feedback
lantoli e6b80dc
make it more consistent
lantoli cac838c
more concise provider config
lantoli 8d82228
reduce url help
lantoli 61047b1
simplify AWS Secrets Manager
lantoli 8f21d0f
fix example
lantoli a347147
remove link as it doesn't work anymore
lantoli 134b0c4
revert versioning and last sections in index
lantoli 71b04bb
apply feedback about authentication and gov
lantoli 94f60e8
remove best practice section
lantoli eb4364b
AWS SM with provider attributes
lantoli 7e633b2
doc: DOCSP-54251 -- Minimal style edits
xargom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
docs/guides/migrate-to-service-accounts-authentication-guide.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| page_title: "Migration Guide: Service Accounts Authentication" | ||
| --- | ||
|
|
||
| # Migration Guide: Service Accounts Authentication | ||
xargom marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This guide helps you migrate from Programmatic Access Key (PAK) authentication to Service | ||
| Accounts (SA) authentication and viceversa without impacting your deployment. | ||
xargom marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Note:** For more information on SA, see [Service Accounts Overview](https://www.mongodb.com/docs/atlas/api/service-accounts-overview/) | ||
| in the MongoDB documentation. | ||
|
|
||
| ## Procedure | ||
|
|
||
| To migrate from Programmatic Access Key (PAK) authentication to Service | ||
| Accounts (SA) authentication, change your provider declaration variables. You can implement | ||
| this change by either: | ||
|
|
||
| - Providing a client ID and secret | ||
|
|
||
| - Providing a valid access token | ||
|
|
||
| ### Provide a Client ID and Secret | ||
|
|
||
| The following example shows the variables for PAK authentication: | ||
|
|
||
| ```terraform | ||
| provider "mongodbatlas" { | ||
| public_key = var.mongodbatlas_public_key | ||
| private_key = var.mongodbatlas_private_key | ||
| } | ||
| ``` | ||
|
|
||
| To change to SA, declare the `client_id` and `client_secret` variables as in the following example: | ||
|
|
||
| ```terraform | ||
| provider "mongodbatlas" { | ||
| client_id = var.mongodbatlas_client_id | ||
| client_secret = var.mongodbatlas_client_secret | ||
| } | ||
| ``` | ||
|
|
||
| ### Provide a Valid Access Token | ||
|
|
||
| The following example shows SA authentication set up through the ``access_token`` attribute: | ||
|
|
||
| ```terraform | ||
| provider "mongodbatlas" { | ||
| access_token = var.mongodbatlas_access_token | ||
| [is_mongodbgov_cloud = true // optional] | ||
| } | ||
| ``` | ||
|
|
||
| Consider that the access token is **valid for one hour only**. | ||
|
|
||
| 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. | ||
xargom marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **NOTE:** You can't use ``mongodbatlas_event_trigger`` with Service Accounts as the authentication method. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.