Enabling Redirection from Http to Https


 

This is used to re-direct the HTTP port to HTTPS, if you have enabled both HTTP & HTTPS ports in the server. In an ideal scenario HTTP will be open only in the local LAN network and a user who is accessing from outside the LAN can only access the server URL using HTTPS.

In such a case, there is a small likelihood that an user may not use the HTTPS string while accessing the URL. To avoid such a situation, you can make the necessary changes so that even if a user does not specify the HTTPS string, the system automatically re-directs the URL to the HTTPS enabled port.

 

Enabling Http redirection in Jboss (Patch 4096 or lower)

 

  1. Open the 'standalone.xml' which is present in  'SapphireIMS\WebManagement\standalone\configuration' folder

  2. If not present, add the parameter highlighted in bold

 

<http-listener name="default" socket-binding="http" redirect-socket="https"  max-parameters="10000" max-post-size="2147483648"/>

 

  1. Add the following line in 'standalone.xml' file to add the http connector and redirect to port 443 (if configured as the https port)

 

<connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http" redirect-port=443/>

 

  1. Restart the SapphireIMS service.

 

Enabling Http redirection in Wildfly (Patch 4097 and higher)

 

A security constraint needs to be added to define the access mechanism in the deployment descriptor of the WAR file and the steps are given below.

 

  1. Add the following lines in 'web.xml' file which is located in the '\WebManagement\standalone\deployments\SapphireIMS.War\WEB-INF' folder

 

<filter-mapping>

        <filter-name>ClickjackFilterSameOrigin</filter-name>

        <url-pattern>/*</url-pattern>

</filter-mapping>

<security-constraint>

<web-resource-collection>

<web-resource-name>Protected Context</web-resource-name>

<url-pattern>/*</url-pattern>

</web-resource-collection>

<user-data-constraint>

<transport-guarantee>CONFIDENTIAL</transport-guarantee>

</user-data-constraint>

</security-constraint>

<security-constraint>

     <web-resource-collection>

        <web-resource-name>NoAccess</web-resource-name>

 

  1. Open the 'standalone.xml' which is present in  'SapphireIMS\WebManagement\standalone\configuration' folde

  2. If not present, add the parameter highlighted in bold

 

<http-listener name="default" socket-binding="http" redirect-socket="https"  max-parameters="10000" max-post-size="2147483648"/>

 

  1. Restart the SapphireIMS service.