Skip to content

feat: add security security hardening features#55

Merged
allisson merged 2 commits intomainfrom
security-improvements
Feb 19, 2026
Merged

feat: add security security hardening features#55
allisson merged 2 commits intomainfrom
security-improvements

Conversation

@allisson
Copy link
Owner

BREAKING CHANGE: Default token expiration reduced from 24 hours to 4 hours (AUTH_TOKEN_EXPIRATION_SECONDS: 86400 → 14400). Clients relying on the previous default must explicitly set AUTH_TOKEN_EXPIRATION_SECONDS=86400.

Added comprehensive security hardening features:

  • Per-client rate limiting for authenticated endpoints (default: 10 req/sec, burst 20)
  • Configurable CORS support (disabled by default for server-to-server API)
  • New environment variables: RATE_LIMIT_ENABLED, RATE_LIMIT_REQUESTS_PER_SEC, RATE_LIMIT_BURST, CORS_ENABLED, CORS_ALLOW_ORIGINS
  • Rate limit middleware returns 429 Too Many Requests with Retry-After header
  • CORS middleware with configurable allowed origins

Security documentation and guidance:

  • Added comprehensive security hardening guide (docs/operations/security-hardening.md)
  • Added security warnings for database SSL/TLS requirements in .env.example and docs
  • Updated production deployment guide with security hardening reference
  • Added API rate limiting reference (docs/api/rate-limiting.md)
  • Added API error decision matrix (docs/api/error-decision-matrix.md)
  • Updated all API endpoint docs with 429 status code behavior
  • Expanded troubleshooting guide with rate-limit and CORS diagnostics

Release and operations documentation:

  • Added v0.5.0 release notes (docs/releases/v0.5.0.md)
  • Added v0.5.0 upgrade guide (docs/releases/v0.5.0-upgrade.md)
  • Added release compatibility matrix (docs/releases/compatibility-matrix.md)
  • Added production rollout golden path runbook (docs/operations/production-rollout.md)
  • Added quarterly operator drills runbook (docs/operations/operator-drills.md)
  • Added docs architecture map (docs/development/docs-architecture-map.md)
  • Added docs release checklist (docs/development/docs-release-checklist.md)
  • Added dashboard artifact templates (docs/operations/dashboards/)
  • Root-level CHANGELOG.md for project release history

Enhanced API and policy documentation:

  • Expanded policy cookbook with persona templates and pre-deploy automation
  • Added retry/backoff examples for 429 handling in all language examples
  • Updated OpenAPI spec with 429 response modeling
  • Added OpenAPI validation to CI workflow
  • Added release docs CI guard (docs/tools/check_release_docs_links.py)
  • Expanded monitoring guide with rate-limit Prometheus queries and alerts

Dependencies:

  • Added golang.org/x/time/rate for token bucket rate limiting
  • Updated go.mod and go.sum

All version references updated from v0.4.1 to v0.5.0 across documentation and examples.

BREAKING CHANGE: Default token expiration reduced from 24 hours to 4 hours (AUTH_TOKEN_EXPIRATION_SECONDS: 86400 → 14400). Clients relying on the previous default must explicitly set AUTH_TOKEN_EXPIRATION_SECONDS=86400.

Added comprehensive security hardening features:
- Per-client rate limiting for authenticated endpoints (default: 10 req/sec, burst 20)
- Configurable CORS support (disabled by default for server-to-server API)
- New environment variables: RATE_LIMIT_ENABLED, RATE_LIMIT_REQUESTS_PER_SEC, RATE_LIMIT_BURST, CORS_ENABLED, CORS_ALLOW_ORIGINS
- Rate limit middleware returns 429 Too Many Requests with Retry-After header
- CORS middleware with configurable allowed origins

Security documentation and guidance:
- Added comprehensive security hardening guide (docs/operations/security-hardening.md)
- Added security warnings for database SSL/TLS requirements in .env.example and docs
- Updated production deployment guide with security hardening reference
- Added API rate limiting reference (docs/api/rate-limiting.md)
- Added API error decision matrix (docs/api/error-decision-matrix.md)
- Updated all API endpoint docs with 429 status code behavior
- Expanded troubleshooting guide with rate-limit and CORS diagnostics

Release and operations documentation:
- Added v0.5.0 release notes (docs/releases/v0.5.0.md)
- Added v0.5.0 upgrade guide (docs/releases/v0.5.0-upgrade.md)
- Added release compatibility matrix (docs/releases/compatibility-matrix.md)
- Added production rollout golden path runbook (docs/operations/production-rollout.md)
- Added quarterly operator drills runbook (docs/operations/operator-drills.md)
- Added docs architecture map (docs/development/docs-architecture-map.md)
- Added docs release checklist (docs/development/docs-release-checklist.md)
- Added dashboard artifact templates (docs/operations/dashboards/)
- Root-level CHANGELOG.md for project release history

Enhanced API and policy documentation:
- Expanded policy cookbook with persona templates and pre-deploy automation
- Added retry/backoff examples for 429 handling in all language examples
- Updated OpenAPI spec with 429 response modeling
- Added OpenAPI validation to CI workflow
- Added release docs CI guard (docs/tools/check_release_docs_links.py)
- Expanded monitoring guide with rate-limit Prometheus queries and alerts

Dependencies:
- Added golang.org/x/time/rate for token bucket rate limiting
- Updated go.mod and go.sum

All version references updated from v0.4.1 to v0.5.0 across documentation and examples.
@allisson allisson merged commit 6321b72 into main Feb 19, 2026
2 checks passed
@allisson allisson deleted the security-improvements branch February 19, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments