Knowledge Base Administration Guide

file:// proxying (aka proxypaths)

Simscope can be optionally configured to proxy local filesystem files through Simscope URL's within the browser.

  • The allows publishing Regression metadata or Job metadata with file:// links, that users can click on and view within their web browser.

  • You can use proxying for any artifacts emitted from a regression.

For example, a user can click on a "Coverage Report" link inside a Regression, and view an HTML coverage report proxied through Simscope's URL.

Proxy Security Warning

Warning: for security purposes, when enabling file proxy, you should use the most specific paths possible. Otherwise you may accidentally expose other user's files through Simscope.

Do not try to proxy a top-level path like / or /home or /proj directly.

→ Instead, you should proxy a more specific path like: /home/shareduser/regr/


Purpose

Modern browsers in general do not allow links from http:// or https:// web sites to local file:// links, for security.

This means if you try to link to a coverage report on the filesystem, browsers will block the hyperlink click.

  • However, using a proxy within Simscope allows users to click through.

How to use?

To use this, just prefix your path inside Regression Metadata with file://

  • For example, /foo/bar/baz becomes file:///foo/bar/baz

Note: this is not currently hooked to job paths. If you want this feature, contact VerOps.

Proxy Limitations

  1. The path must be absolute on the filesystem. Relative paths likely will not link correctly.
  2. Currently this is limited to file paths. If you link to a directory, Simscope will not render the directory contents.

Example

If you publish a Regression with metadata containing this custom_metadata:

"custom_metadata": [
    ["Coverage Report", "file:///proj/myproject/regr/abc/123/coverage_report.html"]
]

Simscope can be configured to automatically intercept the file:// path, and redirect the user within the browser like this:

Proxy

Internally, Simscope automatically converts the file:// path to a magic Simscope http:// (or https://) URL, like this:

# (Debug Note: this URL is generated within Simscope.
#  **DO NOT** publish this URL inside your custom_metadata)
# > http://simscope:port/proxy/myproject/regr/abc/123/coverage_report.html
# Or if you have Simscope https enabled, the link will be https:
# > https://simscope.machine.com/proxy/myproject/regr/abc/123/coverage_report.html

Config: Enabling Proxy Paths

To enable file:// proxying in Simscope, add one or more proxypaths to your simscope.config file.

This example adds two proxy paths, which will be intercepted from file:// links:

  1. /proj/myproject/regr/
  2. /tmp/
[server]
# Enable file:// paths to proxy through Simscope
# (Note: this example adds 2 paths)
proxypaths = "/proj/myproject/regr/"
proxypaths = "/tmp/"