Skip to content

feat(coderd): connect dbcrypt package implementation #9523

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 38 commits into from
Sep 7, 2023
Merged

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Sep 4, 2023

Reimplementation of #9433 following PR feedback.

This builds upon #9522. It is recommended to read that first.

  • Adds commands server dbcrypt {rotate,decrypt,delete} to re-encrypt, decrypt, or delete encrypted data, respectively.
  • Plumbs through dbcrypt in enterprise/coderd (including unit tests).
  • Adds documentation in admin/encryption.md.

Note: This essentially enables dbcrypt by default, but the feature is soft-enforced on supplying external token encryption keys. Without specifying any keys, encryption/decryption is a no-op.

johnstcn and others added 2 commits September 4, 2023 20:43
- Adds package enterprise/dbcrypt to implement database encryption/decryption
- Adds table dbcrypt_keys and associated queries
- Adds columns oauth_access_token_key_id and oauth_refresh_token_key_id
  to tables git_auth_links and user_links

NOTE: This is part 1 of a 2-part PR. This PR focuses
mainly on the dbcrypt and database packages. A separate
PR will add the required plumbing to integrate this into
enterprise/coderd properly.

Co-authored-by: Kyle Carberry <kyle@coder.com>
This builds upon a previous PR. It is recommended to read that first.
- Adds a command dbcrypt-rotate to re-enncrypt encrypted data
- Plumbs through dbcrypt in enterprise/coderd (including unit tests)
- Enables database encryption in develop.sh by default
- Adds documentation in admin/encryption.md
@johnstcn johnstcn self-assigned this Sep 4, 2023
@johnstcn johnstcn marked this pull request as ready for review September 5, 2023 09:11
@johnstcn johnstcn changed the title feat(coderd): plumb through dbcrypt package feat(coderd): connect dbcrypt package implementation Sep 5, 2023
Base automatically changed from cj/dbcrypt_redux_1 to main September 6, 2023 11:06
@johnstcn
Copy link
Member Author

johnstcn commented Sep 7, 2023

Thanks @deansheather @mtojek @spikecurtis for your excellent review feedback and comments!

@johnstcn johnstcn merged commit 7d7c84b into main Sep 7, 2023
@johnstcn johnstcn deleted the cj/dbcrypt_redux_2 branch September 7, 2023 14:49
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants