2.2.4 Resources

Resources are stored on the TSWPP server in memory and comprise the list of resources that are used to generate the XML files (section 3.1.1.2) that are sent to the TSWPP client. The data stored for a resource includes the following:

A client MUST be able to authenticate to the TSWPP server before the client can retrieve the XML file (section 3.1.1.2) containing the list of resources. A client MUST request the XML file from the TSWPP server, and the server MUST respond to requests from a client for the XML file containing the list of resources, as specified in section 2. The mechanism by which the XML file (section 3.1.1.2) contents are assembled is server implementation-specific. The server SHOULD receive a user identity as shown in the figures in section 3.1.5, and it SHOULD use that identity to create a customized XML resource list for that user. How the XML resource list is customized or if is customized at all is up to the server implementation. This is done by including only <ResourceFile> elements that the user can access.

If the server is configured to customize the XML resource list for each user, each user can have a different XML resource list returned from a TSWPP server. The server SHOULD cache the information used to generate the XML file (section 3.1.1.2), so that the server can quickly respond to requests for the list of resources.

If the XML resource list that the client requests from the server is not available, the server MUST return an HTTP "404 Not Found" error code [RFC7230].

The client implementation can run in two modes: "install" mode and "catalog" mode. The client implementation makes some of the resources described in the XML resource list available to the user by installing them in a manner that allows easy user access to the resources. The client implementation SHOULD use the ShowByDefault attribute to determine which resources to install (section 2.2.2.3.1). In addition, the client implementation stores the XML resource list locally and updates it at least every 24 hours through new TSWPP transactions.

The client SHOULD make efforts to keep the locally stored XML resource list up-to-date. The client SHOULD accomplish this by periodically retrieving a new copy of the resource list from the server. The method of triggering this periodic retrieval of the XML resource list is specific to the client implementation. The client MAY trigger retrieval of the XML resource list by using a periodic task scheduler provided by the client operating system.

The client SHOULD prevent resource files with unsafe file extensions from being downloaded. This SHOULD be done before downloading by checking the FileExtension attribute of the <ResourceFile> element section 2.2.2.1.9 and determining whether the file extension listed in that attribute is registered as being safe. Which file extensions are considered safe and the manner in which they are registered as safe for download with the client is a detail of the client implementation. The server has no concept of safe or unsafe file extensions.

If the server returns an HTTP "404 Not Found" error code [RFC7230] when the client is connecting on the initial attempt to set up a workspace, the client SHOULD NOT set up a workspace and SHOULD warn the user that the connection could not be made. If the server returns an HTTP "404 Not Found" error when the client is connecting in order to update workspace resources that were previously downloaded, the client SHOULD log a warning but leave the existing resources untouched.