policy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	LocalHost  string         `json:"localHost"`
	RemoteHost string         `json:"remoteHost"`
	RemoteUser string         `json:"remoteUser"`
	Port       uint           `json:"port"`
	ProxyJump  string         `json:"proxyJump"`
	Hash       ConnectionHash `json:"hash"` // %C - hash of connection tuple
}

Connection represents the complete tuple of SSH connection parameters. This matches the parameters available in OpenSSH Match exec via %C hash: local hostname (%l), remote hostname (%h), port (%p), remote user (%r), and ProxyJump (%j). The Hash field contains the %C hash value computed by OpenSSH from these parameters.

type ConnectionHash

type ConnectionHash string

ConnectionHash is the OpenSSH %C hash value that uniquely identifies a connection. This is computed by OpenSSH from the connection parameters (local host, remote host, port, user, ProxyJump).

type Policy

type Policy struct {
	HostPattern string `json:"hostPattern"` // Glob pattern for matching hostnames (e.g., "*.example.com")
}

Policy represents the policy rules for certificate usage

func (*Policy) Matches

func (p *Policy) Matches(conn Connection) bool

Matches checks if this policy's pattern matches the given connection's remote hostname

Jump to

Keyboard shortcuts

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