GPG keys for vault
@gl-infra, I need your public keys to embed into our Vault setup from the very beginning.
What
Non ascii armored output of gpg --export $YOURKEYID
, base 64 encoded. That's it.
Why
When initializing the encrypted storage backend, vault will generate a secret to encrypt data at rest and split it into number of chunks using Shamir Secret Sharing algorithm. Those chunks will be encrypted with each of your public GPG keys and then distributed to their respective owners. It will be done once per backend, which would be about the number of vaults, plus few testing one's, plus the number of times I screw up the tests and decide to start over
Scope of impact
For now, I recommend generating separate key with 1 year validity for vault explicitly, to keep things nice, tidy and separated from other keys before we have a defined procedure for all this, including key rotation. However, if you have objections to that, then I assume you know GPG well enough to have an established process of managing your keyrings, so do whatever you seem reasonable, as long as the email in the uid
field of the sent public key ends up in @gitlab.com
-- the reason for that being that I plan to automatically distribute the encrypted secrets as soon as they are generated.
How
It will work with any version of GPG, but I recommend 2.2 because of those ECC goodies :) Anyways, here's two instructions generating both ECC and RSA keys for vault (obviously have a badass passphrases!):
You can choose to create either an ECC key or an RSA key.
ECC
Awesome documentation if you wanna dig in.
- Run
gpg --expert --full-gen-key
- Input
9
(ECC and ECC) on kind of key question - Input
1
(Curve 25519) selecting curve type -
important Insert
1y
to have 1 year expiration so we don't have eternal keys by default -
important Insert something distinct for uid, I did this (make sure to use
@gitlab.com
email):
Real name: Ilya Frolov
Email address: ilya+vault@gitlab.com
Comment: vault unseal key
You selected this USER-ID:
"Ilya Frolov (vault unseal key) <ilya+vault@gitlab.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You'll get output similar to this:
pub ed25519 2017-09-23 [SC] [expires: 2018-09-23]
D21AF963D53F3121E3FA23D910FFA0D5EEC4824B
uid Ilya Frolov (vault unseal key) <ilya+vault@gitlab.com>
sub cv25519 2017-09-23 [E] [expires: 2018-09-23]
Do gpg --export D21AF963D53F3121E3FA23D910FFA0D5EEC4824B | base64 > $yourname.asc
and send MR with this file here. Congrats, mark yourself as done and whether you want to participate in test/CI unseals, which might be a bit of distraction while its taking shape.
RSA
Same thing basically, just larger keys and longer the generation:
- Run
gpg --full-generate-key
- Select
1
(RSA and RSA) option - important Input at least 2048 bits for key length. No need to go higher, provided you set expiration. We'll rotate those keys soon.
-
important Input
1y
as expiration data - Input meaningful UID, I did this:
Real name: Ilya Frolov
Email address: ilya+vault@gitlab.com
Comment: vault unseal key
You selected this USER-ID:
"Ilya Frolov (vault unseal key) <ilya+vault@gitlab.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
Same as above, do gpg --export $keyid | base64 > $yourname.asc
and send MR with this file here. Congrats, mark yourself as done and whether you want to participate in test/CI unseals, which might be a bit of distraction while its taking shape.
Progress tracking
Section for marking as done, adding people, removing people, etc.
-
@ilyaf:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@ahanselka:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@ahmadsherif:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@eReGeBe:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@jarv:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@jtevnan:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@northrup:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@omame:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@pcarranza:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff
-
@vlopez:
- Keys in Place
- Willing to be ping to unseal testing/CI stuff