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 2010/10/01 14:18:52 UTC

DO NOT REPLY [Bug 50036] New: IdResolver Java API extension

https://issues.apache.org/bugzilla/show_bug.cgi?id=50036

           Summary: IdResolver Java API extension
           Product: Security
           Version: Java 1.4.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Signature
        AssignedTo: security-dev@xml.apache.org
        ReportedBy: cheffo@gmail.com


Created an attachment (id=26110)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26110)
Proposed patch.

I would like to suggest an extension to the xmlsec java API, namely to add a
static method like unregisterDocument to
org.apache.xml.security.utils.IdResolver to remove adocument from the static
"docMap" WeakHashMap. Under long running high load test after some time we are
experiencing a hangup with all the worker threads in the following state:

"HTTP Handler 10.20.32.55" Id=185 in RUNNABLE
 at java.util.WeakHashMap.get(WeakHashMap.java:355)
 at org.apache.xml.security.utils.IdResolver.registerElementById(Unknown
Source)
 at org.apache.xml.security.signature.XMLSignature.setId(Unknown Source)
 at
org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:360)
 at
org.apache.rampart.builder.BindingBuilder.getSignatureBuider(BindingBuilder.java:387)
 at
org.apache.rampart.builder.AsymmetricBindingBuilder.doSignature(AsymmetricBindingBuilder.java:716)
 at
org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:433)
 at
org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:95)
 at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
 at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:79)
 at org.apache.axis2.engine.Phase.invoke(Phase.java:325)
 at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)

With manual cleanup of the weak has map this situation is avoided.

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

DO NOT REPLY [Bug 50036] IdResolver Java API extension

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50036

Stefan Vladov <ch...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26110|0                           |1
           is patch|                            |

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

DO NOT REPLY [Bug 50036] IdResolver Java API extension

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50036

coheigea <co...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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

DO NOT REPLY [Bug 50036] IdResolver Java API extension

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50036

--- Comment #2 from coheigea <co...@apache.org> 2010-10-02 09:18:55 EDT ---

Patch applied thanks (minus the annotations - the project is compatible with
JDK 1.4):

Author: coheigea
Date: Sat Oct  2 13:17:40 2010
New Revision: 1003793

URL: http://svn.apache.org/viewvc?rev=1003793&view=rev
Log:
[Bug 50036] IdResolver Java API extension.
 - Patch applied. Also merged a fix to get a test working with JDK 1.4.

Modified:
   santuario/trunk/CHANGELOG.txt
   santuario/trunk/src/org/apache/xml/security/utils/IdResolver.java
  
santuario/trunk/src_unitTests/org/apache/xml/security/test/keys/keyresolver/KeyResolverTest.java

Colm.

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

DO NOT REPLY [Bug 50036] IdResolver Java API extension

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50036

--- Comment #1 from Stefan Vladov <ch...@gmail.com> 2010-10-01 08:19:56 EDT ---
Sorry for the delay :(

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