> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselumina.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Security Guidelines

> Security best practices for Lumina

Security best practices for production deployments.

***

## Database

* Change default passwords
* Enable SSL/TLS
* Restrict network access
* Use strong encryption
* Rotate credentials regularly

***

## Network

* Deploy behind VPN
* Use private networks
* Enable mTLS
* Configure firewalls
* Use NetworkPolicies (Kubernetes)

***

## Data Privacy

**Redact PII:**

```typescript theme={null}
const redacted = redactPII(userPrompt);
await lumina.traceLLM(
  () => llm.generate(redacted),
  { prompt: redacted }
);
```

**Configure retention:**

```bash theme={null}
TRACE_RETENTION_DAYS=7
```

**Implement data export:**

```bash theme={null}
curl http://api:8081/api/traces?userId=user-123 > user_data.json
```

***

## Secrets

Never commit secrets:

* Use environment variables
* Use secret managers (AWS Secrets Manager, Vault)
* Rotate secrets regularly
* Use least privilege access

***

## Auditing

Enable audit logging:

```bash theme={null}
ENABLE_AUDIT_LOG=true
AUDIT_LOG_PATH=/var/log/lumina/audit.log
```
