Documentation
¶
Overview ¶
Package quickstart provisions a fresh data directory for the opinionated Docker quick-start: a generated admin, sample users, a demo service, an MFA key, a self-signed cert, a MOTD, and a human-readable credentials file.
Index ¶
Constants ¶
const ( PlainAddr = ":2323" TLSAddr = ":2324" AdminUser = "ADMIN" DemoGroup = "DEMO" DemoServiceName = "DEMO" DemoBackendHost = "dummy3270" DemoBackendPort = 3300 CertValidDays = 825 )
const PasswordCharset = "ABCDEFGHJKMNPQRSTVWXYZ23456789"
PasswordCharset is the 3270-typeable unambiguous alphanumeric set used for one-time passwords: uppercase letters excluding I, L, O; digits excluding 0 and 1. Eliminates common transcription errors on physical 3270 keyboards.
Variables ¶
var CertHosts = []string{"localhost", "127.0.0.1", "::1"}
CertHosts are the SAN entries for the generated self-signed cert.
var ErrAlreadyProvisioned = errors.New("quickstart: data dir already provisioned")
ErrAlreadyProvisioned signals that the data dir already has a config file and must not be touched (the normal post-first-boot path).
var SampleUsers = []string{"OPERATOR", "GUEST"}
SampleUsers are the non-admin demo accounts seeded on first run.
Functions ¶
func DefaultBranding ¶
func DefaultBranding() string
DefaultBranding is the example login art seeded on first run. It is authored pre-centered (the login screen renders columns 0-79 verbatim, no auto-indent) and sized to fit inside the MOD 2 branding region (18 rows). Rendered through the login screen body (see internal/screens/login.go).
func DefaultMOTD ¶
func DefaultMOTD() string
DefaultMOTD is the welcome text shown on first 3270 login. Rendered through the chrome-less MOTD/NEWS path (see internal/screens/news.go).
func GenPassword ¶
GenPassword returns a random password in XXXX-XXXX-XXXX form using passwordCharset (12 characters grouped for readability).
func GenerateSelfSignedCert ¶
GenerateSelfSignedCert returns PEM-encoded cert and private key for a self-signed leaf valid for validDays, with hosts split into DNS and IP SANs. Pure Go (no openssl). Intended for the quick-start TLS listener only.
Types ¶
type Layout ¶
type Layout struct {
Dir string
DB string
Config string
MFAKey string
CertDir string
Cert string
Key string
MOTD string
Branding string
SetupFile string
}
Layout maps a data directory to every artifact quickstart manages.
type Result ¶
type Result struct {
DataDir string
Admin Cred
Samples []Cred
PlainAddr string
TLSAddr string
DemoService string
}
Result is everything a provisioning run generated, for the SETUP file and tests.