These are some security issues that are commonly addressed, but may differ based on your organization and changing security requirements. The following security considerations are just a few that you may want to implement, but this is not a comprehensive list. We recommend following the best practices for your web server to ensure that your environment is secure.
Recommended measures to ensure the security of your environment include setting up a reverse proxy and implementing the Content-Security-Policy HTTP header, among others.
Additionally, the web service exposes several documentation endpoints that are accessible without authentication. You may want to restrict access to these endpoints in production environments to improve security.
Setting up a reverse proxy
Set up a reverse proxy to bolster the security of your Web Application. This ensures that any data received from users will be subject to client-side input validation, even if the user disables any client-side controls. You can use Application Request Routing (ARR) as your reverse proxy.
To use ARR for Microsoft IIS:
- Enable ARR as a proxy:
- Open IIS Manager.
- Select the server node.
- Double-click Application Request Routing Cache.
- In the right-side panel, select Server Proxy Settings.
- Check the Enable proxy checkbox.
- Select Apply.
- Enable forwarding of the original client IP:
- In the Custom Header section of the Server Proxy Settings,
make sure that
X-Forwarded-Foris entered in the Preserve client IP in the following header input field.This automatically adds or appends the
X-Forwarded-Forheader to requests forwarded by ARR.
- In the Custom Header section of the Server Proxy Settings,
make sure that
Implementing the Content-Security-Policy HTTP header
We recommend implementing the Content-Security-Policy (CPS) HTTP header, which provides additional security from client-side attacks, e.g., cross-site scripting. The specific implementation of the CSP header depends on your application configuration, but OWASP provides general instructions.
At a minimum, you should use the CPS header with the directive
default-src, as well as:
script-srcto restrict script executionframe-ancestorsto prevent framing attacks
To implement the CPS HTTP header:
- Open IIS Manager.
- Select your site from the tree on the left.
- Double-click HTTP Response Headers.
- In the pane on the right, select Add.
- Enter the following values:
- Name:
Content-Security-Policy - Value:
default-src 'self'; script-src 'self'; frame-ancestors 'self';
- Name:
- Select OK.
- Restart the site, if needed.