Configuring Tomcat
The INUBIT software uses Tomcat.
The following table provides an overview of several configuration options:
Annotation
In order to be able to access URLs (e.g. via browser) within the Tomcat, i.e. an application located in the Tomcat (such as INUBIT), these are secured with credentials. Since all calls run through the Tomcat, they are also secured at this level.
When a URL is called, Tomcat resolves all configured roles accordingly and only allows access to these configured roles with the stored credentials.
By default, the credentials are stored in the tomcat‑users.xml
file.
Example implementation within the INUBIT default installation
-
Tomcat
server.xml
A so-called Realm is defined, which contains the users and passwords. The Realm points to the file
tomcat‑users.xml
. You can also change it later, refer to https://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html. -
INUBIT
web.xml
Example: Role
ibisaccess
is allowed to access the resourceList Web Services Servlet
.<security-constraint> <web-resource-collection> <web-resource-name>List Web Services Servlet</web-resource-name> <url-pattern>/listServices</url-pattern> </web-resource-collection> <auth-constraint> <role-name>ibisaccess</role-name> </auth-constraint> </security-constraint>
xmlThis procedure applies to any application within the Tomcat. One or more role names can be referenced that should have access to this resource.
-
INUBIT
tomcat-users.xml
Example: User
root
for roleibisaccess
<tomcat-users xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" version="1.0"> <role rolename="ibisaccess"/> <user username="root" password="myPassword" roles="ibisaccess"/> </tomcat-users>
xml
When calling the resource https://<server>:<port>/ibis/listServices
the username root
and password myPassword
are valid credentials and will be allowed through.
All other credentials are rejected and the content of the resource is not displayed.
If you add further applications in Tomcat, e.g. Tomcat Manager, AS4 Gateway and define further URLs with role reference in the |