Move and modernize X509AuthMiddleware.

Review Request #9998 — Created June 4, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
564ca1b...

Reviewers

X509AuthMiddleware is an old piece of code designed to authenticate
users using X.509 certificates. It was living in
reviewboard.admin.middleware, rather than
reviewboard.accounts.middleware, had some unnecessary checks, and
determined whether to process based on logic that the account backend
split is going to break. That last reason is why this change is being
made.

This change fixes all that up, simplifying the code, moving it under
reviewboard.accounts, and determining the auth backend through safer
means. It also adds unit tests to ensure that authentication only
happens under the proper circumstances.

Unit tests pass.

    Loading...