feat: Add persistent volumes and encrypted secret management for deployments #51
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.
Features
Encrypted Secrets Management
--env-file(not baked into image layers)Persistent Volumes
/app/datainside containersEncryption
SECRET_MASTER_KEYenvironment variableChanges
Backend
src/backend/utils/encryption.ts- AES-256-GCM encryption servicesrc/backend/utils/authorization.ts- Project access verificationsrc/backend/secrets.ts- Secret management API routessrc/backend/shell_scripts/volume.sh- Volume management scriptsrc/backend/db.ts- Added secrets and volume metadata functionssrc/backend/server.ts- Added routes and encryption initializationsrc/backend/scripts.ts- Integrated volumes and secrets into deploymentsrc/backend/shell_scripts/container.sh- Volume mounting and env injectionsrc/backend/shell_scripts/delete.sh- Volume cleanup on deletionFrontend
src/frontend/src/utils/secrets.ts- Secret API clientsrc/frontend/src/components/SecretManager.vue- Secret management UITests
src/backend/utils/encryption.test.ts- Comprehensive encryption service testsAPI Endpoints
Create/Update Secrets
List Secret Keys
Delete Secrets
Environment Variables
Required (for secrets feature)
SECRET_MASTER_KEY: Master encryption key (32+ characters)Database Collections
New Collections
project_secrets: Encrypted secrets with IV and authentication tagsvolume_metadata: Volume tracking informationRequired Setup
SECRET_MASTER_KEYin backend.envfile (minimum 32 characters)Testing
Run tests:
deno test src/backend/utils/encryption.test.ts --allow-allCloses #45