Skip to content

Commit

Permalink
fix(data-warehouse): add username option to sshtunnel key pair (#23030)
Browse files Browse the repository at this point in the history
add username option to sshtunnel
  • Loading branch information
EDsCODE authored Jun 17, 2024
1 parent cf99128 commit aa01904
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ export const SOURCE_DETAILS: Record<ExternalDataSourceType, SourceConfig> = {
label: 'Key pair',
value: 'keypair',
fields: [
{
name: 'username',
label: 'Tunnel username',
type: 'text',
required: false,
placeholder: 'User1',
},
{
name: 'private_key',
label: 'Tunnel private key',
Expand Down
1 change: 1 addition & 0 deletions posthog/warehouse/models/ssh_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def get_tunnel(self, remote_host: str, remote_port: int) -> SSHTunnelForwarder:
else:
return SSHTunnelForwarder(
(self.host, int(self.port)),
ssh_username=self.username,
ssh_pkey=self.parse_private_key(),
ssh_private_key_password=self.passphrase,
remote_bind_address=(remote_host, remote_port),
Expand Down

0 comments on commit aa01904

Please sign in to comment.