Pushing to mozreview with invalid BMO API Key gives blanket error and no hints to fix

NEW
Unassigned

Status

2 years ago
2 years ago

People

(Reporter: automatedtester, Unassigned)

Tracking

Details

(Reporter)

Description

2 years ago
There was an issue with my BMO API Key and when I tried to push a patch for review I  got a basic error saying `abort: Authorization failed` but doesnt hint where the error could be. See below.

dburns in ~/development/mozilla-central λ hg push review
pushing to https://reviewboard-hg.mozilla.org/autoreview
searching for appropriate review repository
redirecting push to https://reviewboard-hg.mozilla.org/gecko
(adding commit id to 1 changesets)
saved backup bundle to /Users/dburns/development/mozilla-central/.hg/strip-backup/af7cdd5fe110-325d77b0-addcommitid.hg
searching for changes
sending [    <=>                                                                                                                                         ] 192/54 -10sabort: authorization failed



Please can we update the error message to help people fix their own errors.
here's the error logged by httpd:

[Mon Jul 04 13:58:01 2016] [error] AuthExtern bmoapikey [/usr/bin/python2.7 /var/hg/version-control-tools/scripts/httpd-authn-bugzilla-key https://bugzilla.mozilla.org/]: Failed (1) for user dburns@m.c

this looks tricky.. mod_authnz_external doesn't allow authenticators to return a textual error:
https://github.com/phokz/mod-auth-external/blob/master/mod_authnz_external/AUTHENTICATORS#L61-L62

Comment 2

2 years ago
I don't see an easy way to fix this given our current auth setup: we'd have to implement authnz outside of httpd.

I'd rather we improve `mach mercurial-setup` to verify your Bugzilla config against BMO. The chances that BMO will work and reviewboard-hg.mozilla.org won't will be small (and shouldn't be isolated to a single user so we would know if it were broke).
You need to log in before you can comment on or make changes to this bug.