[jboss-jira] [JBoss JIRA] (JGRP-1893) ENCRYPT: Thread safety issues during key changes

Tero Leppikangas (JIRA) issues at jboss.org
Mon Nov 3 03:01:35 EST 2014


    [ https://issues.jboss.org/browse/JGRP-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016612#comment-13016612 ] 

Tero Leppikangas commented on JGRP-1893:
----------------------------------------

I believe that the implementation has been the same from Java 6 (http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/net/DualStackPlainDatagramSocketImpl.java#DualStackPlainDatagramSocketImpl.setTimeToLive%28int%29) and the implementation is the same in Java 8  (also with Sun's own JDK)

The problem is that for multicast use, the ip_ttl is vital part of the configuration, thus cannot be removed from the config. Although the issue causes no problems, it is not nice to have such an exception printed out on every init of a stack.

If the discussion about the TTL issue continues, I suppose the proper place for the conversation is under JGRP-1880.


> ENCRYPT: Thread safety issues during key changes
> ------------------------------------------------
>
>                 Key: JGRP-1893
>                 URL: https://issues.jboss.org/browse/JGRP-1893
>             Project: JGroups
>          Issue Type: Bug
>            Reporter: Tero Leppikangas
>            Assignee: Bela Ban
>
> For symmetric encryption, ENCRYPT has members with shared state: secret key, version and ciphers. In order for to provide consistent state between different threads accessing these members, they should be synchronized.
> I have implemented one solution by wrapping the state in separate object which can be found here:
> https://github.com/tepitebson/JGroups/tree/ENCRYPT_Thread_safety
> I also have replaced the WeakHashMap holding the previous keys with Cache in google's guava library so my solution probably is not suitable for an official solution.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list