key

package
v1.124.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package key manages the client-held store key and a store's at-rest key.

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:  "key",
	Usage: "Manage the store key that encrypts names and contents before upload, and the at-rest key",
	Subcommands: []cli.Command{
		{
			Name:      "new",
			Usage:     "Generate a store key file",
			ArgsUsage: "<name>",
			Action:    newAction,
			Flags:     []cli.Flag{outFlag("store.key")},
		},
		{
			Name:   "escrow",
			Usage:  "Encrypt a store key with a passphrase into an armored age file, which `age -d` can also open; print it, or keep it with the store using --upload",
			Action: escrowAction,
			Flags: []cli.Flag{
				cli.StringFlag{Name: "key", Usage: "key file to escrow", Value: "store.key"},
				passphraseFlag,
				passphraseFileFlag,
				cli.BoolFlag{Name: "upload", Usage: "keep the escrowed key with the --storage store instead of printing it"},
			},
		},
		{
			Name:   "id",
			Usage:  "Print a store key's id; the store and the key's escrowed copies refer to the key by this id",
			Action: idAction,
			Flags:  []cli.Flag{cli.StringFlag{Name: "key", Usage: "key file", Value: "store.key"}},
		},
		{
			Name:   "recover",
			Usage:  "Rebuild a key file from an escrowed key and its passphrase",
			Action: recoverAction,
			Flags: []cli.Flag{
				cli.StringFlag{Name: "escrow", Usage: "escrowed key file, as printed by key escrow; - reads standard input", Value: "-"},
				outFlag("store.key"),
				passphraseFlag,
				passphraseFileFlag,
			},
		},
		{
			Name:   "at-rest",
			Usage:  "Generate or rotate the key that seals the archives of a local, gcs:// or s3:// store",
			Action: atRestAction,
			Flags: []cli.Flag{
				outFlag("at-rest.key"),
				cli.BoolFlag{Name: "rotate", Usage: "add a new primary key to the file; the older keys still open the archives they sealed"},
			},
		},
	},
}

Command is the key command.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL