feat(accounts): add export action with audit and no-store safeguards#412
Open
timefox wants to merge 1 commit intoSoju06:mainfrom
Open
feat(accounts): add export action with audit and no-store safeguards#412timefox wants to merge 1 commit intoSoju06:mainfrom
timefox wants to merge 1 commit intoSoju06:mainfrom
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.
Summary
auth.jsonpayload for a selected accountPOSTand both server/client now mark the request asno-store/no-cacheto reduce credential exposure via cachesaccount_exportedaudit logs withrequest_idandaccount_idfor traceabilitylast_refreshalongside the existinglastRefreshAtformatScreenshot
Changed files
app/modules/accounts/api.pyPOST /api/accounts/{account_id}/export, set no-store headers, and loggedaccount_exportedaudit eventsapp/modules/accounts/service.pyauth.jsonstructureapp/modules/accounts/schemas.pyAccountExportResponseapp/core/auth/__init__.pylast_refreshin addition tolastRefreshAtwhen parsingauth.jsonfrontend/src/features/accounts/components/account-actions.tsxfrontend/src/features/accounts/components/account-detail.tsxfrontend/src/features/accounts/components/accounts-page.tsxfrontend/src/features/accounts/api.tsfrontend/src/features/accounts/schemas.tsfrontend/src/features/accounts/hooks/use-accounts.tsfrontend/src/lib/api-client.tsno-storefrontend/src/test/mocks/handlers.tsfrontend/src/test/mocks/handler-coverage.test.tstests/integration/test_accounts_api.pytests/unit/test_auth.pytests/unit/test_audit_trail.pyaccount_exportedfrontend/src/features/accounts/hooks/use-accounts.test.tsTest results
uv run pytest tests/unit/test_auth.py tests/unit/test_audit_trail.py tests/integration/test_accounts_api.py tests/integration/test_accounts_api_extended.py29 passed, 1 skipped, 0 failedbun run test src/features/accounts/hooks/use-accounts.test.ts src/test/mocks/handler-coverage.test.ts src/__integration__/accounts-flow.test.tsx5 passed, 0 skipped, 0 failedbun run typecheckpassed