Feat/security enhancements#1
Merged
Merged
Conversation
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.
Description
This PR implements security enhancements, rate-limiting consolidation, admin pre-seeding, and a complete modular refactoring of the frontend client architecture.
Key Changes:
Frontend Modularization:
App.tsxinto clean, modular components.Sidebar.tsx,Header.tsx) and views (SecretsView.tsx,MembersView.tsx,ApiKeysView.tsx,SettingsView.tsx).src/components/modals/.Fine-Grained API Key Access Control:
scopefield ('full'or'read-only') to API keys in both backend schema and UI.POST,PUT,DELETE) for keys withread-onlyscope.Organization Member Management & Deletion:
DELETE /organizations/members/:userIdendpoint.Security Enhancements:
currentPasswordchecks) on the backend and frontend before users can change usernames, emails, or delete their accounts.ownerusers from deleting their accounts directly, which would orphan the organization.owner/adminroles and deletions exclusively to theownerrole.Rate Limiting & Admin Pre-Seeding:
rateLimiter.tsmiddleware file.DEFAULT_ADMIN_EMAILandDEFAULT_ADMIN_PASSWORDto bypass the initial signup flow in self-hosted Docker environments.Type of change
Checklist
npm run format:checkpasses (client and/or server, as touched)npm run lintpasses (client)npm run buildpasses (client and/or server, as touched)