Security Guide

Security best practices and configuration for SNAP deployments.

Authentication

Token-based Authentication

# Generate token
curl -X POST http://localhost:8000/config/user/login \
  -H "Content-Type: application/json" \
  -d '{
    "username": "admin",
    "password": "securepassword"
  }'

RBAC Configuration

SnapAPI Service Account

SnapAPI uses a dedicated service account with specific cluster-wide permissions:

# Automated RBAC setup
cd SnapApi
./setup-snapapi-rbac.sh

Required Permissions

Permission Details

# Core Kubernetes API Group
- apiGroups: [""]
  resources: ["nodes", "nodes/proxy", "pods", "pods/log", "pods/exec", "namespaces"]
  verbs: ["get", "list", "watch", "create", "delete"]

# Apps API Group
- apiGroups: ["apps"]
  resources: ["replicasets"]
  verbs: ["get", "list"]

# OpenShift Security Context Constraints
- apiGroups: ["security.openshift.io"]
  resources: ["securitycontextconstraints"]
  verbs: ["use"]
  resourceNames: ["privileged"]

# Admission Webhook Configuration
- apiGroups: ["admissionregistration.k8s.io"]
  resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

For detailed RBAC setup instructions, see RBAC Setup Guide

Network Security

SSL/TLS Configuration

Firewall Rules

# Allow SNAP API access
8000/tcp - SnapAPI HTTP
8443/tcp - SnapAPI HTTPS/Webhooks
3000/tcp - SnapUI (if external access needed)

# Block unnecessary ports
# Only allow required cluster ports

Data Protection

Checkpoint Encryption

Access Control

Compliance

SOC 2 Compliance

GDPR Compliance

Security Monitoring

Log Analysis

Alerting