CData Arc is a web application that uses several endpoints in the application for its communications. The resources in CData Arc that support external communications include:
-
the /pub/Receive.rsb endpoint that receives AS2, AS4 and RNIF communications
-
the /pub/ReceiveGISB endpoint that receives GISB communications
-
a /src/oauthCallback.rst endpoint that serves as the callback URL when creating an OAuth connection
-
the /connector/xxx endpoints that are published by the Webhook and API connectors
-
the /api/flow/xxx endpoints that are published when creating a Flow API
These resources often need to be made available to external partners or application administrators for access outside of the local network.
Because CData Arc is a web application solution, there can be multiple valid URLs that can reach the application at a given time.
Consider this sample scenario:
The web server hosting CData Arc has been configured with both a plain text port (in this example, port 8001), and an SSL/TLS port (in this example, 8401) on a machine named ARC1 on your local network, with a local IP address of 10.0.aaa.bbb.
Additionally, the registered public domain of arc.mydomain.com and public IP address ddd.eee.fff.ggg is pointing to this machine with traffic open on ports 8001 and 8401.
In such a scenario, each of the following could be a valid URL, depending on where you are coming from:
Outside of your local network:
http://arc.mydomain.com:8001/pub/Receive.rsb
https://arc.mydomain.com:8401/pub/Receive.rsb
http://ddd.eee.fff.ggg:8001/pub/Receive.rsb
https://ddd.eee.fff.ggg:8401/pub/Receive.rsb
Within your local network:
http://ARC1:8001/pub/Receive.rsb
https://ARC1:8401/pub/Receive.rsb
http://10.0.aaa.bbb:8001/pub/Receive.rsb
https://10.0.aaa.bbb:8401/pub/Receive.rsb
And on the same machine:
http://localhost:8001/pub/Receive.rsb
https://localhost:8401/pub/Receive.rsb
http://127.0.0.1:8001/pub/Receive.rsb
https://127.0.0.1:8401/pub/Receive.rsb
Note that except for the local scenarios, it is the responsibility of the network administrator to ensure that there is a clear network path to the provided URL. If the public domain of arc.mydomain.com was pointing to this machine, but the traffic on port 8401 was not available, or if traffic from some IP addresses was blocked, the public URLs would not be reachable.
If CData Arc can support multiple URLs, how does it know what URL to display when publishing the Receiving URL or performing operations that require a URL such as an OAuth authorization?
The short answer is that it does not know what URLs are valid and what are not, but the value you see is calculated by one of the following:
In the Settings (cogwheel) -> Advanced -> Advanced Settings section of the application, you will find a Base URL:
If a Base URL is configured by the application administrator, this is used to complete the URL in every location where a URL is dynamically rendered:
NOTE: The validity of the Base URL is determined by the application administrator. The example above assumes that the network administrator has already registered the domain arc.mydomain.com, allowed traffic on the supported ports, and allowed traffic from any external IP addresses that need to access those resources.
If Base URL is not set, the URL is calculated at run time by determining the URL that was used to access the application. Connect from localhost, and you will see localhost addresses:
Connect from an IP address, and you’ll see that instead:
Note that while this will generally reflect the URL that you used to log in to the application, the application is inspecting the request headers to determine this, so if you have your traffic routed through any kind of gateway, you’re likely to see headers relative to the location of the gateway.
Because of this, setting the Base URL is the most reliable way to ensure that the URL’s displayed in the application are correct – just bear in mind that because the application is not aware of every valid path to the server, it is incumbent on the application administrator to ensure that the Base URL is valid based on how the application is hosted.