r4fek / django-cassandra-engine

Django Cassandra Engine - the Cassandra backend for Django
BSD 2-Clause "Simplified" License
364 stars 85 forks source link

Error while connecting to AWS Keyspace #148

Open amit-dev opened 3 years ago

amit-dev commented 3 years ago

Hi,

While trying to connect AWS keyspace django cassandra engine is erroring out. Not sure how to provide cert as Amazon Keyspaces requires the use of Transport Layer Security (TLS)

Usage:- DATABASES = { 'default': { 'ENGINE': 'django_cassandra_engine', 'NAME': '', 'USER': '' 'PASSWORD': '' 'HOST': 'cassandra.us-east-1.amazonaws.com', 'connection': { 'port': 9042,

    }
}

}

SebJansen commented 2 years ago

I think TLS is just not supported, weirdly. Or did you find a solution?

SebJansen commented 2 years ago

The documentation has some pointers on tinkering with the authentication method: http://r4fek.github.io/django-cassandra-engine/guide/advanced_usage/#using-internal-authorization

_"You can also pass custom authprovider to connection dict:"

Which links to DataStax's SASL-auth, which I presume to be TLS-compatible: https://docs.datastax.com/en/developer/python-driver/3.25/api/cassandra/auth/