Antonio-RiveroMartnez commented on code in PR #22199:
URL: https://github.com/apache/superset/pull/22199#discussion_r1044732598


##########
superset/models/core.py:
##########
@@ -350,6 +350,19 @@ def set_sqlalchemy_uri(self, uri: str) -> None:
         conn = conn.set(password=PASSWORD_MASK if conn.password else None)
         self.sqlalchemy_uri = str(conn)  # hides the password
 
+    def mask_password_in_ssh_tunnel(self, ssh_tunnel: "SSHTunnel") -> None:
+        if ssh_tunnel.password is not None and ssh_tunnel.password != 
PASSWORD_MASK:
+            # Mask the real password with our password mask
+            self.ssh_tunnel["password"] = PASSWORD_MASK  # pylint: 
disable=no-member
+        if (
+            ssh_tunnel.private_key_password is not None
+            and ssh_tunnel.private_key_password != PASSWORD_MASK
+        ):
+            # Mask the real password with our password mask
+            self.ssh_tunnel[  # pylint: disable=no-member
+                "private_key_password"
+            ] = PASSWORD_MASK

Review Comment:
   Yeah, probably it's best to just getting rid of it in the response. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to