Search code examples
datastaxdatastax-enterprisedatastax-enterprise-graphdatastax-startup

DSE Authenticate Spark AlwaysOn SQL


I've installed DSE (Cassandra + Search + Graph + Analytics) on a single for dev purposes and I'm not able to connect to the AlwaysOn SQL, it's enabled on dse.yaml file but I'm not sure how to set access / permissions.

Configurations:

cassandra.yaml: authenticator=AllowAllAuthenticator

dse.yaml: authentication_options=enabled

hive-site.xml: jdbc-auth-type=password

I'm not able to give access to the user "alwayson_sql" from CQLSH (cqlsh -u cassandra -p cassandra): Unauthorized: Error from server: code=2100 [Unauthorized] message="Anonymous users are not authorized to perform this request"

Based on this guide: https://docs.datastax.com/en/security/6.0/security/secAuthSpark.html?hl=alwayson

What will be the right configuration / process to allow access to the AlwaysOn SQL? (for now security is not important it's a dev environment for testings only)


Solution

  • You shouldn't change authenticator to AllowAllAuthenticator - in DSE, you must use com.datastax.bdp.cassandra.auth.DseAuthenticator (the same is for authorizer) & configure it via dse.yaml as described in the documentation - configure internal authentication schema, and enable authorization options as well.

    And because you're using AllowAllAuthenticator, then your user is not authenticated, even if you pass username/password, and this lead to the error that you receive.

    After you configure authentication/authorization, you can continue login & configure AOSS access rights as described in documentation.