Help us shape the future of Go! Take the 2026 Go Developer Survey

ca

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ca owns postern's SSH certificate authority: the CA key's lifecycle and (from S2.2 on) certificate signing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CA

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

CA holds the signing key. Bir postern kurulumunda tek bir CA vardır.

func Init

func Init(path string) (*CA, error)

Init generates a new CA key at path and returns the ready CA.

func Load

func Load(path string) (*CA, error)

Load reads an existing CA key from path.

func (*CA) AuthorizedKey

func (c *CA) AuthorizedKey() string

AuthorizedKey returns the public key as a single authorized-keys line, ready to be pasted into /etc/ssh/postern_ca.pub.

func (*CA) PublicKey

func (c *CA) PublicKey() ssh.PublicKey

PublicKey returns the CA's public half — the content targets put in TrustedUserCAKeys.

func (*CA) Sign

func (c *CA) Sign(req CertRequest) (*ssh.Certificate, error)

type CertRequest

type CertRequest struct {
	PublicKey ssh.PublicKey

	KeyID string

	Principals []string

	ValidFor time.Duration

	Extensions map[string]string

	/*
	 * WithoutPTY, sertifikanın varsayılan permit-pty iznini kaldırır.
	 *
	 * ⚠️ SIFIR DEĞER BUGÜNKÜ DAVRANIŞ. İnsanlar kabuk açıyor ve PTY'siz
	 * bir oturum çalışmıyor; alanı tersine ("Interactive") kurmak, onu
	 * doldurmayı unutan her çağıranın kullanıcı oturumunu sessizce
	 * bozardı. Kaldırmak isteyen açıkça söylüyor.
	 *
	 * Kullanan tek yer yönetim bağlantısı (upstream.DialManagement):
	 * komut çalıştırıyor, kabuk açmıyor, ve filodaki her makinede root
	 * tutan bir kimliğe gerekmeyen hiçbir izin verilmemeli.
	 */
	WithoutPTY bool
}

Jump to

Keyboard shortcuts

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