-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New "weakest MFA" property breaks user comparisons #51209
Labels
Comments
tigrato
added a commit
that referenced
this issue
Jan 20, 2025
This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
tigrato
added a commit
that referenced
this issue
Jan 20, 2025
This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@zmb3 thanks. I completely forgot we still used the compare and swap for users |
tigrato
added a commit
that referenced
this issue
Jan 20, 2025
This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 20, 2025
…51226) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-actions bot
pushed a commit
that referenced
this issue
Jan 20, 2025
This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
tigrato
added a commit
that referenced
this issue
Jan 20, 2025
…51226) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
tigrato
added a commit
that referenced
this issue
Jan 20, 2025
…51226) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 20, 2025
…51226) (#51230) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 20, 2025
…51226) (#51231) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 20, 2025
…51229) This PR fixes a bug that causes compare and swap to fail when reading users with secrets because we were mutating `MfaWeakestDevice` value and comparison with database failed. This PR removes the auto-filling of the field and transitions the computation to CUD methods. Fixes #51209 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an old Teleport local user that was likely created before we tracked whether the user has a password set and that I haven't logged in with in a long time.
I noticed that every time I log in to this old user account, I see an error in the logs which happens when we try to set the password state to "has a password".
The compare and swap operation fails due to a mismatch in the new
MfaWeakestDevice
field.Note that the user object in backend storage has no status field at all (and therefore no
MfaWeakestDevice
setting):The comparison appears to fail because of new code added to
GetUser
that mutates the user objectinstead of returning exactly what existed in storage:
teleport/lib/services/local/resource.go
Lines 343 to 346 in cb7a4d5
As a side note,
SetWeakestDevice
is not a great name, as not all MFA methods are devices.SetWeakestMFA
would have been a better choice.The text was updated successfully, but these errors were encountered: