plugin

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainPlugins

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

func (*ChainPlugins) Append

func (cp *ChainPlugins) Append(p *GrpcPlugin) error

func (*ChainPlugins) CreateChallengeContext

func (cp *ChainPlugins) CreateChallengeContext(conn ssh.ConnMetadata) (ssh.ChallengeContext, error)

func (*ChainPlugins) InstallPiperConfig

func (cp *ChainPlugins) InstallPiperConfig(config *GrpcPluginConfig) error

func (*ChainPlugins) NextAuthMethods

func (cp *ChainPlugins) NextAuthMethods(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext) ([]string, error)

type CmdPlugin

type CmdPlugin struct {
	GrpcPlugin
	Quit <-chan error
}

func DialCmd

func DialCmd(cmd *exec.Cmd) (*CmdPlugin, error)

type GrpcPlugin

type GrpcPlugin struct {
	Name         string
	OnNextPlugin func(conn ssh.ChallengeContext, upstream *libplugin.UpstreamNextPluginAuth) error
	// contains filtered or unexported fields
}

func DialGrpc

func DialGrpc(conn *grpc.ClientConn) (*GrpcPlugin, error)

func (*GrpcPlugin) BannerCallback

func (g *GrpcPlugin) BannerCallback(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext) string

func (*GrpcPlugin) CreateChallengeContext

func (g *GrpcPlugin) CreateChallengeContext(conn ssh.ConnMetadata) (ssh.ChallengeContext, error)

func (*GrpcPlugin) CreatePiperConfig

func (g *GrpcPlugin) CreatePiperConfig() (*GrpcPluginConfig, error)

func (*GrpcPlugin) InstallPiperConfig

func (g *GrpcPlugin) InstallPiperConfig(config *GrpcPluginConfig) error

func (*GrpcPlugin) KeyboardInteractiveCallback

func (g *GrpcPlugin) KeyboardInteractiveCallback(conn ssh.ConnMetadata, client ssh.KeyboardInteractiveChallenge, challengeCtx ssh.ChallengeContext) (*ssh.Upstream, error)

func (*GrpcPlugin) NewConnection

func (g *GrpcPlugin) NewConnection(meta *connMeta) error

func (*GrpcPlugin) NextAuthMethodsLocal

func (g *GrpcPlugin) NextAuthMethodsLocal(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext) ([]string, error)

func (*GrpcPlugin) NextAuthMethodsRemote

func (g *GrpcPlugin) NextAuthMethodsRemote(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext) ([]string, error)

func (*GrpcPlugin) NoClientAuthCallback added in v1.0.62

func (g *GrpcPlugin) NoClientAuthCallback(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext) (*ssh.Upstream, error)

func (*GrpcPlugin) PasswordCallback

func (g *GrpcPlugin) PasswordCallback(conn ssh.ConnMetadata, password []byte, challengeCtx ssh.ChallengeContext) (*ssh.Upstream, error)

func (*GrpcPlugin) PipeCreateErrorCallback added in v1.2.5

func (g *GrpcPlugin) PipeCreateErrorCallback(conn net.Conn, err error)

func (*GrpcPlugin) PipeErrorCallback added in v1.0.96

func (g *GrpcPlugin) PipeErrorCallback(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext, pipeerr error)

func (*GrpcPlugin) PipeStartCallback added in v1.0.96

func (g *GrpcPlugin) PipeStartCallback(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext)

func (*GrpcPlugin) PublicKeyCallback

func (g *GrpcPlugin) PublicKeyCallback(conn ssh.ConnMetadata, key ssh.PublicKey, challengeCtx ssh.ChallengeContext) (*ssh.Upstream, error)

func (*GrpcPlugin) RecvLogs

func (g *GrpcPlugin) RecvLogs(writer io.Writer) error

func (*GrpcPlugin) UpstreamAuthFailureCallbackLocal

func (g *GrpcPlugin) UpstreamAuthFailureCallbackLocal(onn ssh.ConnMetadata, method string, err error, challengeCtx ssh.ChallengeContext)

func (*GrpcPlugin) UpstreamAuthFailureCallbackRemote

func (g *GrpcPlugin) UpstreamAuthFailureCallbackRemote(conn ssh.ConnMetadata, method string, err error, challengeCtx ssh.ChallengeContext)

type GrpcPluginConfig added in v1.0.96

type GrpcPluginConfig struct {
	ssh.PiperConfig

	PipeCreateErrorCallback func(conn net.Conn, err error)
	PipeStartCallback       func(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext)
	PipeErrorCallback       func(conn ssh.ConnMetadata, challengeCtx ssh.ChallengeContext, err error)
}

Jump to

Keyboard shortcuts

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