In this section, we will review the various settings which you may have to adjust in order to establish communication between web services and Magic Collaboration Studio.

Change these settings only if you need to change the default installation. 

Changing properties

To change Authentication server properties


  1. Open the webappplatform.properties file at CATIANoMagicServices/WebAppPlatform/shared/conf/webappplatform.properties.
  2. Locate Authentication server properties and change the values as necessary:
# Authentication server properties
#

# Specify the Authentication server location.
# IP address or domain name.
authentication.server.ip=127.0.0.1

# Specify the Authentication server port.
authentication.server.port=8443

# Specify rest protocol (http or https) depending on the Authentication server setup.
authentication.server.protocol=https

Authserver access

If you are accessing via a hostname or FQDN, especially if you are using a signed certificate, use the applicable FQDN or hostname instead of the IP address.

If you have configured authserver to use HTTP or to run on a different port, make sure that the URI reflects the correct values.


To change Magic Collaboration Studio server properties


  1. Open the webappplatform.properties file at CATIANoMagicServices/WebAppPlatform/shared/conf/webappplatform.properties.
  2. Locate Magic Collaboration Studio server properties and change the values as necessary:
# Specify the Magic Collaboration Studio IP address or domain name.
twc.ip=127.0.0.1

# Specify rest protocol (http or https) depending on the Magic Collaboration Studio server setup.
twc.rest.protocol=https

# Specify the Magic Collaboration Studio rest API port.
twc.rest.port=8111

Magic Collaboration Studio access

Please ensure these credentials for twc.admin.username and twc.admin.password match those of a user with administrative privileges.

If you are accessing via a hostname or FQDN, especially if you are using a signed certificate, use the applicable FQDN or hostname instead of the IP address.

If you have configured Magic Collaboration Studio to use HTTP or to run on a different port, make sure that the URI reflects the correct values.

If you change any of the configuration parameters, you will need to restart the WebApp service.

Setting server protocol

By default, in order to enforce a higher level of security, web services are accessed via HTTPS. In order to change the mode of operation to HTTP, various configuration changes must be made.

We do not recommend changing HTTPS to HTTP. Perform this only if necessary.


The default port for web services is 8443. In this example, we will make the changes necessary to run over HTTP on the default port of 8443.

The WebApp server configuration is located in CATIANoMagicServices/WebAppPlatform/conf/server.xml.

The following section:

    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

needs to be edited to:

    <Connector executor="tomcatThreadPool"
               port="8443" protocol="HTTP/1.1"
               connectionTimeout="20000" />

The changes which we implemented consist of changing the port from 8080 to 8443, and removing a redirect that would route to the handler on port 8443.

Since we have configured this connector to listen on port 8443, we now need to remove the existing connector handler on port 8443.

The following section:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
               maxThreads="150" SSLEnabled="true">
      <SSLHostConfig>
        <Certificate certificateKeystoreFile="../configuration/keystore.p12"
                     certificateKeystorePassword="nomagic"
                     type="RSA" />
      </SSLHostConfig>
    </Connector>

needs to be commented out as follows:

<!--   
 	<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
               maxThreads="150" SSLEnabled="true">
      <SSLHostConfig>
        <Certificate certificateKeystoreFile="../configuration/keystore.p12"
                     certificateKeystorePassword="nomagic"
                     type="RSA" />
      </SSLHostConfig>
    </Connector>
-->

By default, due to security reasons, we have established a security policy requiring access to be encrypted. To disable this, we need to edit CATIANoMagicServices/WebAppPlatform/conf/web.xml. This section is located at the very bottom of the file.

The following section:

<security-constraint>                             
    <web-resource-collection>                      
        <web-resource-name>webapp</web-resource-name>
        <url-pattern>/*</url-pattern>                    
    </web-resource-collection>                              
    <user-data-constraint>                          
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint> 

needs to be edited as follows:

<security-constraint>                             
    <web-resource-collection>                      
        <web-resource-name>webapp</web-resource-name>
        <url-pattern>/*</url-pattern>                    
    </web-resource-collection>                              
    <user-data-constraint>                          
        <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
</security-constraint> 

Changing port

In the next example, we will configure web services to run HTTPS on a different port (8444).

The following code section:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
               maxThreads="150" SSLEnabled="true">
      <SSLHostConfig>
        <Certificate certificateKeystoreFile="../configuration/keystore.p12"
                     certificateKeystorePassword="nomagic"
                     type="RSA" />
      </SSLHostConfig>
    </Connector>

needs to be edited as follows:

<Connector port="8444" protocol="org.apache.coyote.http11.Http11NioProtocol"
               sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
               maxThreads="150" SSLEnabled="true">
      <SSLHostConfig>
        <Certificate certificateKeystoreFile="../configuration/keystore.p12"
                     certificateKeystorePassword="nomagic"
                     type="RSA" />
      </SSLHostConfig>
    </Connector>

The only change is the definition of the port number, which changed from 8443 to 8444.


If you change the protocol or the port from the default, you need to edit authentication.redirect.uri.whitelist located at CATIANoMagicServices/WebAppPlatform/shared/conf/authserver.properties accordingly.