-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat: modifed kafka to use config received from config-be. #3205
Conversation
5592f18
to
f47d873
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3205 +/- ##
==========================================
- Coverage 51.95% 51.90% -0.06%
==========================================
Files 321 322 +1
Lines 53194 53425 +231
==========================================
+ Hits 27639 27732 +93
- Misses 23910 24036 +126
- Partials 1645 1657 +12
☔ View full report in Codecov by Sentry. |
0e6ebcc
to
2d09715
Compare
2d09715
to
f47010d
Compare
require.NoError(t, err) | ||
require.Equal(t, controlplane.SSHKeyPair{ | ||
PrivateKey: "test-private-key", | ||
PublicKey: "test-public-key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani the public key was not being tested, I added it now.
@@ -342,3 +343,61 @@ func TestRetriesTimeout(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestGetDestinationSSHKeyPair(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani I converted some test checks to make use of require
for a more succint test.
@@ -357,18 +366,6 @@ func NewProducer(destination *backendconfig.DestinationT, o common.Opts) (*Produ | |||
return nil, fmt.Errorf("[Kafka] invalid SASL type: %w", err) | |||
} | |||
} | |||
|
|||
if destConfig.UseSSH { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani I moved the SSH block out of the if destConfig.SslEnabled {
condition like it was before.
User: conf.SSHConfig.User, | ||
Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)}, | ||
Timeout: conf.DialTimeout, | ||
HostKeyCallback: ssh.InsecureIgnoreHostKey(), // skipcq: GSC-G106 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani as discussed over standup this is an important change I introduced (cc @lvrach) and it's going to apply to all SSH connections for kafka destinations.
Let's not merge this one until we have the chance to do some proper manual end to end testing on dev. |
e11f1e8
to
d63ba4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani can you please revert the changes you made after the approvals? It looks like the SSH configuration is again read only if SSL is enabled which is a bug I had already fixed. As discussed yesterday the embedding of the Avro schema ID should be done in a separate PR. I suggest you just drop the recent commits and leave this PR as it was right after the 2 approvals and open another one with just the embedding.
NOTE: See this comment from last week.
d63ba4b
to
25b87e7
Compare
25b87e7
to
6c673ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saurav-malani I forced push a local copy that I had of the branch before you forced pushed the commits I did. Please leave these changes as they are, we just need to test them. If you need to test other things I suggest you start from this branch and push a copy of it e.g. feat.kafkaOverSshViaCP-test
.
@saurav-malani I'll resolve the conflicts, don't worry 👍 |
d4782c5
to
a8a3d5a
Compare
Description
Modified kafka to get ssh config from config-BE in addition to from env.
NOTE: getting config via env has to be deprecated in future.
Notion Ticket
https://www.notion.so/rudderstacks/Kafka-with-SSH-control-plane-config-8a25b92171464903a2a5db9e40645290?pvs=4
Security