Skip to content
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

CLOUDP-279932: SDK based authentication #3339

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

CLOUDP-279932: SDK based authentication #3339

wants to merge 8 commits into from

Conversation

wtrocki
Copy link
Member

@wtrocki wtrocki commented Oct 22, 2024

Description

Integration with Credentials module in Atlas CLI

WIP - Intention is to provide demo for authentication capability.
In PR I have flagged number of areas that will need to be done for proper integration.
PR will not be merged, but it can be used as base for future Auth Integration

Testing

  1. Create profile /bin/atlas config edit --profile auth-test --debug
[auth-test]
output = 'json'
ops_manager_url = 'https://cloud-dev.mongodb.com'
org_id = '6707a96bc2b066602a4dfdcc'
project_id = '670ce177f33cea212ea202a5'
public_api_key = 'your sa id'
private_api_key = 'your sa secret'

or setup profile using cli

/bin/atlas config init --profile auth-test
? Service Account Client ID: ****************
? Service Account Secret: [? for help] ************************
😘 
  1. Run API call (command)
./bin/atlas clusters list --profile auth-test --debug

Result:

{"links":[{"href":"https://cloud-dev.mongodb.com/api/atlas/v2/groups/670ce177f33cea212ea202a5/clusters?includeCount=true&includeDeletedWithRetainedBackups=false&pageNum=1&itemsPerPage=100","rel":"self"}],"results":[],"totalCount":0}
{
  "links": [
    {
      "href": "https://cloud-dev.mongodb.com/api/atlas/v2/groups/670ce177f33cea212ea202a5/clusters?includeCount=true\u0026includeDeletedWithRetainedBackups=false\u0026pageNum=1\u0026itemsPerPage=100",
      "rel": "self"
    }
  ],
  "results": [],
  "totalCount": 0
}

@wtrocki wtrocki changed the title POC: SDK based authentication CLOUDP-279932: SDK based authentication Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant