Perforce Public Knowledge Base - P4Web and External Authentication Triggers
Reset Search



P4Web and External Authentication Triggers

« Go Back



In general, when P4Web needs to be configured to bypass Perforce server authentication (logging in), you can specify a password in the P4WEBSERVICEFLAGS registry variable before the P4Web service is started.

However, if the Perforce server is using an authentication trigger, the password field in the P4WEBSERVICEFLAGS variable is required to be a ticket value rather than a password.


To satisfy the requirement for a valid ticket value for your P4Web service:

  1. Create a group:
    p4 -p server:port group groupname
  2. Add your background user to the "Users" field.
  3. Change the timeout from the default setting of 43200 seconds (12 hours). The new value depends on the server version:
    • 2008.1 and later: Set this value to 320000000 (over ten year).
    • 2005.1 to 2007.3: Set this value to zero.
    • 2004.2 and earlier: Set this to a very large value that does NOT exceed the "Unix Epoch" limitation (January 19, 2038). A good value is 320000000 seconds (over 10 years).
    Note: Setting this value to "unlimited" or 0 (zero) does not work as expected in server versions that support those values (2005.1 through 2008.1). As that value is 0, the technically larger amount of time set in any other group to which the background user belongs will limit that user's timeout to that value.

    Note: Server versions 2008.2 and later will no longer allow the timeout to be set to 0 (zero). Setting to zero will generate an error when you attempt to save the group:
    Error in group specification.
    Error detected at line 31.
    Invalid maximum value '0'.
    Hit return to continue...
    Setting this value to "unlimited" will still work as an equivalent to the zero timeout value.
  4. Save the group.
  5. On the P4Web host machine, login the background user :
    p4 -p server:port -u backgrounduser login 
    • Get the ticket value for the background user:
      p4 -p server:port tickets
      The ticket value is a hexadecimal string similar to "E6DD4B01B38E94113EC51AE46C0664CD"
    • Stop the P4Web service.
    • Set the P4WEBSERVICEFLAGS variable for the background user with the -P flag, using the ticket value in place of a password:
      p4 set -S "Perforce Web" P4WEBSERVICEFLAGS="-b -P your-ticket-value-here" 
    • Set up the other variables for the Perforce Web Service (if necessary):
      p4 set -S "Perforce Web" P4PORT=server:port
      p4 set -S "Perforce Web" P4USER=user-name
      p4 set -S "Perforce Web" P4WEBPORT=port-to-listen-on
      p4 set -S "Perforce Web" P4CLIENT=client-name
    • Restart the P4Web service.
    The server now starts up in browse mode without authentication.
    Related Links



    Was this article helpful?



    Please tell us how we can make this article more useful.

    Characters Remaining: 255