| Summary: | /dev/random vs. /dev/urandom | ||
|---|---|---|---|
| Product: | Java WS Security | Reporter: | Mats Rynge <rynge@isi.edu> |
| Component: | Authentication | Assignee: | Rachana Ananthakrishnan <ranantha@mcs.anl.gov> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | chris@gridwisetech.com, gawor@mcs.anl.gov, gose@mcs.anl.gov, meder@mcs.anl.gov, slang@mcs.anl.gov |
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Just to be a bit more specific, as far as I know this only happens when running the container with java 1.3.1. So what should be done (if anything) is probably to add some code to our startup that checks if the java version is 1.3 and if /dev/urandom exists then it should add is as the entropy source. /Sam
Hmm, so what is the default behavior with 1.4.2? I have a container on a fairly busy host, and used to have problems with it hanging until we added -Djava.security.egd=file:/dev/urandom. The hanging stopped around the time we added the option, but maybe it was a coincidence.
Looks like I got this backwards. 1.4 seems to have /dev/random as the default. Maybe 1.3 does the correct thing (or I was just confused). /Sam
Checked in a patch from the GridWise folks.
Let me write a few words about solution we chose and implemented. When the Globus container is about to be start shell script $GLOBUS_LOCATION/bin/globus-start-container checks if there is /dev/urandom device available in the system. If yes, it forces org.globus.bootstrap.Bootstrap Java class to use this entropy generator. This is done with java.security.egd Java property. If no, it forces Bootstrap class to use /dev/random device. After having started the container, org.globus.wsrf.container.ServiceContainer Java class prints logging (log4j) information about the entropy generator it uses.
See Bug 4721, this configuration requires a URL scheme ("file:" or "file://")