Documentation
¶
Overview ¶
Package signing signs and checks versions of projects' settings (ADR-0018, risk R21, layer 2). Whoever controls the workspace server could otherwise make every agent of the team run what they like; with signatures an agent applies a version that runs new code only when a person the workspace's admin trusts made it.
- Every device has an Ed25519 signing key, kept like its other keys.
- The workspace's root of trust is the signing key of its admin's device. An agent pins it the first time it sees the workspace, and does not take another one from the server afterwards.
- The admin certifies, with the root, the devices of the people who change settings: a certificate binds a key to a person and a device.
- The author's device signs each version: the workspace, the project, the version number and the hash of the settings exactly as stored.
Index ¶
- Variables
- func DeployMessage(workspace, serverID, project string, version int32, config []byte) []byte
- func EnvironmentMessage(workspace, serverID, project, kind, domain string) []byte
- func Fingerprint(pub ed25519.PublicKey) string
- func SettingsMessage(workspace, project string, version int32, config []byte) []byte
- func SignerMessage(workspace, userID, email, deviceID string, pub ed25519.PublicKey) []byte
- type Key
- type Set
- type Signer
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsigned = errors.New("the version is not signed") ErrNoRoot = errors.New("the workspace has no root of trust yet") ErrUntrusted = errors.New("signed by a device the workspace's admin has not certified") ErrSignature = errors.New("the signature does not match the settings") )
Errors of Verify.
Functions ¶
func DeployMessage ¶
DeployMessage is what someone with production.deploy signs to make a server's production run a version (R14b): this server, this project, this version with exactly these settings.
func EnvironmentMessage ¶
EnvironmentMessage is what the creator of a server's environment signs (R14): the server runs the project as this kind at this domain.
func Fingerprint ¶
Fingerprint is a short form of a public key for people to compare: the admin reads it out, the developer sees it in 'devopus trust show'.
func SettingsMessage ¶
SettingsMessage is what the author signs for a version: it cannot be shown as another project's, another workspace's or another number's version.
Types ¶
type Set ¶
type Set struct {
Workspace string
Root ed25519.PublicKey
// RootDevice and RootEmail are whose device holds the root.
RootDevice, RootEmail string
Signers []Signer
}
Set is what an agent checks versions with: the root it pinned and the signers the server says the root certified — each certificate is checked, so the server can add no one.