Files
PFVCluster/docs/SECURITY.md
T
mrcharles a7fbad60ab docs: end-to-end gardening — links, stale refs, tailscale.md update
Comprehensive documentation gardening across the merged repo:

- tailscale.md: fully rewritten with current ground truth. The netinfra
  pair now runs production Technitium with all knel.net records
  replicated. Both LAN IPs resolve knel.net device names and recurse
  externally. The old "NXDOMAIN / zone is stale" findings are replaced
  with the resolved state and current recommendations.
- AGENTS.md: rewritten with Gitea-compatible clickable relative links
  to all key scripts and docs. Autonomous commit/push policy
  prominently documented. SSH user corrected to localuser.
- README.md: directory table and docs table now use clickable links.
- All .md cross-references converted to Gitea-renderable relative links.
- Stale path references (ProjectCode/, Project-Tests/, ProjectDocs/)
  updated to current names (provisioning/, tests/) across all docs.
- Stale repo name "FetchApply" / "KNELServerBuild" updated to
  "PFVCluster" in actionable docs; historical AI-review docs tagged
  with an HTML comment notice.
- REFACTORING-EXAMPLES.md: tagged as historical (pre-refactor patterns).
- tests/README.md, dns-cluster-setup/README.md, docs/DEPLOYMENT.md,
  docs/SECURITY.md: path references fixed to current structure.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-07-28 11:28:52 -05:00

6.5 KiB

PFVCluster Security Documentation

Security Architecture

The PFVCluster infrastructure provisioning system is designed with security-first principles, implementing multiple layers of protection for server deployment and management.

Current Security Features

1. Secure Deployment Method

  • Git-based deployment: Uses git clone instead of curl | bash
  • Local execution: Scripts run locally after inspection
  • Version control: Full audit trail of changes
  • Code review: Changes require explicit approval

2. HTTPS Enforcement

  • All downloads use HTTPS: Eliminates man-in-the-middle attacks
  • SSL certificate validation: Automatic certificate checking
  • Secure repositories: Ubuntu archive, Dell, Proxmox all use HTTPS
  • No HTTP fallbacks: No insecure download methods

3. SSH Hardening

  • Key-only authentication: Password login disabled
  • Secure ciphers: Modern encryption algorithms only
  • Fail2ban protection: Automated intrusion prevention
  • Custom SSH configuration: Hardened sshd_config

4. System Security

  • Firewall configuration: Automated iptables rules
  • Audit logging: auditd with custom rules
  • SIEM integration: Wazuh agent deployment
  • Compliance scanning: SCAP-STIG automated checks

5. Error Handling

  • Bash strict mode: set -euo pipefail prevents errors
  • Centralized logging: All operations logged with timestamps
  • Graceful failures: Proper cleanup on errors
  • Line-level debugging: Error reporting with line numbers

Security Testing

Automated Security Validation

# Run security test suite
./tests/run-tests.sh security

# Specific security tests
./tests/security/https-enforcement.sh

Security Test Categories

  1. HTTPS Enforcement: Validates all URLs use HTTPS
  2. Deployment Security: Checks for secure deployment methods
  3. SSL Certificate Validation: Tests certificate authenticity
  4. Permission Validation: Verifies proper file permissions

Threat Model

Mitigated Threats

  • Supply Chain Attacks: Git-based deployment with review
  • Man-in-the-Middle: HTTPS-only downloads
  • Privilege Escalation: Proper permission models
  • Unauthorized Access: SSH hardening and key management

Remaining Risks

  • Secrets in Repository: SSH keys stored in git (planned for removal)
  • No Integrity Verification: Downloads lack checksum validation
  • No Backup/Recovery: No rollback capability implemented

Security Recommendations

High Priority

  1. Implement Secrets Management

    • Remove SSH keys from repository
    • Use Bitwarden/Vault for secret storage
    • Implement key rotation procedures
  2. Add Download Integrity Verification

    • SHA256 checksum validation for all downloads
    • GPG signature verification where available
    • Fail-safe on integrity check failures
  3. Enhance Audit Logging

    • Centralized log collection
    • Real-time security monitoring
    • Automated threat detection

Medium Priority

  1. Configuration Backup

    • System state snapshots before changes
    • Rollback capability for failed deployments
    • Configuration drift detection
  2. Network Security

    • VPN-based deployment (where applicable)
    • Network segmentation for management
    • Encrypted communication channels

Compliance

Security Standards

  • CIS Benchmarks: Automated compliance checking
  • STIG Guidelines: SCAP-based validation
  • Industry Best Practices: Following NIST cybersecurity framework

Audit Requirements

  • Change Tracking: All modifications logged
  • Access Control: Permission-based system access
  • Vulnerability Management: Regular security assessments

Incident Response

Security Event Handling

  1. Detection: Automated monitoring and alerting
  2. Containment: Immediate isolation procedures
  3. Investigation: Log analysis and forensics
  4. Recovery: System restoration procedures
  5. Lessons Learned: Process improvement

Contact Information

  • Security Team: [To be defined]
  • Incident Response: [To be defined]
  • Escalation Path: [To be defined]

Security Development Lifecycle

Code Review Process

  1. Static Analysis: Automated security scanning
  2. Peer Review: Manual code inspection
  3. Security Testing: Automated security test suite
  4. Approval: Security team sign-off

Deployment Security

  1. Pre-deployment Validation: Security test execution
  2. Secure Deployment: Authorized personnel only
  3. Post-deployment Verification: Security configuration validation
  4. Monitoring: Continuous security monitoring

Security Tools and Integrations

Current Tools

  • Wazuh: SIEM and security monitoring
  • Lynis: Security auditing
  • auditd: System call auditing
  • Fail2ban: Intrusion prevention

Planned Integrations

  • Vault/Bitwarden: Secrets management
  • OSSEC: Host-based intrusion detection
  • Nessus/OpenVAS: Vulnerability scanning
  • ELK Stack: Log aggregation and analysis

Vulnerability Management

Vulnerability Scanning

  • Regular scans: Monthly vulnerability assessments
  • Automated patching: Security update automation
  • Exception handling: Risk-based patch management
  • Reporting: Executive security dashboards

Disclosure Process

  1. Internal Discovery: Report to security team
  2. Assessment: Risk and impact evaluation
  3. Remediation: Patch development and testing
  4. Deployment: Coordinated security updates
  5. Verification: Post-patch validation

Security Metrics

Key Performance Indicators

  • Deployment Success Rate: Percentage of successful secure deployments
  • Vulnerability Response Time: Time to patch critical vulnerabilities
  • Security Test Coverage: Percentage of code covered by security tests
  • Incident Response Time: Time to detect and respond to security events

Monitoring and Reporting

  • Real-time Dashboards: Security status monitoring
  • Executive Reports: Monthly security summaries
  • Compliance Reports: Quarterly compliance assessments
  • Trend Analysis: Security posture improvement tracking

Contact and Support

For security-related questions or incidents:

Security Updates

This document is updated as security features are implemented and threats evolve. Last updated: July 14, 2025.