Added http digest authentication backend

Review Request #6812 — Created Jan. 19, 2015 and submitted

terrycain
Review Board
master
5449fbf...
reviewboard

Added an authentication backend to allow Review Board to use http digest files for authentication. Added a settings form so that you can specify the location of the file and the realm used for digest auth.

Have tested it with various digest password files in the format of username:realm:passwordhash where the password hash is comprised of the MD5 hash of "user:realm:pass". Files can be created using htdigest.

Description From Last Updated

Col: 27 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 27 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 33 E241 multiple spaces after ':'

reviewbotreviewbot

Col: 25 E241 multiple spaces after ':'

reviewbotreviewbot

'is_release' imported but unused

reviewbotreviewbot

We might as well import this at the top.

daviddavid

Can you use the older printf-style formatting here, and pass in line_no as an argument to the logging function? We ...

daviddavid

We should include the exception in this log entry.

daviddavid

Col: 33 E241 multiple spaces after ':'

reviewbotreviewbot

Col: 25 E241 multiple spaces after ':'

reviewbotreviewbot

'is_release' imported but unused

reviewbotreviewbot

Col: 33 E241 multiple spaces after ':'

reviewbotreviewbot

Col: 25 E241 multiple spaces after ':'

reviewbotreviewbot

'is_release' imported but unused

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
  2. reviewboard/accounts/backends.py (Diff revision 1)
     
     
    Col: 27
     E128 continuation line under-indented for visual indent
    
  3. reviewboard/accounts/backends.py (Diff revision 1)
     
     
    Col: 27
     E128 continuation line under-indented for visual indent
    
  4. reviewboard/admin/siteconfig.py (Diff revision 1)
     
     
    Col: 33
     E241 multiple spaces after ':'
    
  5. reviewboard/admin/siteconfig.py (Diff revision 1)
     
     
    Col: 25
     E241 multiple spaces after ':'
    
  6. setup.py (Diff revision 1)
     
     
     'is_release' imported but unused
    
  7. 
      
TE
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
  2. reviewboard/admin/siteconfig.py (Diff revision 2)
     
     
    Col: 33
     E241 multiple spaces after ':'
    
  3. reviewboard/admin/siteconfig.py (Diff revision 2)
     
     
    Col: 25
     E241 multiple spaces after ':'
    
  4. setup.py (Diff revision 2)
     
     
     'is_release' imported but unused
    
  5. 
      
david
  1. 
      
  2. reviewboard/accounts/backends.py (Diff revision 2)
     
     

    We might as well import this at the top.

  3. reviewboard/accounts/backends.py (Diff revision 2)
     
     
     
     

    Can you use the older printf-style formatting here, and pass in line_no as an argument to the logging function?

    We should also include the exception.

    For example:

    except ValueError as e:
        logging.error("Error in password file, does not "
                      "contain a user, realm, and password "
                      "at line %d: %s",
                      line_no, e, exc_info=True)
    
  4. reviewboard/accounts/backends.py (Diff revision 2)
     
     
     
     

    We should include the exception in this log entry.

  5. 
      
TE
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/backends.py
        reviewboard/accounts/forms/auth.py
        setup.py
        reviewboard/admin/management/sites.py
        reviewboard/admin/siteconfig.py
    
    
  2. reviewboard/admin/siteconfig.py (Diff revision 3)
     
     
    Col: 33
     E241 multiple spaces after ':'
    
  3. reviewboard/admin/siteconfig.py (Diff revision 3)
     
     
    Col: 25
     E241 multiple spaces after ':'
    
  4. setup.py (Diff revision 3)
     
     
     'is_release' imported but unused
    
  5. 
      
david
  1. Looks pretty good. I'm going to make some very small style changes and push this. Thanks!

  2. 
      
TE
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (433247d)

Loading...