Data Types & Functionality
EnvKey data types and properties that are relevant to cryptography or security, along with brief explanations of their functions.
pubkey: Public Key,
encryptedPrivkey: Encrypted Private Key
An EnvKey user. A PGP keypair is generated on sign up (if creating a new org) or on acceptance of first invitation. A user can belong to multiple organizations.
The user's private key is encrypted with the master passphrase, then stored on the EnvKey server, which means the burden of supplying sufficient entropy to prevent brute force attacks is on the passphrase. The master passphrase is never sent to the server. Dropbox’s zxcvbn library is used to identify and block weak passphrases. See Tradeoffs for more discussion of this design.
"basic" | "org_admin" | "org_owner"
A basic user has their access level set on a per-app basis. An org admin acts as an app admin for every organization app, and can also create or delete apps and remove users from an organization. An org owner can manage billing and delete an org.
pubkeyFingerprint: Public Key Fingerprint,
pubkeyFingerprint: Public Key Fingerprint
Acts as an invitation UUID, and also forms the first component of the Invitation Encryption Token, which is sent out of band from the inviting user to the invited user. Acts as a secure checksum that allows the invited user to verify invitation data from the server and the identity of the inviting user.
Invitation Encryption Token
Format is [Invitation Idhash]_[Invitation Passphrase]
This token is sent directly to the invited user by the inviter's chosen channel. The EnvKey server also sends an Invite Token to the invited user to verify their email address. Both tokens are required to accept an invitation, decrypt the invited user's config data, and then re-encrypt with the user's newly generated keypair after a master passphrase is set. This approach allows for secure, zero-knowledge invitations with only a minimum of inconvenience.
Invitation Idhash is generated client-side then stored on the server and used as both a lookup id and a client-side checksum that verifies the invitation server details that the server provides to the invitee.
Invitation Passphrase is a 16 character alphanumeric string. It is generated client-side and is never sent to the server.
idhash: Invitation Idhash,
pubkey: Signed Public Key,
encryptedPrivateKey: Encrypted Private Key,
When inviting a new user, an invitation keypair is generated, and all config data the invited user is permitted to access is encrypted with that invitation keypair's public key (and signed by the inviting user). The invitation's public key is also signed by the inviting user. The inviting user's trusted public keys (see below) are also signed by the invitation's private key and stored alongside the invitation on the server. The invitation's private key is encrypted with the Invitation Passphrase portion of the Invite Encryption Token and also stored on the server.
signedPubkey: Signed Public Key,
Upon accepting an invitation, the user sets a master passphrase and generates a new PGP keypair. The new public key is signed by the Invitation's private key and stored on the OrgUser, creating a signature chain back to the inviting user (and eventually back to the organization owner). The invitation's trusted public key fingerprints, initially supplied and signed by the invitation's private key, are also now signed by the user's new private key and stored on the OrgUser, allowing the newly invited user to verify other public keys back to a trusted root public key.
App User Role
"development" | "production" | "admin"
"development" | "staging" | "production" | "productionMetaOnly"
inherits: null | Environment,
Represents value for a particular config KEY and a particular Environment. Includes metadata describing inheritance and other info used by the EnvKey App ui.
Represents values for every config KEY and every Environment for an application along with associated metadata used by EnvKey App.
On update, encrypted copies are made on a per-Environment basis for each user that has access to the application and the Environment. Each copy is encrypted with the receiving user's public key and signed with the updating user's private key. On decryption, the signature is verified with the updating user's public key.
Before encrypting for any public key or verifying any signature, public keys are verified as trusted. If a public key's signature is not found directly in the user's list of trusted public key fingerprints for the organization, the EnvKey App attempts to verify the chain of signatures back to a fingerprint that is trusted.
Represents a single environment's configuration as raw key value pairs in JSON. No metadata. These are encrypted for Servers and Local Development Keys, and are associated with an ENVKEY.
pubkey: Public Key,
invitePubkey: Public Key,
signedById: User UUID
Used in web of trust enforcement by the EnvKey Client Libraries. Verifies chain of public keys back to a trusted root without involvement of server. Stored in a TrustChain that is signed by/verified with a RawEnv's private key to prevent tampering.
pubkeyFingerpint: Public Key Fingerprint,
invitePubkeyFingerprint: Public Key Fingerprint,
invitedById: User UUID
Used in web of trust enforcement by the EnvKey App. Verifies user's public key, invite public key, and inviting user as supplied by the server. Stored in a TrustChainSort that is signed by/verified with user's private key to prevent tampering.
Signature chain leading from organization owner to a generated RawEnv and associated ENVKEY. Contain full public keys so that the signature chain can be verified back to an initially trusted public key if needed. These are signed by the ENVKEY's associated private key and stored alongside the encrypted RawEnv so that EnvKey Client Libraries can verify the web of trust.
Signature chain leading from organization owner to an Invitation or a user. Contain public key fingerprints. These are signed by the User's associated private key and stored on the OrgUser so that EnvKey App can verify the server's representation of the web of trust without trusting the server.
Format is [Lookup Id]-[Encryption Passphrase]
Lookup Id = 20 character random alphanumeric string. Server generated.
Encryption Passphrase = 16 character random alphanumeric string. Client generated.
Corresponds to an encrypted RawEnv. Server stores Lookup Id, RawEnv public key signed by key creator, and RawEnv private key encrypted with Encryption Passphrase.