• 
      

    Remove authentication warnings when missing credential parameters.

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

    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.

    Summary ID
    Remove authentication warnings when missing credential parameters.
    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.
    44619d24868a5d5338c5539a7a171a6a1a880709
    david
    1. Ship It!
    2. 
        
    maubin
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.x (c65dcdc)