Skip to main content

Overview

This checklist covers all critical security areas that should be audited before and during production deployment. Use this as a systematic guide to ensure your MCP Server deployment meets security best practices.
Do not deploy to production until all critical items are addressed. High and critical items must be resolved; medium items should be planned for resolution.

Authentication & Authorization

Keycloak Configuration

Critical:
  • Admin password changed from default
  • Admin console access restricted to internal network
  • HTTPS enabled for all Keycloak endpoints
  • Session timeout configured (max 24 hours)
  • Brute force detection enabled
  • Email verification required for new users
High:
  • MFA/2FA enabled for admin accounts
  • Password policy enforced (min 12 characters, complexity)
  • Account lockout after failed attempts
  • Security headers configured
  • CORS properly configured
Verification:
Critical:
  • JWT secret is cryptographically secure (>= 32 bytes)
  • JWT secret rotated from default value
  • JWT secret stored in secret management system
  • Token expiration set appropriately (< 1 hour)
  • Refresh token rotation enabled
  • Algorithm set to RS256 or ES256 (not HS256)
High:
  • JWK rotation configured
  • Token revocation mechanism implemented
  • Audience (aud) claim validated
  • Issuer (iss) claim validated
Verification:
Critical:
  • Authorization model defined and tested
  • Default deny policy in place
  • Admin access properly restricted
  • Permission checks on all sensitive operations
  • OpenFGA TLS enabled
High:
  • Authorization logging enabled
  • Regular audit of permission tuples
  • Least privilege principle enforced
  • Authorization tests in CI/CD
Verification:

Secrets Management

Infrastructure Secrets

Critical:
  • No secrets in code or git repository
  • All secrets in Infisical/Vault/Cloud Secret Manager
  • .env files in .gitignore
  • Container images don’t contain secrets
  • Kubernetes secrets encrypted at rest
High:
  • Secret rotation policy defined (90 days max)
  • Automated secret rotation configured
  • Secret access auditing enabled
  • Secrets have expiration dates
Verification:
Critical:
  • LLM API keys rotated from initial values
  • API keys have usage limits configured
  • API keys scoped to minimum permissions
  • Backup API keys available
High:
  • API key usage monitoring enabled
  • Alerts on suspicious API usage
  • API keys rotated every 90 days
Verification:
Critical:
  • Database passwords changed from defaults
  • Database users have minimum required privileges
  • Production database not accessible from internet
  • SSL/TLS enforced for database connections
High:
  • Database password rotation configured
  • Connection pooling with authentication
  • Database audit logging enabled
Verification:

Network Security

Network Configuration

Critical:
  • HTTPS enabled for all public endpoints
  • Valid TLS certificates (not self-signed)
  • TLS 1.2+ only (1.0/1.1 disabled)
  • Strong cipher suites configured
  • HSTS header enabled
High:
  • Certificate auto-renewal configured
  • Certificate expiry monitoring
  • OCSP stapling enabled
  • Perfect forward secrecy (PFS) enabled
Verification:
Critical:
  • Network policies defined for all namespaces
  • Default deny ingress/egress in place
  • Least privilege network access
  • Pods can’t access cluster API by default
High:
  • Network policies tested
  • Egress filtering configured
  • Service mesh for mTLS (optional)
Verification:
Critical:
  • Only required ports exposed
  • Admin interfaces not publicly accessible
  • Rate limiting configured
  • DDoS protection enabled
High:
  • WAF rules configured
  • IP whitelisting for admin access
  • Geographic restrictions (if applicable)
  • Load balancer health checks configured
Verification:

Application Security

Code Security

Critical:
  • No critical vulnerabilities in dependencies
  • All dependencies from trusted sources
  • Lock files committed (requirements.txt, package-lock.json)
  • Dependency scanning in CI/CD
High:
  • Regular dependency updates
  • Automated vulnerability scanning
  • SBOM (Software Bill of Materials) generated
Verification:
Critical:
  • All user input validated
  • SQL injection protection
  • XSS protection
  • Command injection prevention
  • File upload validation
High:
  • Input sanitization
  • Output encoding
  • CSRF protection
  • Rate limiting per endpoint
Verification:
Critical:
  • Security events logged
  • Sensitive data not logged (passwords, tokens)
  • Logs centralized and searchable
  • Log retention policy defined
High:
  • Structured logging (JSON)
  • Log tampering prevention
  • Alerting on security events
  • SIEM integration
Verification:

Container Security

Image Security

Critical:
  • Images from trusted registries only
  • Image vulnerability scanning enabled
  • No critical vulnerabilities in images
  • Images signed and verified
  • Non-root user in containers
High:
  • Minimal base images (distroless, alpine)
  • Multi-stage builds
  • Image scanning in CI/CD
  • Regular image updates
Verification:
Critical:
  • Read-only root filesystem
  • Privilege escalation disabled
  • Capabilities dropped
  • seccomp profile applied
  • AppArmor/SELinux enabled
High:
  • Pod Security Standards enforced
  • Runtime security monitoring (Falco)
  • Resource limits defined
Verification:

Data Protection

Data Security

Critical:
  • Data encrypted in transit (TLS)
  • Data encrypted at rest (database, Redis, volumes)
  • Encryption keys managed securely
  • Kubernetes secrets encrypted
High:
  • Key rotation configured
  • HSM or KMS for key management
  • Encryption for backups
Verification:
Critical:
  • Automated backups configured
  • Backups encrypted
  • Backup restoration tested
  • Backup retention policy defined
  • Off-site backup storage
High:
  • Point-in-time recovery available
  • Backup monitoring and alerts
  • DR plan documented
Verification:
Critical:
  • PII handling documented
  • Data retention policy enforced
  • Right to deletion implemented
  • Data minimization practiced
  • Privacy policy published
High:
  • Consent management
  • Data portability
  • Privacy by design
  • GDPR/CCPA compliance (if applicable)
Verification:

Kubernetes Security

Cluster Security

Critical:
  • RBAC enabled
  • Principle of least privilege
  • No cluster-admin for apps
  • Service accounts for workloads
  • No default service account used
High:
  • Regular RBAC audit
  • Namespaced roles
  • RBAC testing
Verification:
Critical:
  • Pod Security Standards enforced
  • hostNetwork disabled
  • hostPID disabled
  • hostIPC disabled
  • Privileged pods not allowed
High:
  • SecurityContext on all pods
  • runAsNonRoot enforced
  • allowPrivilegeEscalation: false
Verification:
Critical:
  • API server not publicly accessible
  • Anonymous auth disabled
  • Audit logging enabled
  • Admission controllers configured
  • API server TLS verified
High:
  • API rate limiting
  • Webhook timeout configured
  • Audit logs reviewed regularly
Verification:

Compliance & Governance

Compliance

Critical:
  • Security policy documented
  • Incident response plan
  • Access control policy
  • Change management process
  • Security training for team
High:
  • Security champions assigned
  • Regular security reviews
  • Penetration testing scheduled
  • Bug bounty program (optional)
Verification:
  • Review policy documents
  • Check training records
  • Verify incident response tests
Critical:
  • Audit logs enabled everywhere
  • Compliance requirements identified
  • Regular compliance audits
  • Audit log retention (1 year min)
High:
  • SOC 2 / ISO 27001 certification
  • GDPR/CCPA compliance
  • Third-party audits
  • Compliance automation
Verification:

Pre-Production Checklist

Use this before deploying to production:

Automated Security Scanning

security-audit.sh:

Next Steps

Compliance Guide

GDPR, SOC2, HIPAA compliance

Best Practices

Security hardening guide

Security Overview

Security architecture overview

Quick Start Security

Essential security setup

Security Audit Complete: Systematic security review for production readiness!