Bug 2073282 - Add deprecated api_key=<key> query-parameter fallback to native Mojo REST auth - #2753
Merged
Merged
Conversation
…o native Mojo REST auth
dklawren
requested changes
Sep 18, 2026
dklawren
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for jumping on this quickly.
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
Adds a fallback to
Bugzilla::App::Plugin::Login's Mojo login check so?api_key=<key>query parameters are accepted the same way the legacy WebService dispatcher already accepts them, in case undiscovered callers rely on it (like k8s monitoring service actually do).Please note that this is a deprecation-pending stopgap, not a first-class supported method (docs already warn this method is likely to be deprecated due to security concerns).
Changes
Bugzilla::App::Plugin::Login'sbugzilla.loginhelper: fall back to theapi_keyquery/body parameter when theX-Bugzilla-API-Keyheader is absent, same precedence and validation path (revoked/sticky-IP checks, rate limiting) as the header caseqa/t/rest_native_login.t: cover authentication via?api_key=docs/en/rst/api/core/v1/general.rst: note that native Mojo REST resources also accept the deprecatedapi_keyquery parameter as a fallbackTest plan
?api_key=<valid key>and no header -> authenticatesqa/t/rest_native_login.tcases (header, cookie + token) unaffectedReferences