<?xml version="1.0" encoding="UTF-8"?>











<rss version="2.0">
  <channel>
    <title>Amsetwiki: Web Service Security</title>
    <link>http://socket3.leeds.ac.uk:8080/amsetwiki/</link>
    <description>Wiki for JISC AMSeT Project</description>
    <language>en-us</language>
    <generator>JSPWiki 2.8.1</generator>
    <item>
      <link>http://socket3.leeds.ac.uk:8080/amsetwiki/Wiki.jsp?page=Web%20Service%20Security&amp;version=-1</link>
      <title>Web Service Security, version -1</title>
      <description>clayton created this page on Wed May 13 21:12:10 BST 2009:&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;h4 id="section-Web+Service+Security-TheSOAPSecurityHeaderElement"&gt;The SOAP Security Header Element&lt;a class="hashlink" href="#section-Web+Service+Security-TheSOAPSecurityHeaderElement"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;a class="external" href="http://docs.oasis-open.org/wsbpel/2.0/CS01/wsbpel-v2.0-CS01.html"&gt;WS-BPEL specification&lt;/a&gt;&lt;img class="outlink" src="/amsetwiki/images/out.png" alt="" /&gt; recommends the use of WS-Security to secure workflows.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Alfresco implements the UsernameToken Profile of the &lt;a class="external" href="http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html"&gt;WS-I Basic Security Profile 1.0&lt;/a&gt;&lt;img class="outlink" src="/amsetwiki/images/out.png" alt="" /&gt;.  A SOAP message is given below showing a UsernameToken security header.  There are four principal elements: &lt;tt&gt;Created &lt;/tt&gt;and &lt;tt&gt;Expires &lt;/tt&gt;timestamps, a &lt;tt&gt;Username &lt;/tt&gt;and a &lt;tt&gt;Password&lt;/tt&gt;.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;Username&lt;/tt&gt; corresponds to the name of the Alfresco administration account used to retrieve the security ticket from the Authentication Service and the Password is the corresponding &lt;tt&gt;Ticket&lt;/tt&gt; string.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;The timestamps define the Time To Live (TTL) for the ticket. In this case any Web service request reaching Alfresco more than 5 minutes after the issue of the security ticket will result in an exception being thrown.  The maximum permissible TTL is set programatically using the &lt;tt&gt;WSHandlerConstants.TTL_TIMESTAMP&lt;/tt&gt; constant.  Presumably it is pointless to set an &lt;tt&gt;Expires &lt;/tt&gt;timestamp later in time than &lt;tt&gt;Created &lt;/tt&gt; by an amount greater than the &lt;tt&gt;WSHandlerConstants.TTL_TIMESTAMP&lt;/tt&gt; which defaults to 5 minutes. &lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;
&amp;lt;env:Envelope xmlns:env=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; 
              xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; 
              xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;
    &amp;lt;env:Header&amp;gt;
        &amp;lt;Security xmlns=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;quot;&amp;gt;
            &amp;lt;Timestamp xmlns=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot; 
                       ans1:Id=&amp;quot;&amp;quot; 
                       xmlns:ans1=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot; 
                       xmlns:ns1=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot;&amp;gt;
	        &amp;lt;ans1:Created&amp;gt;2007-08-01T12:13:37+01:00&amp;lt;/ans1:Created&amp;gt;
		&amp;lt;ans1:Expires&amp;gt;2007-08-01T12:18:37+01:00&amp;lt;/ans1:Expires&amp;gt;
            &amp;lt;/Timestamp&amp;gt;
	    &amp;lt;UsernameToken xmlns:wsse=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;quot; 
                           xmlns:wsu=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&amp;quot;&amp;gt;
	        &amp;lt;Username&amp;gt;admin&amp;lt;/Username&amp;gt;
		&amp;lt;Password Type=&amp;quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText&amp;quot;&amp;gt;TICKET_de9b08df-4017-11dc-8ec5-41f7efb0a5f7&amp;lt;/Password&amp;gt;
	    &amp;lt;/UsernameToken&amp;gt;
	&amp;lt;/Security&amp;gt;
    &amp;lt;/env:Header&amp;gt;
    &amp;lt;env:Body&amp;gt;
        
    ....

    &amp;lt;/env:Body&amp;gt;
&amp;lt;/env:Envelope&amp;gt;
&lt;/pre&gt;
&lt;p /&gt;
&lt;p /&gt;</description>
      <pubDate>Wed, 13 May 2009 20:12:10 GMT</pubDate>
    </item>
  </channel>
</rss>

