Exposing web URLs

In an ITP/OnLine ASP.NET application that is running in Secure Mode, content that is present in the application folder is not exposed to the web by default. To expose a certain file through a web URL, it must be listed in the file securemode-urls.xml, which can be found in the root of the application folder. Changes to this file are applied when the application is deployed. This can be done from the ITP/OnLine ASP.NET main configuration page.

The format of the file securemode-urls.xml is as follows:

<?xml version="1.0" encoding="UTF-8" ?> 
<itp:secure-mode-urls xmlns:itp=
   "http://www.aia-itp.com/namespaces/online-secure-mode-urls/1"> 
  <itp:exposed> 
    <itp:pattern pattern="/modelbegin.aspx" /> 
    <itp:pattern pattern="/css/*.css" /> 
    <itp:pattern pattern="*.js" /> 
  </itp:exposed> 
</itp:secure-mode-urls>

This example contains three itp:pattern entries. Each itp:pattern entry specifies a pattern for URLs that are exposed. All URL patterns are specified relative to the application folder.

Three types of patterns are supported; single URLs, sets of URLs in a specific folder, and sets of URLs in any folder.

Customizing securemode-urls.xml

The SecureSample applications that is installed with ITP/OnLine ASP.NET contains an example securemode-urls.xml. This file exposes the URLs that must be exposed for the SecureSample application to function properly. When building a custom application based on the SecureSample application, the developer should always modify securemode-urls.xml to expose only the URLs that are required by the specific application. This may involve exposing additional URLs, but it it is also advisable to remove any URLs that are not required by the custom application. The following is a list of URLs that are provided by ITP/OnLine ASP.NET and that may need to be exposed or unexposed. The column Exposed by default? indicates whether a URL is exposed in the default configuration of SecureSample.

URL

Exposed by default?

Description

/download.aspx
/opendocument.aspx

Yes

Required when PDF previews are used.

/textblockview.aspx
/viewtextblock.aspx

Yes

Required when Text Block preview is used.

/xml2html.aspx /html2xml.aspx /editorpage.aspx
/fieldimage.aspx

Yes

Required when Editable Text Block Questions are used in dynamic forms, or when TEXTBLOCK questions are used in FORM statements in ITP Models.

/empty.aspx

Yes

Required by the sample applications to display an empty frame.

/upload.aspx

Yes

Required when FILE questions are used in FORM statements in ITP Models, and when the ActiveX file upload control is enabled.

/modelbegin.aspx

Yes

This is a customizable page, the starting point for all model runs.

/runmodel.aspx

Yes

Required for all model runs.

/modelend.aspx

Yes

This is a customizable page, the end point for all model runs.

/modelsuspend.aspx

No

This is a customizable page, which is loaded when the end user uses the button Suspend. The default implementation sends the suspended model run information to the web user as a downloadable file.

/modelresume.aspx

No

This is a customizable page which can be used to resume a model run that was suspended by the page modelsuspend.aspx. The default implementation allows the user to upload a file containing model run information. This is considered a security risk, so the page is not exposed by default.

/modelselect.aspx

Yes

This is a customizable page, the starting point for all model lists.

/listmodels.aspx
/openfolders.aspx
/modelselected.aspx

Yes

Required for model lists, used by the default implementation of modelselect.aspx.

*.js
*.png
*.gif
*.jpg
*.htm
*.html
*.css

Yes

ITP/OnLine ASP.NET ships files with these extensions that should be available through the web. Because files with these extensions are normally public web content, they are exposed by default in the sample applications.

When exposing custom content through securemode-urls.xml, we advise to be as specific as possible. The reason for this is that ITP/OnLine ASP.NET may ship files that should not be exposed, and that could be inadvertently exposed when an overly broad pattern is used. For instance, it is not wise to expose the patterns "*.xsl" or "*.xml", because that will expose various internal ITP/OnLine files. It is acceptable, however, to expose the more limited "/myfolder/*.xml".