Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-233

CassandraCqlClusterFactoryBean won't allow configuration of username/password unless authProvider also given.

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      CassandraCqlClusterFactoryBean.afterPropertiesSet() only utilizes the username property when the authProvider property is also set. Looking at the Javadoc for the methods called withAuthProvider() and withCredentials() on Cluster.Builder indicates that you should only ever call one or the other, not both. I suspect that the intended behavior should be something like:

        if (authProvider != null) {
          builder.withAuthProvider(authProvider);
        } else if (username != null) {
          builder.withCredentials(username, password);
        }
      

      but unfortunately, there are no unit tests for this class.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              acourtneybrown Adam Brown
              Last updater:
              Spring Issues Spring Issues
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 26 weeks, 2 days ago