Description
Add an internal admin search endpoint across users, offerings, and payouts, with a server-side PII redaction policy enforced consistently and tested via fixtures.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/routes/admin.ts, src/security/
- Redaction must be uniform across response shapes
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/admin-search
- Implement changes
- Add
redact() policy module with field-classification table
- Add unified search endpoint with pagination
- Add tests asserting redaction across all shapes
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Nested fields, arrays of PII, missing classification
- Include test output and notes
Example commit message
feat: admin search with enforced PII redaction
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Add an internal admin search endpoint across users, offerings, and payouts, with a server-side PII redaction policy enforced consistently and tested via fixtures.
Requirements and context
src/routes/admin.ts,src/security/Suggested execution
git checkout -b feat/admin-searchredact()policy module with field-classification tableTest and commit
npm testExample commit message
feat: admin search with enforced PII redactionGuidelines