feat: auto-create root user with generated password on warehouse provision#390
Merged
feat: auto-create root user with generated password on warehouse provision#390
Conversation
EDsCODE
added a commit
to PostHog/posthog
that referenced
this pull request
Apr 3, 2026
- Update DataWarehouseProvisioningStatus to match duckgres status API (flat connection object instead of nested infrastructure details) - Add DataWarehouseProvisioningConnection type with password field - ConnectionDetails component shows password with show/hide toggle - Companion duckgres PR: PostHog/duckgres#390 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Provision endpoint: - Generates a random password, creates root OrgUser (bcrypt hash only) - Returns plaintext password in the provision response — never stored Status endpoint: - Returns connection details (host, port, database, username) when ready - No password — it was only available at provision time Reset password endpoint: - POST /orgs/:id/reset-password generates a new password, returns it once Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
db9a5b2 to
6f8af65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rootOrgUser with a generated password whenPOST /provisionis calledGET /warehouse/statusreturns connection details (host, port, database, username) when ready — no passwordPOST /reset-passwordendpoint generates a new password, returns it once, updates the bcrypt hashGeneratePassword(),CreateOrgUser(),UpdateOrgUserPassword()helpers in configstoreGetOrg()added to provisioning store for resolving database name in status responseSecurity
Companion PR
Test plan
🤖 Generated with Claude Code