Skip to content

Pass auth to bugs.webkit.org properly - #274

Merged
gsnedders merged 1 commit into
web-platform-tests:mainfrom
gsnedders:fix-webkit-export-auth
Oct 22, 2026
Merged

gsnedders merged 1 commit into
web-platform-tests:mainfrom
gsnedders:fix-webkit-export-auth

Conversation

@gsnedders

@gsnedders gsnedders commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

bugs.webkit.org only reads credentials from request parameters, not headers, so the X-BUGZILLA-TOKEN header was ignored and every request was made logged out. Logged-out responses now truncate email addresses (ews-feeder rather than ews-feeder@webkit.org), so the bot no longer recognised changes made by EWS or the commit queue and stopped approving WebKit export PRs.

Send the API key as the Bugzilla_api_key query parameter instead, and redact it when logging. Also ask for
exclude_fields=update_token, since authenticated responses otherwise include a per-user token.

create-secrets.js returned the secret as bugsWebkit while index.js reads bugsWebkitToken, so the token was never set in production.

Tests replay requests with a placeholder key. The real key is replaced with REDACTED both when saving fixtures and when matching them, so recording with a real key replays existing fixtures instead of duplicating them. The fixtures are re-recorded while authenticated.

The "wrong bugzilla reference" test passed without asserting anything: bug 202311 loads fine when authenticated, so the rejection handler never ran. Point it at a nonexistent bug so it covers the error path again.

See also, an alternative fix: #273

Comment thread create-secrets.js
webhookSecret: await fetchSecret('github-webhook-secret'),
githubToken: await fetchSecret('wpt-pr-bot-github-token'),
bugsWebkit: await fetchSecret('wpt-pr-bot-bugswebkit-token'),
bugsWebkitToken: await fetchSecret('wpt-pr-bot-bugswebkit-token'),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this had been broken, @DanielRyanSmith, can you check this actually exists and works?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have confirmed the code here retrieves full emails back with this change

@DanielRyanSmith DanielRyanSmith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look at this

Comment thread lib/bugs-webkit.js Resolved
bugs.webkit.org only reads credentials from request parameters, not
headers, so the `X-BUGZILLA-TOKEN` header was ignored and every
request was made logged out. Logged-out responses now truncate email
addresses (`ews-feeder` rather than `ews-feeder@webkit.org`), so the
bot no longer recognised changes made by EWS or the commit queue and
stopped approving WebKit export PRs.

Send the API key as the `Bugzilla_api_key` query parameter instead,
and redact it when logging. Also ask for
`exclude_fields=update_token`, since authenticated responses otherwise
include a per-user token.

`create-secrets.js` returned the secret as `bugsWebkit` while
`index.js` reads `bugsWebkitToken`, so the token was never set in
production.

Tests replay requests with a placeholder key. The real key is replaced
with `REDACTED` both when saving fixtures and when matching them, so
recording with a real key replays existing fixtures instead of
duplicating them. The fixtures are re-recorded while authenticated.

The "wrong bugzilla reference" test passed without asserting anything:
bug 202311 loads fine when authenticated, so the rejection handler
never ran. Point it at a nonexistent bug so it covers the error path
again.
@gsnedders
gsnedders force-pushed the fix-webkit-export-auth branch from b4109fd to 8d5f383 Compare October 22, 2026 03:06
@gsnedders
gsnedders merged commit ac27ff7 into web-platform-tests:main Oct 22, 2026
1 check passed
@gsnedders
gsnedders deleted the fix-webkit-export-auth branch October 22, 2026 03: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.

2 participants