feat: implement subscription secrets management system (#250)#272
Merged
Smartdevs17 merged 1 commit intoApr 22, 2026
Merged
Conversation
- Implement SecretsVault with AsyncStorage-backed encrypted vault (base64 obfuscation; swap-ready for expo-crypto AES-GCM) - Add secrets rotation with version tracking and rotatedAt timestamp - Support environment-specific secrets (development/staging/production) with full isolation between environments - Implement secrets injection: inject() returns flat config object for app startup population - Add audit logging for all actions: set, get, rotate, delete, recover, inject — with timestamp, env, success flag, and reason - Implement secrets recovery: soft-delete + recover() restores value - Add 25 passing tests covering all acceptance criteria Closes Smartdevs17#250
|
@rindicomfort Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Implements comprehensive secrets management for SubTrackr as described in issue #250.
Changes
backend/secrets/SecretsVault.tsSecretsVaultclass — AsyncStorage-backed, values obfuscated (base64; swap-ready for AES-GCM), versioned manifest indexrotate(key, newValue)increments version + setsrotatedAt;getDueForRotation()returns secrets past theirrotationIntervalMsset/get/listall acceptenv: 'development' | 'staging' | 'production'; storage keys are namespaced per envinject(env?)returns a flatInjectedSecretsobject (STELLAR_NETWORK, CONTRACT_ID, WEB3AUTH_CLIENT_ID, …) for app startupset,get,rotate,delete,recover,injectwrites anAuditEventwith timestamp, env, success flag, and optional reason; capped at 1000 eventsdelete();recover(key)restores the value and clears the deleted flagbackend/secrets/__tests__/SecretsVault.test.tsTest Results
Acceptance Criteria
rotate(),getDueForRotation(),rotationIntervalMs)inject()→ flat config object at startup)recover())Closes #250