Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDBInitErr is returned when a bucket that we expect to have been // set up during DB initialisation is not found. ErrDBInitErr = errors.New("db did not initialise properly") )
var ( // SuperMacaroonRootKeyPrefix is the prefix we set on a super macaroon's // root key to clearly mark it as such. SuperMacaroonRootKeyPrefix = [4]byte{0xFF, 0xEE, 0xDD, 0xCC} )
Functions ¶
func MigrateSessionIDToKeyIndex ¶
MigrateSessionIDToKeyIndex back-fills the session ID to key index so that it has an entry for all sessions that the session store is currently aware of.
func NewSuperMacaroonRootKeyID ¶
NewSuperMacaroonRootKeyID returns a new macaroon root key ID that has the prefix to mark it as a super macaroon root key.
Types ¶
type FeaturesConfig ¶
FeaturesConfig is a map from feature name to a raw byte array which stores any config feature config options.
type ID ¶
type ID [4]byte
ID represents the id of a session.
func IDFromMacRootKeyID ¶
IDFromMacRootKeyID converts a macaroon root key ID to a session ID.
type MacaroonRecipe ¶
MacaroonRecipe defines the permissions and caveats that should be used to bake a macaroon.
type Session ¶
type Session struct { ID ID Label string State State Type Type Expiry time.Time CreatedAt time.Time RevokedAt time.Time ServerAddr string DevServer bool MacaroonRootKey uint64 MacaroonRecipe *MacaroonRecipe PairingSecret [mailbox.NumPassphraseEntropyBytes]byte LocalPrivateKey *btcec.PrivateKey LocalPublicKey *btcec.PublicKey RemotePublicKey *btcec.PublicKey FeatureConfig *FeaturesConfig WithPrivacyMapper bool }
Session is a struct representing a long-term Terminal Connect session.
func DeserializeSession ¶
DeserializeSession deserializes a session from the given reader, expecting the data to be encoded in the tlv format.