-
Notifications
You must be signed in to change notification settings - Fork 887
[WIP] feat(enterprise): encrypt external access tokens (oidc, git auth) in the database #9339
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
Closed
Conversation
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 external token encryption key to YAML excludes - ensure that secret external token encryption key is scrubbed from deployment values
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Encrypt exernal access tokens
This PR adds enterprise-only functionality to encrypt external database access tokens. This builds upon @kylecarbs' previous work in #7959.
dbcrypt_sentinel
which is used as a litmus test for database encryption status.enterprise/dbcrypt
which handles encryption/decryption for the following fields:dbcrypt_sentinel.value
user_links.oauth_access_token
user_links.oauth_refresh_token
git_auth_links.oauth_access_token
git_auth_links.oauth_refresh_token
EXTERNAL_TOKEN_ENCRYPTION_KEYS
to enterprise server cmd.database.Store
will be wrapped bydbcrypt.Store
.dbcrypt-rotate
enterprise subcommand (and associated test) to perform key rotation and re-encryption of affected rows.Suggested attention:
enterprise/dbcrypt
- this is the most important pieceenterprise/cli
- specifically the rotation commandenterprise/coderd
- specifically the misc. plumbingChecklist
./scripts/dev-oidc.sh
./docs
(in progress)