Live config loaded — values shown in teal reflect what is currently deployed on this server.
AGS Documentation
Back to Dashboard

Security & Privacy Threat Model src/services/auth.py

The main privacy/security risks and how AGS reduces them.

RiskMitigationResidual concern
Direct participant identificationPhone stored only as HMAC token; study IDs used for analysis.HMAC secret must remain protected.
OvercollectionCollect interaction signals, not video or credentials.External pages may still contain sensitive visible content.
Unauthorized dashboard accessResearcher JWT, role checks, admin-only routes.Passwords and JWT secrets need operational protection.
Condition leakageCondition resolved server-side and hidden from participant UI.Facilitator language can still bias participants.
Data tamperingServer-side validation, audit log, schema constraints.Admin actions still require review discipline.
Replay/duplicate eventsIdempotency via client_event_id.Offline queues need monitoring for delayed batches.
Third-party site breakageProxy/extension fallback and explicit capture-mode metadata.Some sites may still be incompatible.

Secret boundaries

  • JWT_SECRET, RESEARCHER_JWT_SECRET, and PHONE_HMAC_SECRET must be separate.
  • Rotating JWT secrets should not break phone reauth if the phone HMAC secret remains stable.
  • Environment variables live in deployment secrets, not source code.