Skip to content

fix(appauth): [stable-9.0] key app passwords by a stable user id, migrate old keys on load - #778

Merged
2403905 merged 1 commit into
stable-9.0from
fix/appauth-stable-user-key-stable-9.0
Oct 21, 2026
Merged

2403905 merged 1 commit into
stable-9.0from
fix/appauth-stable-user-key-stable-9.0

Conversation

@2403905

@2403905 2403905 commented Oct 21, 2026

Copy link
Copy Markdown

Backport of #777 to stable-9.0.

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, in New().
  • The file is saved only when a key changed.

Notes

🤖 Generated with Claude Code

…rate old keys on load

Backport of #777 to stable-9.0.

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]>
@2403905
2403905 requested a review from a team as a code owner October 21, 2026 13:22
@kw-security

kw-security commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mzner
mzner self-requested a review October 21, 2026 14:09
@2403905
2403905 merged commit 7adc415 into stable-9.0 Oct 21, 2026
@2403905
2403905 deleted the fix/appauth-stable-user-key-stable-9.0 branch October 21, 2026 14:09
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.

5 participants