Database Reference
In-Depth Information
You can use a variety of tools to generate an MD5-encrypted version of the plain-text username
and password as a one-way hash. Here's a short Python program to create an MD5 hash from a
plain string:
$ python
Python 2.6.5 ...
>>> from hashlib import md5
>>> p = "havebadpass"
>>> h = md5(p).hexdigest()
>>> print h
e1a31eee2136eb73e8e47f9e9d13ab0d
Now you can replace the password for jsmith in the passwd.propertiesile with the encrypted
value.
Providing Your Own Authentication
You can provide your own method of authenticating to Cassandra if you want to make special
requirements, such as a Kerberos ticket or encryption, or if you want to store passwords in a dif-
ferent location, such as an LDAP directory. To create your own authentication scheme, simply
implement the IAuthenticator interface. This interface requires two methods, as shown here:
public AccessLevel login(String keyspace, AuthenticationRequest authRequest)
throws AuthenticationException, AuthorizationException;
public void validateConfiguration() throws ConfigurationException;
The login method must return a Thrift AccessLevel instance, indicating what degree of access
the authenticating user is allowed. The validateConfiguration method simply allows a check
to ensure that the authentication mechanism is properly set up. For example, with the Sim-
pleAuthenticator , it just checks that the required accessand passwdiles have been specified.
Miscellaneous Settings
There are a few settings related to general configuration that don't quite seem to belong in any
other category, so I've grouped them together here.
column_index_size_in_kb
column_index_size_in_kb
This indicates the size in kilobytes that a row is allowed to grow to before its columns will
be indexed. If you have very large column values, you'll want to increase this value. Super
columns are not indexed, so this setting refers only to column indexes. You do not want this
setting to be very large because all the index data is read for each read access, so you could
Search WWH ::




Custom Search