Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(data-warehouse): add username option to sshtunnel key pair #23030

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading