Skip to content

Add internal admin search endpoint with PII redaction policy enforcement #456

Description

@thlpkee20-wq

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
    • npm test
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions