PostHog / PostHog/posthog

Support user attribution for custom apps built on PostHog

Open
#56,069 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Feature request

Is your feature request related to a problem?

My team is trying to manage large complex variant payloads in a custom app, however, when someone makes a change to the variants, the audit log shows that the user who generated the API key made the changes, rather than the actual person making changes upstream.

Describe the solution you'd like

The ability to attribute the real user making the change in the posthog audit logs.

Describe alternatives you've considered

Forcing all users to generate a separate personal API key that we store as part of the app.

Additional context

Debug info
- [x] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing how custom app API-key requests are authenticated and how audit-log actors are recorded; then determine how upstream user identity could be passed and trusted. Done means changes made through a custom app attribute the actual user in PostHog audit logs without requiring separate personal API keys.

Written by the indexing model from the issue text.

Assessment

Domain
api, authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.