Skip to main content

TS-team backdoor export API (email + CID auth) discussion

Context

Chat discussion (Maulana Ghozi Humama, Zhelia Alifa, Puji Triwibowo) on whether an additional, non-user-token API is needed so the TS team can generate customer exports for their own support cases, since the existing export API requires a user token.

Notes

  • Ghozi: proposes an API where a caller supplies only an email and a CID (company id) to generate a customer export, for TS team's export-request cases — existing API needs a user token, which TS doesn't have in that flow.
  • Zhelia asked whether this is an enhancement of the existing API or a new one, and whether it would still be used once the (self-serve) export feature ships.
  • Ghozi: enhance the existing handler and worker, not a new API. Flow: the email resolves a user_sso_id and its permissions; the CID is used to validate that the email actually belongs to that CID.
  • Zhelia: agrees it's a security improvement, but recommends it should not block the export feature's release.
  • Ghozi: agreed — must not become breaking for what's already released.
  • Puji Triwibowo: suggested this could become a self-serve feature in clients.qontak, where whitelisted TS users export directly themselves.
  • Ghozi: confirmed that's the intended direction — the plan is for this to be consumed by the Qontak client, so the TS team can execute the export directly from there.

Decisions / changes

  • Scope this as a handler+worker enhancement to the existing export API (not a new API), using email → user_sso_id/permissions plus CID → email-ownership validation, for TS export-request cases. Owner: Ghozi. Date: TBD.
  • This enhancement must not block or break the existing export feature's release.

Follow-ups

  • Ghozi/Zhelia — scope and size the handler/worker enhancement (email→user_sso_id lookup, permission check, CID-email validation) without blocking the export feature release.
  • Track the proposed clients.qontak self-serve export feature (whitelisted TS users) as a future initiative/PRD once scoped — not yet documented anywhere in this repo.