-
Notifications
You must be signed in to change notification settings - Fork 31
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
(DOCSP-28193) created a page for securely storing config file #133
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ Configure Optional Settings | |
|
||
/telemetry | ||
/custom-output-cli | ||
/security |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.. _security: | ||
|
||
======================================================================= | ||
Securely Store an {+atlas-cli+} Configuration File | ||
======================================================================= | ||
|
||
.. default-domain:: mongodb | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 1 | ||
:class: singlecol | ||
|
||
The {+atlas-cli+}, like most popular CLIs, enables you to store your configuration file in | ||
a secure manner. The following methods are available for securely storing your |service| credentials | ||
and configuration file. The configuration file is only accessible to the current user. | ||
|
||
Overriding the Private API Key Value by Using an Environment Variable | ||
--------------------------------------------------------------------- | ||
|
||
You can specify configuration settings by using :ref:`environment variables <atlas-cli-env-vars>`. | ||
When you run any command, each setting that you specify with an environment variable takes precedence | ||
over the profile stored in the configuration file. | ||
|
||
You can encrypt the value of your private API key by overriding your private API key value through | ||
the :ref:`MONGODB_ATLAS_PRIVATE_API_KEY environment variable <atlas-cli-env-vars>`. | ||
Comment on lines
+19
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this guide is about storing the file location but then the first recommendation is not not use the file, I find this a bit confusing |
||
|
||
Setting the Location of the Configuration File Within the Secure Store | ||
---------------------------------------------------------------------- | ||
|
||
.. note:: | ||
You need to use MacOS, Linux, or Windows Subshell for Linux Systems to follow the instructions below. If | ||
you are using a different operating system, the following methods are available: | ||
|
||
- `Creating and modifying environment variables in PowerShell <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.3>`__ | ||
- Installing the ``platformdirs`` `Python package <https://pypi.org/project/platformdirs/>`__ to determine appropriate platform-specific directories | ||
|
||
Comment on lines
+37
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not really sure what to do with this, what do I do once I found the file location? |
||
You can set the location of the :ref:`configuration file <config-toml-location>` within the secure store using | ||
the ``XDG_CONFIG_HOME`` variable. To learn more about modifying the ``XDG_CONFIG_HOME`` variable, see `XDG Base Directory | ||
Specification <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`__. |
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.
this guide is a bit confusing, it doesn't really tell me how to tore the file securely, it first tells me not to use the file and use envs instead, then just tells me to change to config file location without actually telling me how to make it secure
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.
Personally I think mongocli docs handles this a bit better dirrectly explaning the file in a general config file page
https://www.mongodb.com/docs/mongocli/stable/configure/configuration-file/
Atlas CLI instead talks about saving connections settins, https://docs-mongodbcom-staging.corp.mongodb.com/atlas-cli/docsworker-xlarge/DOCSP-28193/atlas-cli-save-connection-settings/, which would be the last place I would look for the config file details, and it then for linux mentions XDG_CONFIG_HOME