You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2008/09/26 22:23:44 UTC

[jira] Created: (WSS-143) Better management of namespace declarations....

Better management of namespace declarations....
-----------------------------------------------

                 Key: WSS-143
                 URL: https://issues.apache.org/jira/browse/WSS-143
             Project: WSS4J
          Issue Type: Improvement
          Components: WSS4J Handlers
    Affects Versions: 1.5.5
            Reporter: Daniel Kulp
            Assignee: Ruchith Udayanga Fernando



For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:

<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
    <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
    <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
</wsu:Timestamp>

could be shortened to:
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
    <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
    <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
</wsu:Timestamp>

That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: [jira] Created: (WSS-143) Better management of namespace declarations....

Posted by Werner Dittmann <We...@t-online.de>.
At which point during the processing do you look at the message?

The stream that WSS4J sends over the wire usually does not contain
the duplicate namespaces. During internal processing this is the
normal way to represent namespaces in a DOM (IIRC). Before sending
WSS4J preforms C14N to produce the "real" stream.

Daniel Kulp (JIRA) schrieb:
> Better management of namespace declarations....


> -----------------------------------------------
> 
>                  Key: WSS-143
>                  URL: https://issues.apache.org/jira/browse/WSS-143
>              Project: WSS4J
>           Issue Type: Improvement
>           Components: WSS4J Handlers
>     Affects Versions: 1.5.5
>             Reporter: Daniel Kulp
>             Assignee: Ruchith Udayanga Fernando
> 
> 
> 
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> 
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> 
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> 
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


RE: [jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Dittmann, Werner (NSN - DE/Munich)" <we...@nsn.com>.
The C14N step is the last step after all security processing
was performed. The overall processing required to insert new
elements and nodes, each attributed with their required 
namespace declarations to be compliant to DOM and enable
full namespace processing, etc.

The last C14N step does some normailzation by removeing
redunant namespace declarations, for example. After this
C14N step we transform (serialize) the resulting DOM into a XML
stream (readable XML).

The "namespace" management that is mentioned here would involve
quite some effort to keep track which namespace declarations
are in scope of the element to add. When inserting a new element
this would require to 
- look up the tree and check if there is an other element in the 
  same namespace
  = if one is found - no need to add a namepsace declaration to 
    the new element, assuming that the topmost element in the
    same namespace that is in scope contains a namespace declaration

- otherwise add a namespace declaration because this new element
  will become the "topmost" element for this namespace

This processing has to be done for each new element insertion.
Another solution would be to maintain a "cache" (or stack) of 
currently active/in-scope namespaces.
Some of these steps mimik in parts processing of C14N.

IMHO it is easier and less error prone to always add a namespace 
delaraction when needed and remove the redundant declarations
at the very end in one step.

Regards,
Werner

> -----Original Message-----
> From: ext Daniel Kulp (JIRA) [mailto:jira@apache.org] 
> Sent: Thursday, October 16, 2008 12:53 PM
> To: wss4j-dev@ws.apache.org
> Subject: [jira] Commented: (WSS-143) Better management of 
> namespace declarations....
> 
> 
>     [ 
> https://issues.apache.org/jira/browse/WSS-143?page=com.atlassi
> an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedC
> ommentId=12640128#action_12640128 ] 
> 
> Daniel Kulp commented on WSS-143:
> ---------------------------------
> 
> 
> c14n is expensive.   Why should we do that if it's not needed?
> 
> 
> > Better management of namespace declarations....
> > -----------------------------------------------
> >
> >                 Key: WSS-143
> >                 URL: https://issues.apache.org/jira/browse/WSS-143
> >             Project: WSS4J
> >          Issue Type: Improvement
> >          Components: WSS4J Handlers
> >    Affects Versions: 1.5.4
> >            Reporter: Daniel Kulp
> >            Assignee: Ruchith Udayanga Fernando
> >             Fix For: 1.5.5
> >
> >
> > For performance reasons, (and readability) it would be 
> better if wss4j didn't duplicate namespace decls on all the 
> child elements if they are redundant or not needed.    For example:
> > <wsu:Timestamp 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401
> -wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
> >     <wsu:Created 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401
> -wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu
> :Created>
> >     <wsu:Expires 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401
> -wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu
> :Expires>
> > </wsu:Timestamp>
> > could be shortened to:
> > <wsu:Timestamp 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401
> -wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
> >     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
> >     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> > </wsu:Timestamp>
> > That would save bandwidth, make parsing faster (less to 
> parse/process), the DOM model smaller in memory, etc...
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Closed: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed WSS-143.
-----------------------------------


> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.5.6
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Updated: (WSS-143) Better management of namespace declarations....

Posted by "Fred Dushin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fred Dushin updated WSS-143:
----------------------------

        Fix Version/s: 1.5.5
    Affects Version/s:     (was: 1.5.5)
                       1.5.4

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>             Fix For: 1.5.5
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640127#action_12640127 ] 

Colm O hEigeartaigh commented on WSS-143:
-----------------------------------------


The Axis outbound handler "org.apache.ws.axis.security.WSDoAllSender" has the comment:

* If required convert the resulting document into a message first.
* The outputDOM() method performs the necessary c14n call. After
* that we extract it as a string for further processing.

So maybe the CXF interceptor should be doing something similar?

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>             Fix For: 1.5.5
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635127#action_12635127 ] 

Daniel Kulp commented on WSS-143:
---------------------------------


This was a wiretrace from off the wire.

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.5
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640128#action_12640128 ] 

Daniel Kulp commented on WSS-143:
---------------------------------


c14n is expensive.   Why should we do that if it's not needed?


> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>             Fix For: 1.5.5
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Werner Dittmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635104#action_12635104 ] 

Werner Dittmann commented on WSS-143:
-------------------------------------

At which point during the processing do you look at the message?

The stream that WSS4J sends over the wire usually does not contain
the duplicate namespaces. During internal processing this is the
normal way to represent namespaces in a DOM (IIRC). Before sending
WSS4J preforms C14N to produce the "real" stream.






> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.5
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Assigned: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh reassigned WSS-143:
---------------------------------------

    Assignee: Colm O hEigeartaigh

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.5.6
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Dittmann, Werner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640147#action_12640147 ] 

Dittmann, Werner commented on WSS-143:
--------------------------------------

The C14N step is the last step after all security processing
was performed. The overall processing required to insert new
elements and nodes, each attributed with their required 
namespace declarations to be compliant to DOM and enable
full namespace processing, etc.

The last C14N step does some normailzation by removeing
redunant namespace declarations, for example. After this
C14N step we transform (serialize) the resulting DOM into a XML
stream (readable XML).

The "namespace" management that is mentioned here would involve
quite some effort to keep track which namespace declarations
are in scope of the element to add. When inserting a new element
this would require to 
- look up the tree and check if there is an other element in the 
  same namespace
  = if one is found - no need to add a namepsace declaration to 
    the new element, assuming that the topmost element in the
    same namespace that is in scope contains a namespace declaration

- otherwise add a namespace declaration because this new element
  will become the "topmost" element for this namespace

This processing has to be done for each new element insertion.
Another solution would be to maintain a "cache" (or stack) of 
currently active/in-scope namespaces.
Some of these steps mimik in parts processing of C14N.

IMHO it is easier and less error prone to always add a namespace 
delaraction when needed and remove the redundant declarations
at the very end in one step.

Regards,
Werner



> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>             Fix For: 1.5.5
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Commented: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640131#action_12640131 ] 

Colm O hEigeartaigh commented on WSS-143:
-----------------------------------------


I had Werner's comment in mind - "During internal processing this is the
normal way to represent namespaces in a DOM (IIRC). "

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Ruchith Udayanga Fernando
>             Fix For: 1.5.5
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Updated: (WSS-143) Better management of namespace declarations....

Posted by "Fred Dushin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fred Dushin updated WSS-143:
----------------------------

    Fix Version/s:     (was: 1.5.5)
         Assignee:     (was: Ruchith Udayanga Fernando)

As this is an optimization, we should be able to safely move this to a future release.

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Resolved: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved WSS-143.
-------------------------------------

    Resolution: Fixed

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.5.6
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[jira] Updated: (WSS-143) Better management of namespace declarations....

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-143:
------------------------------------

    Fix Version/s: 1.5.6


We can fix this for at least some cases for the 1.5.6 release.

> Better management of namespace declarations....
> -----------------------------------------------
>
>                 Key: WSS-143
>                 URL: https://issues.apache.org/jira/browse/WSS-143
>             Project: WSS4J
>          Issue Type: Improvement
>          Components: WSS4J Handlers
>    Affects Versions: 1.5.4
>            Reporter: Daniel Kulp
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.5.6
>
>
> For performance reasons, (and readability) it would be better if wss4j didn't duplicate namespace decls on all the child elements if they are redundant or not needed.    For example:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> could be shortened to:
> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1606023307">
>     <wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
>     <wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
> </wsu:Timestamp>
> That would save bandwidth, make parsing faster (less to parse/process), the DOM model smaller in memory, etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org