Documentation
¶
Overview ¶
Package ssh provides SSH-style token generation and verification for go-service.
Tokens are generated as `<name>-<base64(signature)>`, where the signature is computed over the key name and verified using the configured public keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Key is the signing key configuration used to mint SSH tokens.
Key *Key `yaml:"key,omitempty" json:"key,omitempty" toml:"key,omitempty"`
// Keys is the set of verification keys that may be used to validate SSH tokens.
Keys Keys `yaml:"keys,omitempty" json:"keys,omitempty" toml:"keys,omitempty"`
}
Config configures SSH token key material.
It supports a single signing key (Key) and a set of verification keys (Keys).
type Key ¶
type Key struct {
// Config contains the SSH key material configuration (public/private key sources).
*ssh.Config `yaml:",inline" json:",inline" toml:",inline"`
// Name is the logical key name used to select a key (for example via Keys.Get).
Name string `yaml:"name,omitempty" json:"name,omitempty" toml:"name,omitempty"`
}
Key describes an SSH key configuration along with its logical name.
The embedded `ssh`.Config provides the key material source/loading configuration.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token generates and verifies SSH-style tokens.
Click to show internal directories.
Click to hide internal directories.