Remote Reports Internals
Remote reports allow a local URL to dynamically retrieve and use remotely hosted content. This resolves how to provide highly fresh updated content to self hosted servers without unduely opening security. The flow is broadly
- User is browsing https://privatehost/SomeInternalReport.htm
- They click a link "Monthly Sales Report", which should be the latest version of MonthlySalesReport.htm for this retailer (ie, this is not a standard Fieldpine file but a custom page).
-
If the HREF for this link is
<a href="/report/rr/...">Monthly Sales Report</a>
then Remote Report logic applies and the path specified in "..." can be dynamically downloaded and returned as if it was a local file -
The problem is, that if the local link to "Monthly Sales Report" was given as
<a href="https://mycentralserver.example.com/MonthlySalesReport.htm">Monthly Sales Report</a>
then the browser would follow the link to that page; BUT that host would have no access to the local content and data stored at https://privatehost
Fieldpine use /report/rr reports internally as well to deploy content from Fieldpine servers for specific use cases.
How a /report/rr/... link is resolved
Assume the URL being resolved is /report/rr/MonthlySales.htm
- Standard security and firewall checks for the URL are applied
- The local path on the disk is checked for remotereports\MonthlySales.htm (the cached file name)
- If the setting "ReportRRMode" is set to "dev", then the folder remotereportdev is checked first for a local copy, and if present is returned. This is a bypass for developers to shortcut the process while developing reports. You should not use this setting for production use and we may change how development is permitted in future.
- If that file is found and is reasonably fresh, it is returned. We do not retrieve the file on every fetch, only after mandatory cache timeouts
- (Version P256, 15 Feb 2023) If the file is not found, and the first character of the URL is an underscore (for example the URL is "_Xyz/MonthlySales.htm") then
- The setting "ReportRR.identifier.HostAndPrefix" is fetched. For /report/rr/_Xyz/MonthlySales.htm the setting fetched would be "ReportRR.Xyz.HostAndPrefix"
Note that the identifier is in the original URL case - If this setting is defined, the result is added as a Host. Setting values should include protocol and any path prefix, such as
- https://otherserver.com/Our/Internal/Reports
- The value of identifier must be your membership key (a value that looks like KEPYSJGJRNMEOBHEHGHBEF). We may block any identifier that is not a currently active membership
- The setting "ReportRR.identifier.HostAndPrefix" is fetched. For /report/rr/_Xyz/MonthlySales.htm the setting fetched would be "ReportRR.Xyz.HostAndPrefix"
- If the first character is not underscore, a range of Fieldpine hosts are selected to query
- If the setting "GdsProdPathVersion" has a value, a version specific path is requested from the host(s)
- The file is requested from the host(s) if not already downloaded
- If the file is retrieved, it is saved as the cached file name and returned to the caller
- If the file is not located, the user receives an empty "200" response. This may change in future versions
Providing Reports from a Membership
Memberships can provide /report/rr reports from a private host, but that host must be predefined.
- Assume your Membership ID is KEPEPEPEPJSKSJS
- Send a setting to your members. This is a static step and done to authorise your membership and host
ReportRR.KEPEPEPEPJSKSJS.HostAndPrefix = https://yourhost.xyz/path
- You can now use URLS that begin with /report/rr/_KEPEPEPEPJSKSJS/ on client sites.
-
For example, the client URL
/report/rr/_KEPEPEPEPJSKSJS/abc.htm
will fetch the page fromhttps://yourhost.xyz/path/abc.htm
and return the contents