Connect in AWS keyspace
Closed this issue · 2 comments
retf commented
Have any one knows how connect using TLS client authentication, with certificates?
https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.drivers.html
whatyouhide commented
You can use encryption: true
in start_link/1
and customize all the right options with the :transport_options
option. For example, start_link(transport_options: [certfile: "path/to/certfile"])
or something like this. I don't have experience with AWS Keyspace so not sure how to help in more detail :) Closing this now as I am fairly sure it's not a bug with Xandra itself, but feel free to comment down here if you need more help!
retf commented
this do the trick, if any one needs!
Xandra.start_link(
# https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.endpoints.html
nodes: ["cassandra.sa-east-1.amazonaws.com:9142"],
encryption: true,
# curl https://www.amazontrust.com/repository/AmazonRootCA1.pem -O
transport_options: [cacertfile: "/path/to/cer/AmazonRootCA1.pem"],
# https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.credentials.html#programmatic.credentials.ssc
authentication: { Xandra.Authenticator.Password, [username: "usename", password: "pass"] }
)