You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by franckie frank <fr...@gmail.com> on 2011/06/13 17:46:17 UTC

How to configure USE_SECURE_RANDOM_FOR_UUID?

Hi,



I’ve noticed that in Tomcat 7.0.14’s
org.apache.catalina.tribes.io.ChannelData there is public static field

'public static volatile boolean USE_SECURE_RANDOM_FOR_UUID'.

and it seems to be used only once in the same class. By default its value is
false.



Do you know if there is a way to change/configure its value?



Thanks!

Franckie14

Re: How to configure USE_SECURE_RANDOM_FOR_UUID?

Posted by ma...@apache.org.

ranckie frank <fr...@gmail.com> wrote:

>Honestly, I was simply curious why the cryptographically secure
>generation
>of random unique ids (through java.security.SecureRandom API)  is
>disabled
>by default.

Because it is more expensive. I can't think of a reason why you would need SecureRandom there but left some code so it would be easy to change at a later point if someone came up with a reason.

>And It was unclear to me if it is at all possible to change the default
>behavior.

Not with config, only as previously descibed.

Mark




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to configure USE_SECURE_RANDOM_FOR_UUID?

Posted by franckie frank <fr...@gmail.com>.
Honestly, I was simply curious why the cryptographically secure generation
of random unique ids (through java.security.SecureRandom API)  is disabled
by default.

And It was unclear to me if it is at all possible to change the default
behavior.
Thanks,
Franckie14

2011/6/14 Mark Thomas <ma...@apache.org>

> On 13/06/2011 22:43, Christopher Schultz wrote:
> > Frank,
> >
> > On 6/13/2011 11:46 AM, franckie frank wrote:
> >> I ve noticed that in Tomcat 7.0.14 s
> >> org.apache.catalina.tribes.io.ChannelData there is public static field
> >
> >> 'public static volatile boolean USE_SECURE_RANDOM_FOR_UUID'.
> >
> >> and it seems to be used only once in the same class. By default its
> value is
> >> false.
> >
> >> Do you know if there is a way to change/configure its value?
> >
> > How about:
> >
> > import org.apache.catalina.tribes.io.ChannelData;
> >
> > ...
> >
> >    ChannelData.USE_SECURE_RANDOM_FOR_UUID = true;
>
> But that begs the questions, why would you want to?
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to configure USE_SECURE_RANDOM_FOR_UUID?

Posted by Mark Thomas <ma...@apache.org>.
On 13/06/2011 22:43, Christopher Schultz wrote:
> Frank,
> 
> On 6/13/2011 11:46 AM, franckie frank wrote:
>> Ive noticed that in Tomcat 7.0.14s
>> org.apache.catalina.tribes.io.ChannelData there is public static field
> 
>> 'public static volatile boolean USE_SECURE_RANDOM_FOR_UUID'.
> 
>> and it seems to be used only once in the same class. By default its value is
>> false.
> 
>> Do you know if there is a way to change/configure its value?
> 
> How about:
> 
> import org.apache.catalina.tribes.io.ChannelData;
> 
> ...
> 
>    ChannelData.USE_SECURE_RANDOM_FOR_UUID = true;

But that begs the questions, why would you want to?

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to configure USE_SECURE_RANDOM_FOR_UUID?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank,

On 6/13/2011 11:46 AM, franckie frank wrote:
> I’ve noticed that in Tomcat 7.0.14’s
> org.apache.catalina.tribes.io.ChannelData there is public static field
> 
> 'public static volatile boolean USE_SECURE_RANDOM_FOR_UUID'.
> 
> and it seems to be used only once in the same class. By default its value is
> false.
> 
> Do you know if there is a way to change/configure its value?

How about:

import org.apache.catalina.tribes.io.ChannelData;

...

   ChannelData.USE_SECURE_RANDOM_FOR_UUID = true;

?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk32hHgACgkQ9CaO5/Lv0PAN/ACfcvRm70MK30Oxtu5AeciZK/l9
0JgAoLkVlDFYkmhQCAXGCbH8JYtWro8l
=0ooA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org