-
Notifications
You must be signed in to change notification settings - Fork 899
docs: add secrets #3057
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
docs: add secrets #3057
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
Prev
Previous commit
improve english moar
- Loading branch information
commit d5090293377141262bd6e6d69686fcd8135844eb
There are no files selected for viewing
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 | ||||
---|---|---|---|---|---|---|
|
@@ -5,31 +5,36 @@ This article explains how to use secrets in a workspace. To authenticate the | |||||
workspace provisioner, see <a href="./templates/authentication">this</a>. | ||||||
</blockquote> | ||||||
|
||||||
Coder takes an unopinionated stance to workspace secrets. | ||||||
Coder is open-minded about how you get your secrets into your workspaces. | ||||||
|
||||||
## Wait a minute... | ||||||
|
||||||
Your first stab at secrets with Coder should be your local method. | ||||||
You can do everything you can locally and more with your Coder workspace, so | ||||||
whatever workflow and tools you already use to manage secrets can be brought | ||||||
whatever workflow and tools you already use to manage secrets may be brought | ||||||
over. | ||||||
|
||||||
For most, this workflow is simply: | ||||||
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.
Suggested change
|
||||||
|
||||||
1. Give your users their secrets in advance | ||||||
1. They write them to a persistent file after | ||||||
they've built a workspace | ||||||
1. Your users write them to a persistent file after | ||||||
they've built their workspace | ||||||
|
||||||
<a href="./templates#parameters">Template parameters</a> are a dangerous way to accept secrets. | ||||||
We show parameters in cleartext around the product. Assume anyone with view | ||||||
access to a workspace can also see its parameters. | ||||||
|
||||||
## Dynamic Secrets | ||||||
|
||||||
Dynamic secrets are attached to the workspace lifecycle and require no setup by | ||||||
the end user. | ||||||
Dynamic secrets are attached to the workspace lifecycle and automatically | ||||||
injected into the workspace. For a little bit of up front template work, | ||||||
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.
Suggested change
|
||||||
they make life simpler for both the end user and the security team. | ||||||
|
||||||
They can be implemented in your template code like so: | ||||||
This method is limited to | ||||||
[services with Terraform providers](https://registry.terraform.io/browse/providers), | ||||||
which excludes obscure API providers. | ||||||
|
||||||
Dynamic secrets can be implemented in your template code like so: | ||||||
|
||||||
```hcl | ||||||
resource "twilio_iam_api_key" "api_key" { | ||||||
|
@@ -46,8 +51,6 @@ resource "coder_agent" "dev" { | |||||
} | ||||||
``` | ||||||
|
||||||
This method is limited to [services with Terraform providers](https://registry.terraform.io/browse/providers). | ||||||
|
||||||
A catch-all variation of this approach is dynamically provisioning a cloud service account (e.g [GCP](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_service_account_key#private_key)) | ||||||
for each workspace and then making the relevant secrets available via the cloud's secret management | ||||||
system. | ||||||
|
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.
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.