docs: fix PRD consistency and align all docs with SSH client-only (FR-006)

PRD fixes:
- Remove duplicate 'Installation Behavior' section
- Fix malformed terminology table (missing pipe separator)

Documentation alignment with FR-006:
- README.md: Change SSH/firewall to client-only, no inbound access
- TEST-COVERAGE.md: Remove 'Firewall allows SSH inbound'
- VERIFICATION-REPORT.md: Fix password config docs to match preseed.cfg
- COMPLIANCE.md: Change 'SSH Hardening' to 'SSH Client-Only'

Test enhancements:
- Expand unit tests for encryption, firewall, security hardening
- Add comprehensive coverage for FR-001 through FR-009 requirements

All changes ensure documentation and tests align with PRD.md FR-006
which requires SSH client-only with no server or inbound access.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
This commit is contained in:
Charles N Wyble
2026-02-19 16:04:38 -05:00
parent f13bb8577a
commit d4c64b85fa
17 changed files with 335 additions and 85 deletions

View File

@@ -29,7 +29,7 @@ This document maps security compliance requirements to implementation components
| Control | STIG ID | CIS Control | Implementation | Hook/Script | Status |
|---------|----------|-------------|----------------|-------------|--------|
| SSH Hardening | RHEL-08-010000 | 5.2 | Secure SSH configuration | `src/security-hardening.sh` | ✅ |
| SSH Client-Only | RHEL-08-010000 | 5.2 | Client config, no server | `src/security-hardening.sh` | ✅ |
| Password Policy | RHEL-08-020200 | 5.1 | pwquality.conf with 14-char minimum | `src/security-hardening.sh` | ✅ |
| System Resource Limits | RHEL-08-040123 | 5.3 | limits.d/security.conf | `src/security-hardening.sh` | ✅ |
| File Permissions | RHEL-08-040040 | 3.3 | Secure file permissions | `src/security-hardening.sh` | ✅ |
@@ -117,7 +117,7 @@ The built ISO includes test capabilities for post-installation validation:
- ✅ USB automount support for secure configuration transfer
- ✅ Minimal desktop with IceWM and privacy-focused LightDM
- ✅ SSH hardening with restricted access
- ✅ SSH client-only (no server, no inbound access)
- ✅ Strong password policy (14 characters minimum)
- ✅ Comprehensive audit logging with auditd
- ✅ Package management disabled for immutable system

View File

@@ -77,7 +77,7 @@ To provide the most secure, compliant, and user-friendly operating system for ti
- IceWM desktop environment
- WireGuard VPN client with QR code import
- Network firewall with default-deny policy
- SSH server with key-based authentication
- SSH client for outbound remote access
- USB device automount with restrictions
- Automated ISO build process
- Comprehensive security testing suite
@@ -130,14 +130,6 @@ The system MUST implement full disk encryption using LUKS (Linux Unified Key Set
- Loss of passphrase = permanent data loss
- Store passphrase in secure password manager
**Installation Behavior:**
- Installer MUST prompt for encryption passphrase
- Passphrase MUST meet complexity requirements above
- System CANNOT be installed without encryption
- Installer MUST verify passphrase strength where possible
- System CANNOT boot without correct passphrase
- Installer SHOULD create key backup option (recommended)
**Implementation Details:**
```
/dev/sda1 512M EFI System Partition (ESP)
@@ -146,13 +138,6 @@ The system MUST implement full disk encryption using LUKS (Linux Unified Key Set
└─ cryptroot AES-256-XTS / (ext4)
```
**Installation Behavior:**
- Installer MUST prompt for encryption passphrase
- Passphrase MUST be 14+ characters with complexity requirements
- System CANNOT be installed without encryption
- Installer MUST verify passphrase strength
- Installer MUST create key backup option (recommended)
**Security Properties:**
- Data unreadable without correct passphrase
- No backdoors or recovery mechanisms by default
@@ -221,17 +206,19 @@ The system MUST implement full disk encryption using LUKS (Linux Unified Key Set
- WiFi: rtl*, iwl*, ath*, brcm*, mwifi*, rt2*
- Bluetooth: btusb, bluetooth
### FR-006: SSH Access
### FR-006: SSH Client (Outbound Only)
**Priority:** P1
**Status:** Required
**Requirements:**
1. **Key-Based Authentication** - Only SSH keys (no passwords)
2. **WireGuard Keys** - Pre-configured WireGuard key pairs
3. **Root Login Disabled** - No direct root SSH access
4. **Custom SSH Port** - Non-standard port (configurable)
5. **Key Management** - Secure key storage and rotation
1. **SSH Client Only** - No SSH server, no inbound SSH access
2. **Key-Based Authentication** - SSH keys for connecting to remote systems
3. **Hardened Client Config** - Modern ciphers, strict host key checking
4. **No Password Auth** - Public key authentication only for outbound connections
5. **Key Management** - Secure storage of user SSH private keys
**Important**: This system accepts NO inbound connections. SSH is client-only for initiating outbound connections to privileged access workstations.
### FR-007: System Hardening
@@ -393,16 +380,16 @@ The system MUST implement full disk encryption using LUKS (Linux Unified Key Set
#### Firewall Rules
```
Default Policy: DROP
Default Policy: DROP ALL
Inbound Rules:
- SSH from VPN interface only (key-based auth)
- Established/related connections allowed
- NONE (all inbound traffic denied)
- Established/related connections allowed (for return traffic only)
Outbound Rules:
- WireGuard VPN traffic to endpoints
- WireGuard VPN traffic to endpoints only
- DNS through VPN tunnel only
- All traffic through VPN interface only
- ALL traffic through VPN interface only
```
### System Security Layer
@@ -422,8 +409,7 @@ Outbound Rules:
#### Authentication
- **Password Policy:** 14+ characters, complexity required
- **SSH:** Key-based only (no password auth)
- **Root Login:** Disabled via SSH
- **SSH:** Client-only, key-based authentication for outbound connections
- **Sudo:** Limited sudo access for authorized users
#### Authorization
@@ -551,7 +537,7 @@ Outbound Rules:
- IceWM window manager
- LightDM display manager
- WireGuard and tools
- OpenSSH server
- OpenSSH client
- nftables firewall
- Remmina (remote desktop)
- Mousepad (text editor)
@@ -923,7 +909,7 @@ Outbound Rules:
| WireGuard | Modern, high-performance VPN protocol |
| nftables | Linux packet filtering framework |
| IceWM | Ice Window Manager - Lightweight window manager |
| LightDM - Light Display Manager - Cross-desktop display manager |
| LightDM | Light Display Manager - Cross-desktop display manager |
---

View File

@@ -29,6 +29,16 @@ This document defines the mandatory Software Development Lifecycle (SDLC) for th
- Automated + manual review
- Build-time + runtime validation
### 4. Documentation-Code-Test Synchronization (MANDATORY)
- **All three must be in sync at ALL times**
- Documentation = PRD requirements + implementation docs
- Code = Actual implementation in src/ and config/
- Tests = Verification that code matches documentation
- **NO STUB TESTS ALLOWED** - Every test must verify actual behavior
- When changing code: update tests AND documentation
- When changing documentation: update code AND tests
- When changing tests: verify code matches AND update documentation if needed
---
## Test-Driven Development (TDD) Workflow
@@ -150,11 +160,11 @@ This document defines the mandatory Software Development Lifecycle (SDLC) for th
2. **Function Documentation**
```bash
# Function: configure_ssh
# Purpose: Configure SSH server with security hardening
# Requirements: PRD FR-006 (Key-Based Authentication Only)
# Security: Disables password auth per NIST guidelines
configure_ssh() {
# Function: configure_ssh_client
# Purpose: Configure SSH client for outbound connections only
# Requirements: PRD FR-006 (SSH Client - No inbound services)
# Security: Client-only, hardened cipher suite
configure_ssh_client() {
```
---

View File

@@ -206,7 +206,6 @@
- SSH has client alive settings
- Firewall blocks inbound traffic by default
- Firewall allows outbound traffic
- Firewall allows SSH inbound
- Firewall allows WireGuard
- Encryption setup hook exists
- Encryption validation hook exists

View File

@@ -226,10 +226,10 @@ partman-crypto/erase_disks_secure boolean true
**Password Configuration**:
```bash
passwd/user-password password knelfootballtier0secure2026!
passwd/user-password-again password knelfootballtier0secure2026!
passwd/root-password password knelfootballtier0secure2026!
passwd/root-password-again password knelfootballtier0secure2026!
# Passwords are prompted during installation (not hardcoded)
# This ensures each installation has unique credentials
d-i passwd/user-password-crypted string !
d-i passwd/root-password-crypted string !
```
**Package List**:
@@ -243,7 +243,7 @@ d-i pkgsel/include string \
mousepad \
zbar-tools \
nftables \
openssh-server \
openssh-client \
cryptsetup \
cryptsetup-initramfs \
busybox \

View File

@@ -623,7 +623,7 @@ cat > /etc/audit/rules.d/audit.rules << EOF
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k identity
-w /etc/ssh/sshd_config -p wa -k sshd_config
-w /etc/ssh/ssh_config -p wa -k ssh_config
-w /var/log/audit/ -p wa -k log_audit
-w /var/log/secure -p wa -k log_secure
-w /etc/wireguard/ -p wa -k wireguard_config
@@ -822,20 +822,8 @@ configure_system_security() {
systemctl disable avahi-daemon
systemctl disable bluetooth
# Secure SSH configuration
cat > /etc/ssh/sshd_config << EOF
# SSH Security Configuration
Protocol 2
PermitRootLogin no
PasswordAuthentication yes
PubkeyAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding no
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
EOF
# Secure SSH client configuration (no server - outbound only)
# See configure_ssh_client() in src/security-hardening.sh for full config
# Configure system limits
cat > /etc/security/limits.d/security.conf << EOF