Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add personal API key hash mode sha256 and an upgrade path #20327

Merged
merged 7 commits into from
Feb 16, 2024

Conversation

webjunkie
Copy link
Contributor

Problem

See https://github.com/PostHog/product-internal/issues/548

Changes

  • add simple sha256 hash mode
  • add an upgrade path
  • adjust tests

How did you test this code?

  • tests
  • testing locally

@webjunkie webjunkie marked this pull request as ready for review February 14, 2024 12:14
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall like the solution a lot, just with some suggestions

posthog/api/test/test_personal_api_keys.py Outdated Show resolved Hide resolved
posthog/models/personal_api_key.py Outdated Show resolved Hide resolved
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Feels like the work is there for this to be a safe change 😬

posthog/auth.py Outdated Show resolved Hide resolved
Co-authored-by: Ben White <[email protected]>
@webjunkie webjunkie merged commit ad8af1c into master Feb 16, 2024
72 checks passed
@webjunkie webjunkie deleted the feature/personal-api-keys-hash branch February 16, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants