<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I call a secured 'Web Service Process' with a 'Web Service Call Element'</title><link>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element</link><description>&lt;p&gt;I want to provide a secured 'Web Service Process' (means, that it requires username and password) and call this 'Web Service Process' with a 'Web Service Call Element'?&lt;/p&gt;
&lt;p&gt;Simply checking 'HTTP Basic' as authentication method on both (WS Process and WS Call) seems not to work.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 15 Jun 2016 15:45:59 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/1813</link><description>&lt;p&gt;Update:
Starting with Axon.ivy BPM Suite 6.0.4 and 6.2 WebService Processes also supports HTTP Basic authentification.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Wed, 15 Jun 2016 15:45:59 -0400</pubDate><guid>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/1813</guid></item><item><title>Answer by Dominik Regli</title><link>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/947</link><description>&lt;p&gt;As mentioned in the answer above, in newer ivy versions (4.3.24, 5.0.14 and 5.1.0 and later) we improved the &lt;em&gt;Web Service Process&lt;/em&gt; for Single Sign On Environments. With this change, users which are already authenticated by IIS respectively the ivy web-container (Tomcat) are passed through and taken over by the WS Process.&lt;/p&gt;
&lt;p&gt;This is useful, even if you are not in an SSO environment. In this case, you can also &lt;strong&gt;configure Tomcat to do 'HTTP Basic Authentication'&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here is a short description, how to set up Tomcat to do 'HTTP Basic Authentication':&lt;/p&gt;
&lt;p&gt;Add following entries to 'webapps/ivy/WEB-INF/web.xml'&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;security-constraint&amp;gt;
    &amp;lt;web-resource-collection&amp;gt;
        &amp;lt;web-resource-name&amp;gt;Secured Web Service Process&amp;lt;/web-resource-name&amp;gt;
        &amp;lt;!-- With this pattern we secure only the Web Service Processes and not any others --&amp;gt;
        &amp;lt;url-pattern&amp;gt;/ws/*&amp;lt;/url-pattern&amp;gt;
    &amp;lt;/web-resource-collection&amp;gt;
    &amp;lt;auth-constraint&amp;gt;
        &amp;lt;role-name&amp;gt;ivy-ws-role&amp;lt;/role-name&amp;gt;
    &amp;lt;/auth-constraint&amp;gt;
&amp;lt;/security-constraint&amp;gt;

&amp;lt;login-config&amp;gt;
    &amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;
&amp;lt;/login-config&amp;gt;
&amp;lt;security-role&amp;gt;
    &amp;lt;role-name&amp;gt;ivy-ws-role&amp;lt;/role-name&amp;gt;
&amp;lt;/security-role&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a users-file and place it to any location of your choice. Its content looks as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;tomcat-users&amp;gt;    
    &amp;lt;role rolename="ivy-ws-role"/&amp;gt;
    &amp;lt;user username="WSUser" password="WSUser" roles="ivy-ws-role"/&amp;gt; 
&amp;lt;/tomcat-users&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add following entriy to 'webapps/ivy/META-INF/context.xml'&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;Realm className="org.apache.catalina.realm.MemoryRealm"
       pathname="&amp;lt;path to user file&amp;gt;/tomcat-users.xml"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this, using 'HTTP Basic Authentication' for ivy &lt;em&gt;Web Service Processes&lt;/em&gt; will work and you can call it from a &lt;em&gt;Web Service Call Element&lt;/em&gt; (with 'HTTP Basic' enabled as authentication method.
Note, that in the sample above, you have to maintain the Web Service users redundantly in the Tomcat users-file and in ivy. In a production environment, you may use another realm than the MemoryRealm to receive the users for Tomcat.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominik Regli</dc:creator><pubDate>Wed, 10 Sep 2014 13:56:56 -0400</pubDate><guid>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/947</guid></item><item><title>Answer by Dominik Regli</title><link>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/943</link><description>&lt;p&gt;The ivy &lt;em&gt;Web Service Call Element&lt;/em&gt; supports following authentication methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTTP Basic&lt;/li&gt;
&lt;li&gt;HTTP Disgest&lt;/li&gt;
&lt;li&gt;NTLM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whereas, the ivy &lt;em&gt;Web Service Process&lt;/em&gt; supports only 'Basic WS Security' (cleartext username and password provided in SOAP header).
(Note, that the labels on the inscription mask of the &lt;em&gt;Web Service Process&lt;/em&gt; are actually not correct, the radio button which is labeled 'HTTP Basic' should be labeled with 'WS Security'. We will adjust this in future versions of ivy to avoid confusion.)&lt;/p&gt;
&lt;p&gt;As you can see, these authentication methods are basically not compatible. But if you are in a &lt;strong&gt;Single Sign On Environment&lt;/strong&gt; (with MS Internet Information Services (IIS) in front of ivy), IIS can do 'HTTP Basic Authentication' in place of the WS Process.&lt;/p&gt;
&lt;p&gt;So, you can configure IIS to do one of the desired authentication methods (one of HTTP Basic, HTTP Disgest or NTLM) and configure your &lt;em&gt;Web Service Call Element&lt;/em&gt; correspondingly.&lt;/p&gt;
&lt;p&gt;For your &lt;em&gt;Web Service Process&lt;/em&gt; you simply select the authentication method 'None/Container'. &lt;/p&gt;
&lt;p&gt;In this setup, the &lt;em&gt;Web Service Process&lt;/em&gt; supports (with help of IIS) 'HTTP Basic Authentication'. Since users are already authenticated by IIS, their requests are passed through and taken over by the WS Process.&lt;/p&gt;
&lt;p&gt;Note that SSO authentication is only supported for ivy versions 4.3.24, 5.0.14 and 5.1.0 and newer.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominik Regli</dc:creator><pubDate>Thu, 04 Sep 2014 10:48:43 -0400</pubDate><guid>https://answers.axonivy.com/questions/942/how-can-i-call-a-secured-web-service-process-with-a-web-service-call-element/943</guid></item></channel></rss>