IMPORTANT!!!
The purpose of this setup should be to provide access for an external programmer. All of the integrators like Silverfin, Belcofin, Comax, .... will not need this kind of setup. They will implement their own client within te same network and will address the API directly from within the network.
We strongly advise to use a SSL certificate that can be implemented by your network admin.
We also recommend IP restrictions to enhance security.
As an alternative you could provide a remote access via RDS , Teamviewer or simular remote access tool and provide the access for your programmer. Like that way he/she can work driectly in your environment and public access is bypassed this way.
IIS Forwarding
While you can configure forwarding from any web server, this guide covers IIS configuration procedure only.
You can create a website in IIS and use it as a proxy for forwarding API reques ts. This is handy if for security reasons you do not want to make the Hermes Consult API host name or address public. In this case, you can create a website with a short and user-friendly name and configure it to redirect requests to a server that hosts Hermes Consult API and actually processes RESTful API requests. You can also configure authentication and authorization on IIS side.
For example, instead of addressing requests to http://localhost:2100/api/v1/customers endpoint, you can send them to https://mycompany/consultapi/api/v1/customers
Configure IIS Forwarding
The procedure below applies to IIS 10 integrated with Windows Server 2012 R2.
1) Make sure the Web Server role is installed on your server. Install the following components
2) Create IIS website. To do this, navigate to Start → Windows Administrative Tools (Windows Server 2016) or Administrative Tools (Windows 2012 R2 and below) → Internet Information Services (IIS) Manager. In the left, expand your_computer_name → Sites and select Add Website in the Actions pane. Create a website and configure authentication if necessary.
3) Enable Application Request Routing.
Rightclick Application request Routing Cache and select -> Open Feature,
in the right pane click -> Server Proxy Settings
Check the "Enable Proxy" check box. Leave the default values for all the other settings on this page:
4) In your site settings, double-click URL Rewrite and select Add Rule(s).
5) In the Select a rule template dialog that opens select blank rule
6) On the Edit Inbound Rule page, complete the following fields and click Apply:
Option |
Set to... |
---|---|
Match URL |
|
Requested URL |
Matches the Pattern |
Using |
Regular Expressions |
Pattern |
consultapi/(.*) NOTE: In this case all requests containing "consultapi" will be forwarded. For example, https://mycompany/consultapi/customers. |
Ignore case |
Checked |
Action |
|
Action type |
Rewrite |
Rewrite URL |
http://host:port/{R:1} where host:port is the name or IP address of the computer where Hermes Consult API Server resides and port opened to communication. For example: http://localhost:2100/{R:1} |
Append query string |
Checked |
Log rewritten URL |
Cleared |
Stop processing of subsequent rules |
Checked |
Now you can send requests to your website that will forward them to proper Hermes Consult API endpoints.
Commentaires
0 commentaire
Vous devez vous connecter pour laisser un commentaire.