Repository navigation
fix(appauth): [stable-8.2] key app passwords by a stable user id, migrate old keys on load - #779
Merged
Conversation
…rate old keys on load Backport of #777 to stable-8.2. The json app auth manager stored the app passwords of each user under UserId.String(). Protobuf-go changes the whitespace of that text between builds. After an upgrade, the manager did not find the stored app passwords. - Store the app passwords under the key "<idp>|<opaque id>". - Move the buckets with the old keys to the new key once, in New(). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
LarsJurgensen
approved these changes
Oct 21, 2026
mzner
self-requested a review
October 21, 2026 13:35
mzner
approved these changes
Oct 21, 2026
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.
Backport of #777 to
stable-8.2.Problem
The json app auth manager stored the app passwords of each user under
UserId.String().Protobuf-go changes the whitespace of that text between builds.
After an upgrade, the manager does not find the stored app passwords.
Every request with an existing app password fails with
password not found.Changes
userKey(id)returns<idp>|<opaque id>.migrateLegacyKeys()moves the buckets with the old keys to the new key once, inNew().Notes
go test -race ./pkg/appauth/...passes on this branch.stable-9.0is fix(appauth): [stable-9.0] key app passwords by a stable user id, migrate old keys on load #778.🤖 Generated with Claude Code