Skip to content

Conversation

@currantw
Copy link
Collaborator

@currantw currantw commented Nov 7, 2025

Summary

This pull request implements dynamic password update functionality.

Key Changes

  • Rust FFI: Added update_connection_password function.
  • C# Bindings: Added FFI method declarations for both .NET 8+ and legacy frameworks.
  • Public API: Added UpdateConnectionPasswordAsync and ClearConnectionPasswordAsync methods to BaseClient
  • Integration Tests: Added comprehensive tests for both standalone and cluster clients

API Usage

// Update password without immediate authentication
await client.UpdateConnectionPasswordAsync("new_password");

// Update password with immediate authentication  
await client.UpdateConnectionPasswordAsync("new_password", immediateAuth: true);

// Remove password from connection
await client.ClearConnectionPasswordAsync();

Note: There is some variation in the dynamic password update interface between clients. In Java and Node, a single update method is provided; if the password is null or the empty string, the password is cleared. In Go, there is a separate method that "resets" the password. I chose to follow Go's approach, with two separate methods, because I think that it is more explicit. (Of course, I though that "clear" made the effects of the method *ahem* clearer than "reset").

@currantw currantw requested a review from a team as a code owner November 7, 2025 01:00
Copy link
Collaborator

@yipin-chen yipin-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants