Add enhanced support for Perforce ticket-based authentication.

Review Request #8949 — Created May 18, 2017 and submitted

Information

Review Board
release-2.5.x
73343a4...

Reviewers

We've had support for using tickets for a long time, but the support was
a bit lazy. We'd still perform a login request on each session using the
provided username and password, using this to fetch/extend the ticket
needed for the session. On some setups, this could be a slow process, as
it could end up hitting multi-tenant Active Directory servers or it
might go through Perforce proxy servers, adding time to the request.

Now the locally-cached ticket is checked before attempting to perform a
login. If there is no ticket state, or the ticket is close to expiring
(within 1 hour), a login is performed to refresh the ticket. Otherwise,
the ticket is used as-is.

The ticket files also now live within a namespaced location in the
site's data directory. The location contains the Local Site name, if
any, making it easier to separate out the content for the purposes of
cleanup or debugging.

Unit tests pass.

Manually tested the following conditions:

  • No existing ticket stored locally or on the server.
  • No existing ticket stored locally, but ticket known on the server.
  • Existing unexpired local ticket.
  • Existing unexpired but soon-to-be-expired local ticket.
  • Expired local ticket.

Checked that logins only happened when there were no local tickets or
the tickets were soon going to expire.

Description From Last Updated

E303 too many blank lines (2)

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (2ff79f4)
Loading...