Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

tyuen_144153 avatar image
tyuen_144153 asked tyuen_144153 commented

Is it possible to suppress authentication warnings in the Java driver?

We have a mix environment, where production has authentication enabled and non-production's authentication is disabled for testing and causing a lot of logging.

Is there a way a setting in the Java Driver to suppress the auth warning messages?

Message: did not send an authentication challenge; This is suspicious because the driver expects authentication
java driverauthentication
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

starlord avatar image
starlord answered tyuen_144153 commented

I see we logged a request years ago to implement a mechanism for suppressing those warnings, but it was never introduced. If you didn't want to see those, probably the easiest thing to do is change the auth options in the non-prod cluster. Are you using DSE or OSS Cassandra? and what version are you using?

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

we are using OSS Cassandra.

Cassandra version 3.11.10

0 Likes 0 ·
Erick Ramirez avatar image
Erick Ramirez answered tyuen_144153 commented

Your question is counter-intuitive and doesn't make sense.

Instead of looking for ways to configure your environment to suppress authentication warnings, you should instead configure your application so it doesn't try to authenticate on clusters where authentication is disabled. All you need to do is not define an authentication provider in the Java driver. Cheers!

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

My devops team wanted to use Cassandra reaper in sidecar mode in non-prod environment. Reaper didn't want to play nice with Cassandra with AUTH on.
Once the AUTH was disabled, Reaper was able to see the cluster, but getting the warnings.

So, I guess we will see what can be done on Reaper side as it looks like Cassandra doesn't have that option to suppress the warning

0 Likes 0 ·