Documentation
¶
Overview ¶
Package hostbundle defines the public metadata of issued host identity material. Private key contents never belong in this wire contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ServerFiles = []string{"server-key.pem", "server.pem", "users.yaml"}
ServerFiles are the extra files of a Server export, in sorted order.
Functions ¶
This section is empty.
Types ¶
type CAInfo ¶
type CAInfo struct {
CertificateInfo
Created bool `json:"created"`
}
type CertificateInfo ¶
type ClientMetadata ¶
type ClientMetadata struct {
Version int `json:"version"`
Status string `json:"status"`
OutputDir string `json:"output_dir"`
Roles []string `json:"roles"`
CA string `json:"ca_sha256"`
Server bool `json:"server,omitempty"`
Files []File `json:"files"`
}
ClientMetadata inventories an immutable EventBus export. By default it holds client roles and the public CA only. Server marks the export for the host that runs the broker: it additionally carries server.pem, server-key.pem and users.yaml, and only the eventbus unit may consume such an export. CA is the SHA256 of the original public ca.pem bytes, not a signing key.
type Credential ¶
type Host ¶
type Host struct {
HostID string `json:"host_id"`
Label string `json:"label"`
Address string `json:"address"`
PrivateAddress string `json:"private_address"`
Region string `json:"region"`
Description string `json:"description"`
Components []string `json:"components"`
// Reachability 为空表示可直达,outbound 表示只能出站。
Reachability string `json:"reachability,omitempty"`
SSH *SSH `json:"ssh,omitempty"`
}
type Metadata ¶
type Metadata struct {
Version int `json:"version"`
HostID string `json:"host_id"`
ControlHostID string `json:"control_host_id"`
BundleDir string `json:"bundle_dir"`
ConfigFile string `json:"config_file"`
VerificationFile string `json:"verification_file,omitempty"`
ExpectedHash string `json:"expected_hash"`
CA CAInfo `json:"ca"`
Certificate CertificateInfo `json:"certificate"`
Credentials []Credential `json:"credentials"`
Files []File `json:"files"`
}
type OperatorConfig ¶
type OperatorConfig struct {
Caller string `yaml:"caller"`
KeyID string `yaml:"key_id"`
KeyFile string `yaml:"key_file"`
}
OperatorConfig is the public YAML exported beside the bootstrap operator key. Keeping this wire type here avoids importing an RPC client into host tools.
type SSH ¶
type SSH struct {
Port int `json:"port"`
User string `json:"user"`
AuthType string `json:"auth_type"`
Secret string `json:"secret"`
Passphrase string `json:"passphrase,omitempty"`
}
SSH 是控制台终端登录这台主机用的信息;Port 为 0(或整体缺省)表示控制台不能 SSH。 AuthType 为 password 或 private_key,Secret 是对应的密码或私钥内容,Passphrase 是私钥口令。