TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you implement “user impersonation” support?

9 pointsby memn0nisabout 5 years ago
What are best practices for implementing a support system where support agents &#x2F; engineers can see the app as the user sees it, including any bugs which may be occurring based on that user&#x27;s data?<p>Do most companies build this themselves with role based access control, access logging, automatically blocking any sensitive customer data or PII? Or are there tools on the market that do this?

2 comments

mattmanserabout 5 years ago
It really depends on your size, and how sensitive the data is. At small size with non-sensitive data, where you&#x27;ve got 2 guys with admin access to the db anyway, simple impersonation is fine as they&#x27;ve already got access. You don&#x27;t want to be spending a ton of time engineering a really complex solution. You probably should have a policy in place, and any staff you do give access to the feature explain the responsibility.<p>Most (small) startups I&#x27;ve worked at have usually had a homegrown solution with admin only access where you can login as the user.<p>However, these days, with more and more PII laws coming in, you do need to consider whether you <i>really</i> need it.<p>As you grow you have to add more checks, logging, etc., the user has to approve an access request, etc., to the point where you get bigger you don&#x27;t allow it at all.<p>It&#x27;s actually rare in my experience to need to impersonate a user to replicate bugs if you read their support request&#x2F;ask the right questions, and can be a sign of an inexperienced dev if someone constantly asks for this. You have to put yourself in the mind of the user, what were they doing, what were they clicking, what were they trying to achieve. You&#x27;ll usually be able to replicate it.<p>But another way to fix bugs due to complicated data interactions, when you&#x27;re not allowed to access the data, is to have a script to anonymize the PII in a backup DB.
评论 #22798853 未加载
brtkdotseabout 5 years ago
Two parallel builds, running of physically separate machines where the impersonation build has all writes turned off. Live build uses OAuth for authentication, impersonation build uses AD for authentication + HTTP cookie for impersonated person ID. All logged out the wazoo. This is in the financial industry.