Gratitude and Dedication
Introduction
- Part I: The Architecture of ksh on OpenBSD
Chapter 1: KornShell Internals and Environment
Chapter 2: Advanced Scripting for Senior Architects
Chapter 1
- 1.1 The Genesis and Evolution of OpenBSD ksh
- 1.2 The Execution Model: Fork, Exec, and Memory
- 1.3 Security Primitives: The Shell and the Kernel
- 1.4 Advanced Variable Expansion and Pattern Matching
- 1.5 Signal Handling and Resilient Scripting
- 1.6 Memory Management and the ksh/Kernel Interface
- 1.7 ASLR (Address Space Layout Randomization) and PIE
- 1.8 Observing Memory Stress in ksh
- 1.9 The Cost of Security
Chapter 2
- 2.1 High-Performance Conditionals
- 2.2 Co-processes: The $|&| Construction
- Part II: Identity and Access Management (IAM)
Chapter 3: User Onboarding and Offboarding at Scale
Chapter 3
- 3.1 The Architect’s Foundation: login.conf
- 3.2 Automated Onboarding via ksh
- 3.3 The Skeleton Directory (/etc/skel) Architecture
- 3.4 Secure Offboarding: The “Nuclear Option”
- 3.5 Auditing the IAM Lifecycle
- 3.6 The Architecture of Trust: doas vs. sudo
- 3.7 Implementing doas in the Onboarding Workflow
- 3.8 Advanced Environment Management: setenv and keepenv
- 3.9 Integrating doas into the Offboarding Workflow
- 3.10 Fleet Orchestration and doas
- Part III: Fleet Management and the SSH Ecosystem
Chapter 4: Beyond Authorized_Keys: SSH Certificates
Chapter 5: Orchestrating the Fleet
Chapter 4: Beyond Authorized_Keys — SSH Certificates
- 4.1 The CA Hierarchy: Host vs. User
- 4.2 Architecting the Signing Node
- 4.3 Server-Side Configuration
- 4.4: The Kill-Switch — Key Revocation Lists (KRL)
Chapter 5: Orchestrating the Fleet with ksh
- 5.1 The ProxyJump Strategy
- 5.2 Mass-Parallel Execution via ksh
- 5.3 Hardware Tokens: FIDO2 and OpenBSD
- Part IV: Sustaining the System
Chapter 6: Patching and Lifecycle Management
Chapter 6: Patching and Lifecycle Management
- 6.1 The syspatch(8) Internal Logic
- 6.2 Automating the Fleet Patching
- 6.3 The sysupgrade(8) Transition
Chapter 7: Forensic Auditing — doas, sshd, and syslogd
- 7.1 The syslogd(8) Backbone
- 7.2 Auditing doas: Tracking Privilege Escalation
- 7.3 Auditing sshd: Detecting Ingress Anomalies
- 7.4 Advanced: Real-time Alerting with sec(8) or ksh
- 7.5 Forensic Integrity: newsyslog(8)
Chapter 6: Patching and Lifecycle Management
- Part V: Cryptography Integrity
Chapter 8: Cryptographic Integrity — Signing Scripts with signify(1)
- 8.1 The Signify Philosophy
- 8.2 Implementing the Signed Script Pipeline
- 8.3 Fleet-Wide Verification
- 8.4 Bootstrapping with signify
- Part VI: Foundation of Redundancy
Chapter 9: The Foundation of Redundancy — CARP
- 9.1 Architectural Mechanics of CARP
- 9.2 Provisioning CARP via ksh
- 9.3 Preemption and Failover Logic
- Part VII: Orchestration at Layer 7
Chapter 10: Layer 7 Orchestration — relayd(8)
- 10.1 The Relayd Architecture
- 10.2 Production Configuration for a Fleet
- 10.3 Synchronizing State with ksh
- Part VIII: HA Storage
Chapter 11: High Availability Storage — Synchronization via rsync or pax
- Part IX: Unique and Powerful Firewall with State
Chapter 12: PF Architecture and Stateful Inspection
- 12.1 The Ruleset Hierarchy
Chapter 13: High-Efficiency Tables and Anchors
- 13.1 Tables: The Architect’s Secret Weapon
- 13.2 Anchors: Dynamic Rulesets
Chapter 14: Orchestrating PF Across the Fleet
- 14.1 The ksh “Safety-First” Deployment Script
Chapter 15: Advanced Scrubbing and Fingerprinting
Chapter 16: Integration — Auditing doas/PF with syslogd
- 16.1 Logging PF Drops
- 16.2 The Audit Pipeline
- Part X: Zero-Touch Provisioning
Chapter 17: Zero-Touch Provisioning — autoinstall(8)
- 17.1 The Autoinstall Workflow
- 17.2 Crafting the install.conf
- 17.3 The site78.tgz Post-Install Hook
- Part XI: Security at Rest
Chapter 18: Security at Rest — Bioctl and Softraid Crypto
- 18.1 The Crypto-Disk Architecture
- 18.2 Automating Encryption via Autoinstall
- Part XII: Do what is right
Chapter 19: Hardening ksh via Pledge(2) and Unveil(2)
- 19.1 What is Unveil in a Shell Context?
- 19.2 The “Secure Exec” Wrapper
- Part XIII: Disks again
Chapter 20: Advanced Disk Geometry and Partitioning
- 20.1 The Disklabel Deep-Dive
- 20.2 Orchestrating Custom Labels
- Part IV: Performance Tuning
Chapter 21: Performance Tuning and Sysctl
- 21.1 Network Stack Tuning
- 21.2 Monitoring with systat