• 
      

    Remove authentication warnings when missing credential parameters.

    Review Request #14142 — Created Sept. 4, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.x

    Reviewers

    A while back, we had added some additional debug logging to our auth
    backends' authenticate() methods, in an effort to help provide useful
    information if these methods ever got called with missing credentials.

    That can be useful, but in practice it was causing spurious warnings
    when an API client tried to use an API token to authenticate and when
    using an auth backend that had this logging.

    The API token web auth backend would generate credentials and then call
    auth.authenticate(), which would loop through all auth backends until
    one handled the request. This was intended to trigger a corresponding
    API token auth backend (either the default in Djblets or the default in
    Review Board).

    This backend is registered after the normal auth backends, so we'd do
    one pass through those backends, log the warnings, and then get to the
    proper backends.

    Ideally, we'd rework some of this to be able to consider only backends
    matching certain criteria, but that'd require some larger rework of
    this. For now, we're going to just remove those warnings, since they're
    doing more harm than good.

    Unit tests pass.

    Commits

    Files