You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sasha Dolgy <sd...@gmail.com> on 2011/04/26 08:57:25 UTC

encryption_options & 0.8

Is it possible to store an encrypted keystore_password and
truststore_password in the cassandra.yaml?  I see that the defaults
allow cleartext which isn't suitable when negotiating with security
specialists for sign-off of a solution...

From:  http://svn.apache.org/repos/asf/cassandra/trunk/conf/cassandra.yaml

# The passwords used in these options must match the passwords used
when generating
# the keystore and truststore.  For instructions on generating these files, see:
# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
encryption_options:
    internode_encryption: none
    keystore: conf/.keystore
    keystore_password: cassandra
    truststore: conf/.truststore
    truststore_password: cassandra


-- 
Sasha Dolgy
sasha.dolgy@gmail.com

Re: encryption_options & 0.8

Posted by David Boxenhorn <da...@taotown.com>.
How about a more general (and encrypted!) solution: Add a password
decryption class to the YAML. If it is not defined, that means the passwords
are not encrypted, if it is defined, use it to decrypt the passwords.

That way, you need to steal both the YAML and the decryption class if you
want to steal the passwords.

On Wed, Apr 27, 2011 at 1:56 PM, Sasha Dolgy <sd...@gmail.com> wrote:

> "IBM WebSphere applies a hardcoded XOR. Each caracter is XOR'd with
> the caracter ‘_’, and the resulting string is encoded in base64. This
> is not cryptography, it is just enough encoding so that a casual
> glance at the file will not reveal the password."
>
> I'm sure there are many different options.  Key point here is the
> 'casual glance' reference.  In terms of adding additional overhead
> when a node starts up ... it shouldn't be that prohibitive.  when the
> cassandra.yaml is loaded in and the "encryption_properties", if
> keystore_password.clear or truststore_password.clear exists, rewrite
> these properties in the yaml to the encrypted values of the cleartext
> string, removing the ".clear" suffix and continue on as normal.  the
> default within cassandra should be looking at decrypting an encrypted
> value.  if the decrypted values are wrong, throw an error as you would
> normally ...
>
> Yes, all of this can be circumvented if the cassandra.yaml is set to
> read only for user and no one else, but really ... do i want anyone in
> our organization who may have access to restart a cassandra node, but
> may not be privileged to know what the keystore / truststore passwords
> are to easily find out by looking at the cassandra.yaml ?
>
> -sd
>
>
> > On Wed, Apr 27, 2011 at 5:09 AM, David Strauss <da...@davidstrauss.net>
> wrote:
> >
> > If the passwords are encrypted, when and how would they be decrypted?
>

Re: encryption_options & 0.8

Posted by David Strauss <da...@davidstrauss.net>.
On Wed, 2011-04-27 at 12:56 +0200, Sasha Dolgy wrote:
> "IBM WebSphere applies a hardcoded XOR. Each caracter is XOR'd with
> the caracter ‘_’, and the resulting string is encoded in base64. This
> is not cryptography, it is just enough encoding so that a casual
> glance at the file will not reveal the password."
> 
> I'm sure there are many different options.  Key point here is the
> 'casual glance' reference.  In terms of adding additional overhead
> when a node starts up ... it shouldn't be that prohibitive.  when the
> cassandra.yaml is loaded in and the "encryption_properties", if
> keystore_password.clear or truststore_password.clear exists, rewrite
> these properties in the yaml to the encrypted values of the cleartext
> string, removing the ".clear" suffix and continue on as normal.  the
> default within cassandra should be looking at decrypting an encrypted
> value.  if the decrypted values are wrong, throw an error as you would
> normally ...
> 
> Yes, all of this can be circumvented if the cassandra.yaml is set to
> read only for user and no one else, but really ... do i want anyone in
> our organization who may have access to restart a cassandra node, but
> may not be privileged to know what the keystore / truststore passwords
> are to easily find out by looking at the cassandra.yaml ?

As I suspected, you want the passwords "encrypted" but not in a way that
would hamper the ability for the nodes to independently start themselves
or require actual key management. (The reason I suspected this is
because you didn't seem willing to just not give Cassandra the keystore
and truststore passwords.) That, my friend, is no additional security at
all.

Re: encryption_options & 0.8

Posted by Sasha Dolgy <sd...@gmail.com>.
"IBM WebSphere applies a hardcoded XOR. Each caracter is XOR'd with
the caracter ‘_’, and the resulting string is encoded in base64. This
is not cryptography, it is just enough encoding so that a casual
glance at the file will not reveal the password."

I'm sure there are many different options.  Key point here is the
'casual glance' reference.  In terms of adding additional overhead
when a node starts up ... it shouldn't be that prohibitive.  when the
cassandra.yaml is loaded in and the "encryption_properties", if
keystore_password.clear or truststore_password.clear exists, rewrite
these properties in the yaml to the encrypted values of the cleartext
string, removing the ".clear" suffix and continue on as normal.  the
default within cassandra should be looking at decrypting an encrypted
value.  if the decrypted values are wrong, throw an error as you would
normally ...

Yes, all of this can be circumvented if the cassandra.yaml is set to
read only for user and no one else, but really ... do i want anyone in
our organization who may have access to restart a cassandra node, but
may not be privileged to know what the keystore / truststore passwords
are to easily find out by looking at the cassandra.yaml ?

-sd


> On Wed, Apr 27, 2011 at 5:09 AM, David Strauss <da...@davidstrauss.net> wrote:
>
> If the passwords are encrypted, when and how would they be decrypted?

Re: encryption_options & 0.8

Posted by Sasha Dolgy <sd...@gmail.com>.
Although it's crude, websphere for example provides a simple, internal
hashing algorithm to encrypt the clear text passwords.  it's quite
easy to decrypt the passwords ... however, it's an extra step that
takes a bit more time ... as opposed to saying, "hi, here are my
cleartext passwords.  have fun"

even something crude like base64 encode/decode on the cleartext string
would be better than clear text. when cassandra is loading the
cassandra.yaml and it gets to encryption_options, it can perform a
base64 decode against the encoded string.

-sasha

On Wed, Apr 27, 2011 at 5:09 AM, David Strauss <da...@davidstrauss.net> wrote:
> On Tue, 2011-04-26 at 08:57 +0200, Sasha Dolgy wrote:
>> Is it possible to store an encrypted keystore_password and
>> truststore_password in the cassandra.yaml?  I see that the defaults
>> allow cleartext which isn't suitable when negotiating with security
>> specialists for sign-off of a solution...
>
> If the passwords are encrypted, when and how would they be decrypted?

Re: encryption_options & 0.8

Posted by David Strauss <da...@davidstrauss.net>.
On Tue, 2011-04-26 at 08:57 +0200, Sasha Dolgy wrote:
> Is it possible to store an encrypted keystore_password and
> truststore_password in the cassandra.yaml?  I see that the defaults
> allow cleartext which isn't suitable when negotiating with security
> specialists for sign-off of a solution...

If the passwords are encrypted, when and how would they be decrypted?