Skip to content
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

proposal: secrets management #557

Open
bobheadxi opened this issue Oct 14, 2020 · 8 comments
Open

proposal: secrets management #557

bobheadxi opened this issue Oct 14, 2020 · 8 comments
Assignees
Labels
discussion Seeking input and discussion needs research Do research and exploratory work theme:feature Request a new feature.

Comments

@bobheadxi
Copy link
Member

bobheadxi commented Oct 14, 2020

Summary

We should be able to create and distribute credentials to subsets of Rocket users based on team.

Requirements

  • Some sort of secret manager - either built-in to Rocket, or leveraging something like Vault. This would probably involve setting up our own Vault instance (or whatever service we opt to use)
    • alternative approaches include more consumer-facing password managers like Passbolt and Bitwarden, but I don't think those are geared for programmatic access like Vault is (ie they have APIs, but seemingly not for reading passwords, likely for good reason)
  • /rocket secret [create|view|delete|edit] $SECRET for secrets CRUD
    • what secrets looks like (structured vs unstructured) probably depends on the backend, but I would be in favour of unstructured and encourage JSON secrets/arbitrary format as plain text
  • /rocket secret [grant|rescind] $SECRET $TEAM for providing access

Context

Suggested by @SarahBornais , who brings up a good point - we currently manage passwords through ad-hoc sharing or the private exec repository, which is pretty jank and unsafe.

My only concern with self-hosting our secrets is losing access to our instance of the secrets service would be a pretty big problem, whereas our current approach with the exec repository feels pretty permanent (if unsafe)

@bobheadxi bobheadxi added theme:feature Request a new feature. needs research Do research and exploratory work labels Oct 14, 2020
@bobheadxi bobheadxi changed the title secrets management proposal: secrets management Oct 14, 2020
@chuck-sys
Copy link
Collaborator

Interesting. A suggestion about losing access to a self-hosted secrets service would be to have an encrypted backup stored somewhere, with a key that only a select few would know.

Of course, all stored secrets would probably be encrypted symmetrically (some AES) and encoded in Base64. The keys would be distributed to organizational admins, and provided as an environmental variable.

More advanced ideas include Shamir's secret sharing, where only when multiple sub-keys come together (but not all of them) that we can decrypt things (probably some last-ditch effort). But our secrets aren't that important, right?

@SarahBornais SarahBornais self-assigned this Oct 14, 2020
@bobheadxi
Copy link
Member Author

bobheadxi commented Oct 14, 2020

But our secrets aren't that important, right?

If we set this up, I would migrate all our credentials over and they would be pretty important - things like:

@chuck-sys
Copy link
Collaborator

Ah. That's quite a few there.

@bobheadxi
Copy link
Member Author

A suggestion about losing access to a self-hosted secrets service would be to have an encrypted backup stored somewhere, with a key that only a select few would know.

I imagine Vault would have some built-in support for this

Of course, all stored secrets would probably be encrypted symmetrically (some AES) and encoded in Base64. The keys would be distributed to organizational admins, and provided as an environmental variable.

This is assuming we DIY the secret management system ourselves, instead of using a service like Vault right?

@chuck-sys
Copy link
Collaborator

This is assuming we DIY the secret management system ourselves, instead of using a service like Vault right?

Yes.

Btw: if we are going with a DIY secret management, the act of adding a secret via /rocket secret add Github "mygithubpassword111" exposes the password in the logs. Which are difficult (I would not want to say impossible) to breach. A possible solution would be to pre-encrypt the password and send it in via base64.

@bobheadxi
Copy link
Member Author

the act of adding a secret via /rocket secret add Github "mygithubpassword111" exposes the password in the logs

I would call this pretty bad 🤔 Maybe we can exclude/do special preprocessing for the chain of commands in /rocket secret? This would tie in nicely with #519 (scoped loggers)

@chuck-sys
Copy link
Collaborator

Maybe we can exclude/do special preprocessing

I wonder if we can replace the actual password with *******....

@bobheadxi
Copy link
Member Author

^ That would be the standard approach if we have a hook for special preprocessing of the logged command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Seeking input and discussion needs research Do research and exploratory work theme:feature Request a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants