security

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package security implements the SSH security configuration feature

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

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

Feature implements the SSH security configuration feature

func New

func New(osInfo *osdetect.Info) *Feature

New creates a new SSH security configuration feature

func (*Feature) Description

func (f *Feature) Description() string

Description returns the feature description

func (*Feature) DetectCurrentState

func (f *Feature) DetectCurrentState(ctx *features.ExecutionContext) (map[string]any, error)

DetectCurrentState detects and returns the current state of the security feature

func (*Feature) DisplayCurrentState

func (f *Feature) DisplayCurrentState(ctx *features.ExecutionContext, state map[string]any)

DisplayCurrentState displays the current state of the security feature

func (*Feature) Execute

func (f *Feature) Execute(ctx *features.ExecutionContext) error

Execute executes the feature functionality

func (*Feature) Flags

func (f *Feature) Flags() []features.Flag

Flags returns the command-line flags for the feature

func (*Feature) Name

func (f *Feature) Name() string

Name returns the feature name

func (*Feature) Priority

func (f *Feature) Priority() int

Priority returns the feature execution priority

func (*Feature) ShouldActivate

func (f *Feature) ShouldActivate(options map[string]any) bool

ShouldActivate determines if the feature should be activated

func (*Feature) ShouldPromptUser

func (f *Feature) ShouldPromptUser(ctx *features.ExecutionContext, state map[string]any) bool

ShouldPromptUser determines if the user should be prompted for input

func (*Feature) ValidateOptions

func (f *Feature) ValidateOptions(options map[string]any) error

ValidateOptions validates the feature options

type SSHSecurityOptions added in v0.2.2

type SSHSecurityOptions struct {
	RootLoginAction    string // "enable", "disable", or "keep"
	PasswordAuthAction string // "enable", "disable", or "keep"
}

SSHSecurityOptions represents the parsed SSH security configuration

type SSHSettingResult added in v0.2.2

type SSHSettingResult struct {
	EffectiveValue string // The effective value (what SSH actually uses)
	IsExplicit     bool   // Whether the setting is explicitly configured
	Source         string // Source of the value: "explicit", "default", or "commented"
}

SSHSettingResult represents the result of parsing an SSH setting

Jump to

Keyboard shortcuts

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