Repository navigation
feat(security): credentials encryption, rate limit, IP allowlist, RBAC - #173
Merged
Merged
Conversation
Implement #60 Fernet encryption at rest, #64 sliding-window rate limits, optional ALLOWED_IPS middleware, and admin/approver/viewer roles on management API tokens. Update docs and env example to match. Co-authored-by: Cursor <[email protected]>
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.
Summary
ENCRYPT_CREDENTIALS+CREDENTIALS_MASTER_KEYFernet); plaintext reads still work for migration/webhookand/orgs(RATE_LIMIT_ENABLED)ALLOWED_IPS(CIDRs supported)API_ORG_TOKENSsupportsorg:viewer=/org:approver=/org:admin=(writes need admin; reads accept viewer+).env.example/ README aligned with what is actually builtTest plan
pytest tests/test_credential_crypto.py tests/test_security_middleware.py tests/test_api_auth.py tests/test_env_example_coverage.pyENCRYPT_CREDENTIALSlocally, save org config, confirm storage blob has_encryptedRATE_LIMIT_ENABLED=truewith lowRATE_LIMIT_REQUESTSand confirm 429ALLOWED_IPSto a non-matching IP and confirm 403Closes #60 (encryption portion). Advances #64 (rate limit + IP allowlist).
Made with Cursor