ENH: encryption extension#5581
Conversation
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
…nsearch-project#5272) Signed-off-by: RashmiRam <ras.xena@gmail.com> Signed-off-by: George Chen <qchea@amazon.com>
…t#5344) * Handling end to end acknowledgement Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * introduced boolean to control end to end Acknowledgment Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * acknowledgments on case Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> --------- Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
* add batch size field for jira source Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> * remove unused config fields Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> * add interface function to simplify batchSize code Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> * default batch size comments Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> --------- Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
…ject#5358) Signed-off-by: Taylor Gray <tylgry@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…project#5310) * First working version Signed-off-by: Hai Yan <oeyh@amazon.com> * More progress and update existing unit tests Signed-off-by: Hai Yan <oeyh@amazon.com> * Add unit tests Signed-off-by: Hai Yan <oeyh@amazon.com> * Remove and rename classes Signed-off-by: Hai Yan <oeyh@amazon.com> * Remove test code Signed-off-by: Hai Yan <oeyh@amazon.com> * Address review comments Signed-off-by: Hai Yan <oeyh@amazon.com> * Address minor issues Signed-off-by: Hai Yan <oeyh@amazon.com> * Group MySQL and Postgres stream states Signed-off-by: Hai Yan <oeyh@amazon.com> * Address more comments Signed-off-by: Hai Yan <oeyh@amazon.com> * Fix Java21 build Signed-off-by: Hai Yan <oeyh@amazon.com> --------- Signed-off-by: Hai Yan <oeyh@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
* Handling end to end acknowledgement Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * checking pointing leader state for every one minute Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * corresponding test cases fix Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> --------- Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
…roject#5362) Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Hai Yan <oeyh@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Taylor Gray <tylgry@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…arch-project#5320) * lambda processor should retry for certain class of exceptions Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address Comment on complete codec Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Add retryCondidition to lambda Client Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address comments Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address comments and add UT and IT Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address comment on completeCodec Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> --------- Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Hai Yan <oeyh@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…partition.assignment.strategy, close consumer on shutdown (opensearch-project#5373) Signed-off-by: Taylor Gray <tylgry@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
Improve Jira logging Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
* injectable plugin metrics Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * removed an unused parameter Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> * fixing a flaky test Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> --------- Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…pensearch-project#5361) * initial refactoring Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * refactored sqs-source to use sqs-common Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * refactored SqsWorker to use the common library Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * minor changes Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * another small fix Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * added unit tests for sqs-common Signed-off-by: Jeremy Michael <jsusanto@amazon.com> * updated tests Signed-off-by: Jeremy Michael <jsusanto@amazon.com> --------- Signed-off-by: Jeremy Michael <jsusanto@amazon.com> Co-authored-by: Jeremy Michael <jsusanto@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
* schema revisions, add json aliases Signed-off-by: Katherine Shen <katshen@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…pensearch-project#5375) * Initial commit Signed-off-by: Hai Yan <oeyh@amazon.com> * Update unit tests Signed-off-by: Hai Yan <oeyh@amazon.com> * Add more metrics Signed-off-by: Hai Yan <oeyh@amazon.com> * Add more tests Signed-off-by: Hai Yan <oeyh@amazon.com> * Address review comments Signed-off-by: Hai Yan <oeyh@amazon.com> * Address review comments Signed-off-by: Hai Yan <oeyh@amazon.com> --------- Signed-off-by: Hai Yan <oeyh@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
* Add cloudwatch logs sink Signed-off-by: Krishna Kondaka <krishkdk@amazon.com> * Addressed review comments Signed-off-by: Krishna Kondaka <krishkdk@amazon.com> --------- Signed-off-by: Krishna Kondaka <krishkdk@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…bles. (opensearch-project#5417) Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…m from the CODEOWNERS, so this keeps these in sync. (opensearch-project#5419) Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…DelayTimer Metric for Auto-Scaling (opensearch-project#5409) Signed-off-by: Jeremy Michael <jsusanto@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: Hai Yan <oeyh@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
… messages that have been received many times (opensearch-project#5408) Signed-off-by: Taylor Gray <tylgry@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
…opensearch-project#5420) Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
* Zero Buffer Implementation and Tests Signed-off-by: Mohammed Aghil Puthiyottil <57040494+MohammedAghil@users.noreply.github.com> * Moved ZeroBuffer Implementation into data-prepper-core and addressed comments Signed-off-by: Mohammed Aghil Puthiyottil <57040494+MohammedAghil@users.noreply.github.com> * Modified ZeroBufferTests to use MockitoExtension and addressed comments Signed-off-by: Mohammed Aghil Puthiyottil <57040494+MohammedAghil@users.noreply.github.com> --------- Signed-off-by: Mohammed Aghil Puthiyottil <57040494+MohammedAghil@users.noreply.github.com> Signed-off-by: George Chen <qchea@amazon.com>
* Fix merge conflict Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address concurrency/synchronization comment Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Fix InMemoryBufferSynchronized and Add IT Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Address timeout threshold comment Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Add IT for timeout threshold Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> * Fix checkstyle Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> --------- Signed-off-by: Srikanth Govindarajan <srigovs@amazon.com> Signed-off-by: George Chen <qchea@amazon.com>
| implementation libs.commons.io | ||
| implementation libs.caffeine | ||
| implementation 'org.hibernate.validator:hibernate-validator:8.0.2.Final' | ||
| testImplementation(platform("org.junit:junit-bom:5.10.0")) |
There was a problem hiding this comment.
You don't need these two lines.
| testImplementation("org.junit.jupiter:junit-jupiter") | ||
| } | ||
|
|
||
| test { |
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| plugins { |
|
|
||
| package org.opensearch.dataprepper.model.encryption; | ||
|
|
||
| import com.sun.net.httpserver.HttpHandler; |
There was a problem hiding this comment.
Let's find a way to keep this out of data-prepper-api.
A simple solution would be to create a coupling between data-prepper-core and extension-plugin. I recommend this over exposing this in data-prepper-api. Longer-term we can have a better approach for extending the server.
| this.awsCredentialsConfig = awsCredentialsConfig; | ||
| } | ||
|
|
||
| public AwsCredentialsProvider getOrDefault() { |
There was a problem hiding this comment.
This code looks similar to what we already support in the aws-plugin.
There was a problem hiding this comment.
This class was refactored out from kafka-plugins and I did not see similar code in aws-plugin. The plan is to replace those classes in kafka-plugins with the counterparts here.
Or do you think it is better to refactor it into aws-plugin and let encryption-plugin depend on aws-plugin?
There was a problem hiding this comment.
Similar methods are provided in AwsCredentialsSupplier interface, and detailed actions through CredentialsProviderFactory.
Kafka plugins also use AwsCredentialsSupplier in AwsContext
There was a problem hiding this comment.
I refactored AwsContext into aws-plugin-api so that it will be reused by other plugins
There was a problem hiding this comment.
@dlvenable Can you also take a look? I'm good with other changes. Approving.
Signed-off-by: George Chen <qchea@amazon.com>
| import java.security.InvalidKeyException; | ||
| import java.security.NoSuchAlgorithmException; | ||
|
|
||
| class EncryptionContext { |
There was a problem hiding this comment.
Is there a reason this class is not public?
There was a problem hiding this comment.
This class does not need to be visible to other plugins.
Signed-off-by: George Chen <qchea@amazon.com>
…on-3 Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
|
|
||
| import java.util.UUID; | ||
|
|
||
| public class AwsContext { |
There was a problem hiding this comment.
This class seems decoupled from the rest of the AWS plugin.
Maybe the AwsPlugin should provide this in a new provider.
public void apply(final ExtensionPoints extensionPoints) {
var extensionsProvider = new AwsExtensionProvider(defaultAwsCredentialsSupplier);
extensionPoints.addExtensionProvider(new AwsExtensionProvider(defaultAwsCredentialsSupplier));
// new
extensionPoints.addExtensionProvider(new AwsContext(extensionsProvider));
}
Now, it might look like this:
public interface AwsContext {
AwsCredentialsProvider getOrDefault()
Region getRegionOrDefault();
}
There was a problem hiding this comment.
Discussed offline. As an intermediate step to unblock the PR, I made AwsContext an interface and AwsContextImpl a temporary implementation. Once this issue: #2825 gets resolved, AwsContext bean will be provided by aws-plugin.
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
ADD: encryption extension Signed-off-by: George Chen <qchea@amazon.com> Signed-off-by: Jeffrey Aaron Jeyasingh <jeffreyaaron06@gmail.com>
Description
This PR
Issues Resolved
Resolves #5335
Resolves #5336
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.