-
Notifications
You must be signed in to change notification settings - Fork 213
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
Integrate with Kafka Connect and Debezium MySQL/Postgres/MongoDb plugin for CDC #3236
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,42 @@ | |
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.plugins.kafka.configuration; | ||
package org.opensearch.dataprepper.model.plugin.kafka; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep these out of You can make use of extensions, or perhaps add a |
||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.AssertTrue; | ||
|
||
import java.util.stream.Stream; | ||
|
||
/** | ||
* A helper class that helps to read auth related configuration values from | ||
* pipelines.yaml | ||
*/ | ||
public class AuthConfig { | ||
|
||
@JsonProperty("sasl") | ||
private SaslAuthConfig saslAuthConfig; | ||
|
||
/* | ||
* TODO | ||
public static class SslAuthConfig { | ||
// TODO Add Support for SSL authentication types like | ||
// one-way or two-way authentication | ||
|
||
public SslAuthConfig() { | ||
} | ||
} | ||
|
||
@JsonProperty("ssl") | ||
private SslAuthConfig sslAuthConfig; | ||
|
||
public SslAuthConfig getSslAuthConfig() { | ||
return sslAuthConfig; | ||
} | ||
|
||
*/ | ||
|
||
public SaslAuthConfig getSaslAuthConfig() { | ||
return saslAuthConfig; | ||
} | ||
|
||
public static class SaslAuthConfig { | ||
@JsonProperty("plaintext") | ||
private PlainTextAuthConfig plainTextAuthConfig; | ||
|
@@ -45,40 +67,6 @@ public OAuthConfig getOAuthConfig() { | |
public String getSslEndpointAlgorithm() { | ||
return sslEndpointAlgorithm; | ||
} | ||
|
||
@AssertTrue(message = "Only one of AwsIam or oAuth or PlainText auth config must be specified") | ||
public boolean hasOnlyOneConfig() { | ||
return Stream.of(awsIamAuthConfig, plainTextAuthConfig, oAuthConfig).filter(n -> n != null).count() == 1; | ||
} | ||
|
||
} | ||
|
||
|
||
/* | ||
* TODO | ||
public static class SslAuthConfig { | ||
// TODO Add Support for SSL authentication types like | ||
// one-way or two-way authentication | ||
|
||
public SslAuthConfig() { | ||
} | ||
} | ||
|
||
@JsonProperty("ssl") | ||
private SslAuthConfig sslAuthConfig; | ||
|
||
public SslAuthConfig getSslAuthConfig() { | ||
return sslAuthConfig; | ||
} | ||
|
||
*/ | ||
|
||
@Valid | ||
@JsonProperty("sasl") | ||
private SaslAuthConfig saslAuthConfig; | ||
|
||
public SaslAuthConfig getSaslAuthConfig() { | ||
return saslAuthConfig; | ||
} | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...per-api/src/main/java/org/opensearch/dataprepper/model/plugin/kafka/EncryptionConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.plugin.kafka; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class EncryptionConfig { | ||
@JsonProperty("type") | ||
private EncryptionType type = EncryptionType.SSL; | ||
|
||
@JsonProperty("insecure") | ||
private boolean insecure = false; | ||
|
||
public EncryptionType getType() { | ||
return type; | ||
} | ||
|
||
public boolean getInsecure() { | ||
return insecure; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...i/src/main/java/org/opensearch/dataprepper/model/plugin/kafka/KafkaClusterAuthConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.plugin.kafka; | ||
|
||
public interface KafkaClusterAuthConfig { | ||
AwsConfig getAwsConfig(); | ||
|
||
AuthConfig getAuthConfig(); | ||
|
||
EncryptionConfig getEncryptionConfig(); | ||
|
||
String getBootStrapServers(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...i/src/main/java/org/opensearch/dataprepper/model/plugin/kafka/UsesKafkaClusterConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.plugin.kafka; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* An interface that a plugin who uses Kafka Cluster will implement when kafka_cluster_config is configured | ||
*/ | ||
public interface UsesKafkaClusterConfig { | ||
|
||
void setBootstrapServers(final List<String> bootstrapServers); | ||
|
||
void setKafkaClusterAuthConfig(final AuthConfig authConfig, | ||
final AwsConfig awsConfig, | ||
final EncryptionConfig encryptionConfig); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why are going to an old revision?
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.
Kafka Connect doesn't work with 11.0.15, the latest one is with 9.4.48.v20220622.
I mentioned this as the first thing in the high-level design, and has been approved by Rajs and Dinu
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.
This could be a bit of a problem.
Also, why does this even need Jetty? Perhaps we can disable the admin server?
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.
Kafka Connect needs it
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.
the newer version is 9.4.51.v20230217