Skip to content

Commit

Permalink
Don't pass basic auth to password cluster HTTP calls. (#823)
Browse files Browse the repository at this point in the history
When we pass basic auth, this gets used as the `Authorization` header. 

We don't actually need this for anything... the `ssh_user` and `password` should only be needed to create the `ssh_tunnel`, so let's just not send this at all.
  • Loading branch information
rohinb2 committed May 22, 2024
1 parent 16ef5f9 commit ed1205a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions runhouse/resources/hardware/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,17 +596,12 @@ def connect_server_client(self, force_reconnect=False):
)
self.client_port = self._rpc_tunnel.local_bind_port

ssh_user = self.creds_values.get("ssh_user")
password = self.creds_values.get("password")
auth = (ssh_user, password) if ssh_user and password else None

# Connecting to localhost because it's tunneled into the server at the specified port.
# As long as the tunnel was initialized,
# self.client_port has been set to the correct port
self.client = HTTPClient(
host=LOCALHOST,
port=self.client_port,
auth=auth,
resource_address=self.rns_address,
system=self,
)
Expand Down

0 comments on commit ed1205a

Please sign in to comment.