Setting the Query Mode of a MIRC Storage Service

From MircWiki
Revision as of 21:50, 10 May 2010 by Johnperry (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article describes the query modes which are available for MIRC storage services. It is intended for MIRC site administrators who want to control which documents are listed in query results.

Storage services can be operated in either the "open" query mode or the "restricted" query mode.

In open query mode, a storage service reports all matching documents, whether the user has the permission to view the actual documents or not.

In restricted query mode, a storage service reports matches for only those documents that the user is permitted to view. If the user issuing the query is not logged in, he will only see matches for public documents. If the user is logged in, he will see matches for public documents plus those for documents which his credentials allow him to view.

To set the query mode of a storage service:

  1. Log into the MIRC site as an administrator.
  2. In the Admin menu on the query page, select "Storage Service Admin" and choose the storage service.
  3. On the next page, click the "Update Configuration" button in the Storage Service column.
  4. In the resulting page, change the "Query Mode" field (the second line in the table) to "restricted".
  5. Click the "Update storage.xml" button at the bottom of the page.

This is the process involved in restricted query responses:

A user on a MIRC site has what is called a "passport". A passport contains "visas". A visa contains the user's username and password on one storage service. A user's passport on a MIRC site automatically contains visas for all the storage services that are on that MIRC site. Such storage services are called "local" storage services. A user can create visas for storage services on other sites that are known to the MIRC site's query service, i.e. non-local storage services. (To create a visa, go to "My Stuff" >> "My Account" and enter credentials in the table of storage services.) Whenever a query service sends a query to a storage service for which the user has a visa, it includes the user's visa in the query. When a storage service which is operated in restricted query mode receives a query, it uses the visa to determine the permissions of the user. If no visa is provided in the query, the storage service considers the user not to be authenticated and returns only matches for public documents.

This is all automatic within a single MIRC site. A user doesn't have to manage his passport unless he wants to query protected documents on one MIRC site from a query service on another MIRC site. This is probably a very rare situation.