You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by bu...@apache.org on 2006/03/19 13:14:55 UTC

DO NOT REPLY [Bug 39029] New: - Stax verifier JSR105 implementation

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029

           Summary: Stax verifier JSR105 implementation
           Product: Security
           Version: Java 1.3
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Signature
        AssignedTo: security-dev@xml.apache.org
        ReportedBy: raul-info@r-bg.com


Hi, 
I have just finished a first implementation of Stax verifier, it only works with
enveloping signatures(well any signature that appears before the signed data),
and exclusive c14n, and no transformations.

The TODO:
[ ] Do inclusive C14n
[ ] Design the API for signed data before signature describing it.
[ ] Do Transformations

For see how to use it untar the tar in a SVN head, and see the examples in
src_unitTest/com/r_bg/stax/*

Can people wanting to use stax verification(WS guys) see if the API fits its needs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029





------- Additional Comments From chris@lotuscat.com  2006-03-22 19:56 -------
I have started to review the Stax architecture for xml security submitted in the
attachment and have a few comments:
1. Change StaxSignatureVerifcator to StaxSignatureVerifier
2. I don't see how the current structure would work with an XMLStreamReader
containing more than one signature, the code seems to start from the current
position and seek until end. I think a better "contract" might be that the
factory or filtered reader just read until a matching pair of start sig / end
sig tags are found. That way the caller could get another sig verified by moving
the XMLStreamReader forward themselves.
3. I see plenty of 1.5-isms, this may be ok, but then we need to make sure the
documentation is clear that Java 1.5+ is needed to use this part of the library.
4. Unit tests use RSA, which I believe requires a 3rd-party JCE. Perhaps having
the unit tests use DSA so they work w/o an external JCE would be better. I also
plan to use DSA in my code for this reason (don't want to require a 3rd-party JCE).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029


raul-info@r-bg.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17918|0                           |1
        is obsolete|                            |




------- Additional Comments From raul-info@r-bg.com  2006-05-27 17:09 -------
Created an attachment (id=18360)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18360&action=view)
A new version of the stax signature validator


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029





------- Additional Comments From raul-info@r-bg.com  2006-03-19 12:16 -------
Created an attachment (id=17918)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17918&action=view)
First version


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029


raul-info@r-bg.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18360|0                           |1
        is obsolete|                            |




------- Additional Comments From raul-info@r-bg.com  2006-12-15 08:20 -------
Created an attachment (id=19265)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19265&action=view)
A new patch with signature verification

Hi,
As work related to my master thesis, I have been working on this patch a
little. Now it can check if the signature was tampered, and it is much faster
and can handler any length documents (that is the main point of my master
thesis). I will publish the doc, and the powerpoint of it in my webpage. But
sadly it is written in Spanish. But anyway I think is useful as it contains
some graphics showing the memory consumption of the DOM library versus the STAX
library. 

If anybody wants to play with it have fun.

Changelog:
* Siganture & reference validation (the patch before only does reference
validation) 
* Size & Performance improvement: the patch can handle now arbitrary big
documents, and the performance is better. 

TODO:
* Inclusive C14n
* Enveloped signature verification.
* UTF16->UTF8 optimizations

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029





------- Additional Comments From raul-info@r-bg.com  2006-03-23 19:05 -------
(In reply to comment #2)
First of all thanks for your time and your comments. They are really appreciated.


> 1. Change StaxSignatureVerifcator to StaxSignatureVerifier
Done, Thanks

> 2. I don't see how the current structure would work with an XMLStreamReader
> containing more than one signature, the code seems to start from the current
> position and seek until end. I think a better "contract" might be that the
> factory or filtered reader just read until a matching pair of start sig / end
> sig tags are found. That way the caller could get another sig verified by moving
> the XMLStreamReader forward themselves.
You can ask the Filter wich signature you want using
StaxValidateContext.setSignatureNumber(int number) method, but right now is just
hardcode to the first one.
Regarding the sugestion for the "contract", I was thinking in two different Uses
cases:
  1.- Aspect oriented: A part of the code sets the expectations to the verifier
filter, and handles the stream reader to the rest of the program that are not
"Signature" aware. When the program finish reading the stream it asks the filter
for the correctness of the Signature expectations. This the current api, but
there's still a lot of things to do.
  2.- In the another use case the application is aware of the "Signature" and
notifies the Filter when the element referenced begins, and to what signature it
belongs. This API is still undone, and I want to wait to finish the "aspect" one
before begining with this.
> 3. I see plenty of 1.5-isms, this may be ok, but then we need to make sure the
> documentation is clear that Java 1.5+ is needed to use this part of the library.
My intention is that the library requires java 1.3 like the rest of the xml-sec
library. Using 1.5-ism was just for fun...

> 4. Unit tests use RSA, which I believe requires a 3rd-party JCE. Perhaps having
> the unit tests use DSA so they work w/o an external JCE would be better. I also
> plan to use DSA in my code for this reason (don't want to require a 3rd-party
JCE).
The RSA comes with sun java 1.4 and 1.5 it does not need any 3rd party JCE.
Perhaps IBM or BEA jce don't contain this cypher.


Again thanks for your sugestions. If you have more don't hesitate...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39029] - Stax verifier JSR105 implementation

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39029>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39029





------- Additional Comments From raul-info@r-bg.com  2006-05-27 17:08 -------
New PATCH
Hi, a new version of the patch that happens to decode and verify and SAML
assertion(a enveloped signature). So enveloped and detached-before-the-signature
signatures are supported right now. 
The API used is the signature/reference aware. 
I'm going to concetrate in:
  *Inclusive C14n support: it's going to be a parameter passed when obtaining
the filter as it slows the parsing, as it must store the xml:* attributes.
  *Refactor & Documentation: I'm going to do some refactor and create some
diagrams of the internal workings, I plan to publish all these things in my blog.

The TODO:
[ ] Do inclusive C14n
[X] Design the API for signed data before signature describing it.
[ ] Do Transformations
[ ] Refactor
[ ] And documentation
[ ] Optimize for speed not for easy debugging. :(
[ ] Keys/Cert decoding...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.