adssl

package module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: BSD-2-Clause Imports: 19 Imported by: 1

README

adssl

Usage

NAME:
   adssl - Generate SSL certificates against Active Directory

USAGE:
   adssl [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --endpoint value, -e value    endpoint to use [$ENDPOINT]
   --username value, -u value    username to authenticate with (default: "tom") [$USER]
   --password value, -p value    username to authenticate with [$PASSWORD]
   --country value, -C value     cert country [$COUNTRY]
   --province value, -P value    cert province [$PROVINCE]
   --locality value, -L value    cert locality [$LOCALITY]
   --commonname value, -c value  common name [$COMMON]
   --hosts value, -l value       comma delimited list of hosts to add to cert [$HOSTS]
   --ips value, -i value         comma delimited list of IPAddresses to add to cert [$IPADDRS]
   --prefix value, -f value      prefix output files [$PREFIX]
   --csronly, -O                 write csr/key only (default: false)
   --k8s-secret, -k              output as a kubernetes secret (default: false)
   --help, -h                    show help (default: false)

Example
adssl -e https://ad -u tom -p sup3rs3cur3 --country US --province "New Jersey" --locality Weehawken --commonname host1 --hosts host1,host2 --ips 1.1.1.1,1.1.1.2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintKubeSecret added in v0.0.8

func PrintKubeSecret(w io.Writer, c Certificate) error

PrintKubeSecret ouputs Certificate in kubernetes YAML

func WriteFile added in v0.0.8

func WriteFile(filename, content string) error

WriteFile writes content to filename

Types

type Certificate

type Certificate struct {
	PrivateKey         *rsa.PrivateKey
	RequestTemplate    x509.CertificateRequest
	PrivateKeyString   string
	CaCert             string
	CertificateRequest string
	Result             string
	ResultURL          string
}

Certificate contains a x509 certificate

func GenerateCertFromCsr added in v0.0.11

func GenerateCertFromCsr(s Server, c Certificate) (Certificate, error)

GenerateCertFromCsr takes a CSR and returns a signed cert

func New

func New(s Server, r Request) (Certificate, error)

New returns a new Request

type Request

type Request struct {
	CommonName                  string
	Country, Province, Locality string
	DNSNames                    string
	IPAddresses                 string
	Prefix                      string
	CsrOnly                     bool
}

Request contains all we need to make the Certificate Request

type Server

type Server struct {
	Endpoint, Username, Password string
}

Server represents the AD CA

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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