Backwards compatibility
As of release 2.64.0.0, the UserInfo Endpoint (in short Endpoint) of the nevisIDM REST services has been changed. From release 2.64.0.0 on, the Endpoint is found under "/nevisidm/api/" (instead of the old "/nevisidm/rest").
If your older REST clients must still be able to access nevisIDM, you need to make some manual adjustments: either add a rewrite filter to nevisProxy, or configure adnwildfly accordingly. Both adjustments are explained below.
Adding a RewriteFilter to nevisProxy
In order for "old" REST clients to still reach the REST service via "/nevisidm/rest", add the following RewriteFilter and filter mapping to nevisProxy (see the sample code in the code blocks below).
<filter>
<filter-name>RestRewriteFilter</filter-name>
<filter-class>ch::nevis::isiweb4::filter::rewrite::RewriteFilter</filter-class>
<init-param>
<param-name>RequestURI</param-name>
<param-value>
^/nevisidm/rest(.*):/nevisidm/api$1:PT
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>RestRewriteFilter</filter-name>
<url-pattern>/nevisidm/rest/*</url-pattern>
</filter-mapping>
See the nevisProxy reference guide for more information about the RewriteFilter.Configuring a RewriteFilter in andwildfly
If you do not use nevisProxy, it is also possible to add a rewrite filter to adnwildfly. In this case, you need to manually adjust the standalone.xml file of the nevisIDM instance.
The filter has to be added to the undertow subsystem. Proceed as follows:
- First, define the filter as shown in the next code sample:
<filters>
<rewrite name="rewrite-filter" target="/nevisidm/api$remaining"/>
</filters>
- Then, reference the filter in the host configuration (see the code sample below):
<filter-ref name="rewrite-filter" predicate="path-prefix('/nevisidm/rest')"/>
The sample code in the next code block illustrates how the adjusted subsystem should look like:
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="http"/>
<host name="default-host" alias="localhost">
<filter-ref name="rewrite-filter" predicate="path-prefix('/nevisidm/rest')"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
</servlet-container>
<filters>
<rewrite name="rewrite-filter" target="/nevisidm/api$remaining"/>
</filters>
</subsystem>
This sample configuration is for an HTTP setup. It looks slightly different for an HTTPS setup.* Restart nevisIDM to activate the added rewrite filter.