Skip to main content

Security Overview

Optimal Platform implements defense-in-depth security across all layers of the stack.

Security Layers

┌─────────────────────────────────────────────────────────────────┐
│ SECURITY ARCHITECTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Layer 1: Network Security │
│ ├── Network Policies (deny by default) │
│ ├── Ingress TLS termination │
│ └── Service-to-service encryption │
│ │
│ Layer 2: Policy Enforcement │
│ ├── Kyverno validating webhooks │
│ ├── Kyverno mutating webhooks │
│ └── Pod Security Standards │
│ │
│ Layer 3: Runtime Security │
│ ├── Falco syscall monitoring │
│ ├── Container escape detection │
│ └── Anomaly detection │
│ │
│ Layer 4: Application Security │
│ ├── OIDC/JWT authentication │
│ ├── Role-based access control │
│ └── Vulnerability scanning │
│ │
│ Layer 5: Data Security │
│ ├── Encryption at rest │
│ ├── Encryption in transit │
│ └── Secret management │
│ │
└─────────────────────────────────────────────────────────────────┘

Policy Enforcement (Kyverno)

Kyverno provides Kubernetes-native policy management:

Policy Categories

CategoryPurposeExample
ValidationReject non-compliant resourcesRequire resource limits
MutationModify resources automaticallyAdd default labels
GenerationCreate resources automaticallyGenerate NetworkPolicies
VerificationVerify image signaturesRequire signed images

Default Policies

# Pod Security Standards (Restricted)
- require-run-as-non-root
- require-read-only-root-filesystem
- disallow-privilege-escalation
- disallow-host-namespaces
- disallow-host-ports
- restrict-volume-types
- restrict-seccomp-profiles

# Resource Management
- require-resource-limits
- require-resource-requests
- limit-container-resources

# Best Practices
- require-labels
- require-probes
- disallow-latest-tag
- require-image-digest

See Kyverno Policies for complete reference.

Runtime Security (Falco)

Falco monitors runtime behavior for threats:

Detection Categories

CategoryExamples
Container Escapeptrace, mount namespace escapes
Privilege Escalationsetuid binaries, capability abuse
CryptominingSuspicious CPU patterns, mining pools
Data ExfiltrationUnusual outbound connections
Shell ActivityShells in containers, reverse shells

Default Rules

- rule: Container Escape via ptrace
desc: Detect ptrace usage that could indicate escape attempt
condition: >
evt.type = ptrace and
container and
proc.name != known_debuggers
output: "Possible container escape (user=%user.name command=%proc.cmdline)"
priority: CRITICAL

- rule: Crypto Mining Activity
desc: Detect crypto mining based on process names
condition: >
spawned_process and
container and
proc.name in (crypto_mining_processes)
output: "Crypto mining detected (command=%proc.cmdline)"
priority: CRITICAL

See Runtime Security for complete reference.

Network Security

Default Deny Policies

All namespaces implement deny-by-default:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: optimal-system
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress

Allowed Traffic

Explicit allow policies for required communication:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-portal-to-api
spec:
podSelector:
matchLabels:
app: optimal-api-gateway
ingress:
- from:
- podSelector:
matchLabels:
app: optimal-portal
ports:
- port: 8000

See Network Policies for complete reference.

Authentication & Authorization

OIDC Authentication

User → Portal → Keycloak → Identity Provider

JWT Token (signed)

API Gateway → Validate JWT → Authorize Request

RBAC Model

# Roles
- platform-admin # Full access
- tenant-admin # Tenant management
- developer # Read + limited write
- viewer # Read-only

# Permissions
- vulnerabilities:read
- vulnerabilities:write
- sbom:read
- sbom:write
- agents:manage
- settings:manage

Secret Management

Kubernetes Secrets

apiVersion: v1
kind: Secret
metadata:
name: optimal-credentials
annotations:
# Seal with sealed-secrets (optional)
sealedsecrets.bitnami.com/managed: "true"
type: Opaque
data:
database-password: <base64>
jwt-secret: <base64>

External Secret Stores (Optional)

Integration with external secret stores:

  • HashiCorp Vault
  • AWS Secrets Manager
  • GCP Secret Manager
  • Azure Key Vault

Compliance

Supported Frameworks

FrameworkCoverage
NIST 800-53Controls mapped
FedRAMPModerate/High
DoD IL4/IL5Supported
SOC 2Type II ready
HIPAATechnical controls

Automated Controls

  • Continuous vulnerability scanning
  • SBOM generation and tracking
  • Policy compliance reporting
  • Audit logging
  • Access reviews

Next Steps