proxyagent

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 24 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPrincipal added in v0.3.0

func DefaultPrincipal() string

DefaultPrincipal returns the username of the user that invoked the calling process

func Doctor added in v0.4.0

func Doctor()

func NewSigningKeyring

func NewSigningKeyring(vaultSigningUrl string, username string, exposeUnsigned bool) (agent.ExtendedAgent, error)

func SetupAgent

func SetupAgent(config AgentConfig) (agent.Agent, error)

Types

type AgentConfig

type AgentConfig struct {
	DisableProxy    bool
	ExposeUnsigned  bool
	GenerateRSAKey  bool
	ValidPrincipals []string
	VaultSigningUrl string
}

type KeyPair

type KeyPair struct {
	Comment    string
	PrivateKey string
	PublicKey  string
}

func GenerateRSAKeyPair

func GenerateRSAKeyPair() (*KeyPair, error)

type ProxyKeyring

type ProxyKeyring struct {
	// contains filtered or unexported fields
}

func NewProxyKeyring

func NewProxyKeyring(keyring agent.ExtendedAgent, upstream agent.ExtendedAgent) *ProxyKeyring

func (*ProxyKeyring) Add

func (pk *ProxyKeyring) Add(key agent.AddedKey) error

func (*ProxyKeyring) Close

func (pk *ProxyKeyring) Close()

TODO: should we consider closing upstream here as well?

func (*ProxyKeyring) Extension

func (pk *ProxyKeyring) Extension(extensionType string, contents []byte) ([]byte, error)

func (*ProxyKeyring) List

func (pk *ProxyKeyring) List() ([]*agent.Key, error)

func (*ProxyKeyring) Lock

func (pk *ProxyKeyring) Lock(passphrase []byte) error

func (*ProxyKeyring) Remove

func (pk *ProxyKeyring) Remove(key ssh.PublicKey) error

func (*ProxyKeyring) RemoveAll

func (pk *ProxyKeyring) RemoveAll() error

func (*ProxyKeyring) Sign

func (pk *ProxyKeyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)

func (*ProxyKeyring) SignWithFlags

func (pk *ProxyKeyring) SignWithFlags(key ssh.PublicKey, data []byte, flags agent.SignatureFlags) (*ssh.Signature, error)

func (*ProxyKeyring) Signers

func (pk *ProxyKeyring) Signers() ([]ssh.Signer, error)

func (*ProxyKeyring) Unlock

func (pk *ProxyKeyring) Unlock(passphrase []byte) error

type Server

type Server struct {
	Agent  agent.Agent
	Socket string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(agent agent.Agent) *Server

func (*Server) GetProxyEnvVars added in v0.4.0

func (s *Server) GetProxyEnvVars() map[string]string

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type Spawn

type Spawn struct {
	Agent   agent.Agent
	Command []string
}

Spawn contains all options and logic for spawning commands

func (*Spawn) Run

func (s *Spawn) Run() error

Jump to

Keyboard shortcuts

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