Repository navigation
Conversation
SetPassword rewrote User.status with inviteExpiresAt set to an empty string. The CRD declares that field with format date-time, so the apiserver rejected every status update and no invited internal user could ever complete password setup (500 "Failed to set password"). The status written after set-password now omits the invite fields, which clears the invite without violating the schema.
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.
Problem
UserService.SetPassword(internal/auth/users.go) replacedUser.statuswith a map that setinviteExpiresAt: "". The User CRD declaresstatus.inviteExpiresAtwithformat: date-time(unchanged between butler-crds 0.11.0 and 0.22.0), so the apiserver rejects the status update:Every invited internal user gets
500 Failed to set passwordand can never log in. Reproduced on butler-beta on 2026-08-22 with a local server build while creating e2e users for the parity harness.Change
The post-set-password status omits
inviteTokenHashandinviteExpiresAtinstead of writing empty strings; replacing the whole status map already clears them. The map is built byactiveUserStatus, with a test asserting the invite keys are absent.Verification
CGO_ENABLED=0 go build ./...,go vet ./internal/auth/cleanCGO_ENABLED=0 go test ./internal/auth/passes (newusers_status_test.go)POST /api/admin/usersthenPOST /api/auth/set-passwordwith the invite token now returns 200 and the user logs in (recorded in the parity workstream note).Out of scope
The console
SetPasswordsPageand the missing portal landing page for invites.