feat: add security security hardening features#55
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Security documentation and guidance:
Release and operations documentation:
Enhanced API and policy documentation:
Dependencies:
All version references updated from v0.4.1 to v0.5.0 across documentation and examples.