LISTSERV mailing list manager LISTSERV 16.0

Help for ZNG Archives


ZNG Archives

ZNG Archives


[email protected]


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

ZNG Home

ZNG Home

ZNG  June 2004

ZNG June 2004

Subject:

Re: ZeeRex Records (also Attn Theo)

From:

"Matthew J. Dovey" <[log in to unmask]>

Reply-To:

Z39.50 Next-Generation Initiative

Date:

Tue, 22 Jun 2004 16:11:18 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (180 lines)

> DDTT.
> If you're stuck behind such a monster, then use either string 
> packing or expect that -your client- is going to have such 
> issues. That has nothing to do with the -server- which can 
> still be legitimately expected to put namespace definitions 
> where we want it to.

But if my server is behind such a firewall - for example if my
institution runs such a firewall (which will become increasingly likely
- especially with commercial institutions), then it will effect anyone
accessing my server.

> As I understand it, you have to wrap the entire thing in a 
> <Signature> element, then you have another service which 
> checks the signature, unwraps it and returns the original 
> xml?  And this is -required- to return the canonical form?

No - you add a signature digest in the SOAP header but you don't change
the XML tree (but possibly the serialized XML) of the SOAP:body - that
way any client can still understand the response but a WS-Security aware
will be able to check the signature. However part of this process is to
convert the message part you are signing to (exclusive) canonical form.
An example of a signed SRW response below (as I'm signing the whole
response, I have to move all namespaces up to SRW:searchRetrieveResponse
- in this case I've used string packing to avoid moving the record
namespaces).

Actually the signing bit needed actually send canonical XML for the bit
it signs, but it probably will.


>You could have a client behind a firewall that turns the 
>message into morse code and transmits it via ham radio 
>for all the server and the protocol specification could care.

And if you are using something like XOP (optimised binary transmission
of XML), something like this may indeed be happing. But such a thing
would transmit the XML tree *not* the literal XML (XOP certainly encodes
the XML tree rather than the literal XML), so the thing at the other end
converting back from morse code to XML will render the same XML tree but
not necessarily the same literal XML.

As the client and server have no control over what might happen to the
literal XML in transit. XOP routers, XML over morse routers etc are only
required to preserver the XML tree in transit not the literal XML text.
So an SRW client cannot rely on anything intrinsic to the literal XML
over the XML tree, unless it has full control over the route from server
to client. This is why signing needs an canonical form.

> But the whole reason we're using the XML flavour of 
> abstract-tree-that-you-represent-as-a-stream-of-bytes
> rather than (say) BER-encoded GRS-1 is to make a world where 
> this kind of hack can work. 

This kind of hack has never worked (properly) - in XML you have
namespaces, Entities and other such references which will break this
kind of hack - and even when this kind of hack does work then it is
definitely regarded as *bad* practice (far worse than putting entities
in the root elements, which is both common practice and canonical form).

Incidently, it was interoperability problems cause by "laziness" (SOAP
tools which broke if the namespace prefix wasn't the string "SOAP", for
example) that motivated the WebService Interoperatbility profile work...

> it seems at best rude for SRW 
> servers or hypothetical intermediaries to build XML which, 
> while technically legal, spoils this property.

These are not hypothetical imtermediaries - these are real products you
can buy today (http://www.reactivity.com/products/index.html,
http://www.xtradyne.com/products/ws-dbc/ws-dbc.htm). Such products will
become increasingly common as the indutry worries about security.

We could take the DDTT approach - but do we want to position SRW in a
way that means SRW servers have trouble supporting WS-Security; SRW
servers wo'n't work behind WebService firewalls; accepted XML bad
practice is SRW good practice?


Matthew




Sample signed SRW response

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="..." xmlns:wsu="..." xmlns:ds="...">
  <SOAP:Header>
    <wsse:Security>
      <wsse:BinarySecurityToken ValueType="...#X509v3"
EncodingType="...#Base64Binary" wsu:Id="X509Token"> 
MIIEZzCCA9CgAwIBAgIQEmtJZc0rqrKh5i...
</wsse:BinarySecurityToken>
      <ds:Signature>
        <ds:SignedInfo>
          <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
          <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
          <ds:Reference URI="#myBody">
            <ds:Transforms>
              <ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
            </ds:Transforms>
            <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <ds:DigestValue>EULddytSo1...</ds:DigestValue>
          </ds:Reference>
        </ds:SignedInfo>
        <ds:SignatureValue> 
BL8jdfToEb1l/vXcMZNNjPOV... 
</ds:SignatureValue>
        <ds:KeyInfo>
          <wsse:SecurityTokenReference>
            <wsse:Reference URI="#X509Token"/>
          </wsse:SecurityTokenReference>
        </ds:KeyInfo>
      </ds:Signature>
    </wsse:Security>
  </SOAP:Header>
  <SOAP:Body wsu:Id="myBody">
    <SRW:searchRetrieveResponse xmlns:SRW="http://www.loc.gov/zing/srw/"
xmlns:DIAG="http://www.loc.gov/zing/srw/diagnostics/">
      <SRW:version>1.1</SRW:version>
      <SRW:numberOfRecords>2</SRW:numberOfRecords>
 
<SRW:resultSetId>8c527d60-c3b4-4cec-a1de-1ff80a5932df</SRW:resultSetId>
      <SRW:resultSetIdleTime>600</SRW:resultSetIdleTime>
      <SRW:records>
        <SRW:record>
 
<SRW:recordSchema>info:srw/schema/1/mods-v3.0</SRW:recordSchema>
          <SRW:recordPacking>string</SRW:recordPacking>
          <SRW:recordData>
            &lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;
            &lt;mods xmlns:xlink=&quot;http://www.w3.org/TR/xlink&quot; 
 
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
               xmlns=&quot;http://www.loc.gov/mods/&quot; 
 
xsi:schemaLocation=&quot;http://www.loc.gov/standards/mods/mods.xsd&quot
;&gt;
              &lt;titleInfo&gt;
                &lt;title&gt;Sound and fury : the making of the
punditocracy /&lt;/title&gt;
              &lt;/titleInfo&gt;
              &lt;name type=&quot;personal&quot;&gt;
                &lt;namePart&gt;Alterman, Eric.&lt;/namePart&gt;
                &lt;role&gt;creator&lt;/role&gt;
              &lt;/name&gt;
              ...
          </SRW:recordData>
          <SRW:recordPosition>1</SRW:recordPosition>
        </SRW:record>
        <SRW:record>
 
<SRW:recordSchema>info:srw/schema/1/diagnostic-v1.1</SRW:recordSchema>
          <SRW:recordPacking>string</SRW:recordPacking>
          <SRW:recordData>
            &lt;diagnostic&gt;
            &lt;uri&gt;info:srw/diagnostic/1/68&lt;/uri&gt;
            &lt;details&gt;Not authorised to send record&lt;/details&gt;
          &lt;/diagnostic&gt;
          </SRW:recordData>
          <SRW:recordPosition>2</SRW:recordPosition>
        </SRW:record>
      </SRW:records>
      <SRW:diagnostics>
        <DIAG:diagnostic>
          <DIAG:uri>info:srw/diagnostic/1/59</DIAG:uri>
          <DIAG:message>Result set created with valid partial results
available</DIAG:message>
        </DIAG:diagnostic>
      </SRW:diagnostics>
    </SRW:searchRetrieveResponse>
  </SOAP:Body>
</SOAP:Envelope>

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

July 2017
October 2016
July 2016
August 2014
February 2014
December 2013
November 2013
October 2013
February 2013
January 2013
October 2012
August 2012
April 2012
January 2012
October 2011
May 2011
April 2011
November 2010
October 2010
September 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
October 2009
September 2009
August 2009
July 2009
May 2009
April 2009
March 2009
February 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager