sshtrustedca

package
v0.0.0-...-05f333e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sshtrustedca implement the sshd trusted ca cert pipe events watcher.

Index

Constants

View Source
const (
	// WatcherID is the sshtrustedca watcher's ID.
	WatcherID = "ssh-trusted-ca-pipe-watcher"
	// ReadEvent is the sshtrustedca's read event type ID.
	ReadEvent = "ssh-trusted-ca-pipe-watcher,read"
	// DefaultPipePath defines the default ssh trusted ca pipe path.
	DefaultPipePath = "/etc/ssh/oslogin_trustedca.pub"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PipeData

type PipeData struct {
	// File is the writeonly pipe's file descriptor. The user/handler must
	// make sure to close it after processing the event.
	File *os.File

	// Finished is a callback used by the event handler to inform the write to
	// the pipe is finished.
	Finished func()
}

PipeData wraps the pipe event data.

type Watcher

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

Watcher is the sshtrustedca event watcher implementation.

func New

func New(pipePath string) *Watcher

New allocates and initializes a new Watcher.

func (*Watcher) Events

func (mp *Watcher) Events() []string

Events returns an slice with all implemented events.

func (*Watcher) ID

func (mp *Watcher) ID() string

ID returns the sshtrustedca event watcher id.

func (*Watcher) Run

func (mp *Watcher) Run(ctx context.Context, evType string) (bool, interface{}, error)

Run listens to ssh_trusted_ca's pipe open calls and report back the event.

Jump to

Keyboard shortcuts

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