title: Change DataStax java driver User and Password in runtime
body: <p>I am running a Java app with DataStax Java driver version 3.3.0 and I am trying to change Cassandra user and password at runtime. According to <a href="https://datastax-oss.atlassian.net/browse/JAVA-719" rel="nofollow noreferrer">this issue</a> by calling <code>setUser</code> and <code>setPassword</code> in this object it should reuse it for future calls to the DB, so I did in my code something like</p>
  <pre><code>PlainTextAuthProvider authProvider = (PlainTextAuthProvider) cluster.getConfiguration().getProtocolOptions().getAuthProvider();
  
  authProvider.setUsername(user);
  authProvider.setPassword(pwd);
  </code></pre>
  <p>But even after this change I find that it still use the user/pass I set on startup.</p>
  <p><a href="https://docs.datastax.com/en/developer/java-driver/4.2/manual/core/configuration/#manual-reloading" rel="nofollow noreferrer">This docu</a> indicates that in versions &gt; 4.x you can force a config reload at runtime.</p>
  <p>So my question is, Is there a way to force all new calls to Cassandra start using the new User and Pass provided via <code>PlainTextAuthProvider</code> in version 3.x ?</p>
  <p><strong>Extra:</strong> I am doing this to try to rotate Vault passwords when they expire and update the driver accordingly. Something like what is described in this <a href="https://secrets-as-a-service.com/posts/hashicorp-vault/rotate-dynamic-relational-database-connection-in-spring-at-runtime/" rel="nofollow noreferrer">post for relational DB accessed by Spring Boot but on Cassandra</a></p>