You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/12/02 18:23:40 UTC
[GitHub] [superset] craig-rueda commented on a diff in pull request #22306: fix(ssh_tunnel): Address Base PR comments from peer review
craig-rueda commented on code in PR #22306:
URL: https://github.com/apache/superset/pull/22306#discussion_r1038410368
##########
superset/databases/ssh_tunnel/models.py:
##########
@@ -41,15 +42,17 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
__tablename__ = "ssh_tunnels"
id = sa.Column(sa.Integer, primary_key=True)
- database_id = sa.Column(sa.Integer, sa.ForeignKey("dbs.id"), nullable=False)
+ database_id = sa.Column(
+ sa.Integer, sa.ForeignKey("dbs.id"), nullable=False, unique=True
+ )
database: Database = relationship(
"Database",
backref=backref("ssh_tunnels", cascade="all, delete-orphan"),
foreign_keys=[database_id],
)
- server_address = sa.Column(EncryptedType(sa.String, app_config["SECRET_KEY"]))
- server_port = sa.Column(EncryptedType(sa.Integer, app_config["SECRET_KEY"]))
+ server_address = sa.Column(sa.Text)
Review Comment:
They shouldn't need to be encrypted, IMO. Server hostname/port shouldn't contain sensitive info :)
--
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-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org