forked from hashicorp/terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Sealed state, or encrypted state at rest #1
Open
hargettp
wants to merge
16
commits into
master
Choose a base branch
from
encrypt_state
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
… generation into common function
hargettp
force-pushed
the
encrypt_state
branch
from
February 18, 2018 19:27
2b9c456
to
8a18c99
Compare
# Conflicts: # backend/local/backend.go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Inspired by Ansible's vault files, this feature enables encrypted state for the
local
backend. The intent is to provide a roughly analogous feature. The feature is intended to enable reasonably secure sharing of state through Git repositories within small teams. Keys may be shared externally but generally stored in consistent locations on team members machines outside of the Git repository containing sealed state.The changes include:
local
backendReadSealedState
andWriteSealedState
functions for reading and writing encrypted state; while not implemented here, these same functions may be appropriate for implementing sealed state in other backends (e.g., S3)NOTE: I am not a cryptography expert. All code written here is an attempt to emulate good patterns that already exist. The implementation depends on keys generated with a password-based key derivation function and AES-256.
While not as complex as the features requested hashicorp#16066 or hashicorp#9556, it is intended to enable the basic scenario for sharing encrypted state.