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

SGRC-4405 Update Kafka to 3.7.0 and Confluent to 7.6.0 #854

Merged
merged 8 commits into from
Jun 7, 2024

Conversation

sfc-gh-mbobowski
Copy link
Contributor

@sfc-gh-mbobowski sfc-gh-mbobowski commented Jun 3, 2024

Overview

SGRC-4405 Existing Vulnerabilities found in Connectors

Automatic security scan detected some vulnerabilities in the connector dependencies:

We can mitigate the majority of vulnerabilities by upgrading Kafka and Confluent. Some of them are still present in the most recent confluent releases:

Pre-review checklist

  • This change should be part of a Behavior Change Release. See go/behavior-change.
  • This change has passed Merge gate tests
  • Snowpipe Changes
  • Snowpipe Streaming Changes
  • This change is TEST-ONLY
  • This change is README/Javadocs only
  • This change is protected by a config parameter <PARAMETER_NAME> eg snowflake.ingestion.method.
    • Yes - Added end to end and Unit Tests.
    • No - it is nearly impossible to protect dependency change with a parameter
  • Is his change protected by parameter <PARAMETER_NAME> on the server side?
    • The parameter/feature is not yet active in production (partial rollout or PrPr, see Changes for Unreleased Features and Fixes).
    • If there is an issue, it can be safely mitigated by turning the parameter off. This is also verified by a test (See go/ppp).

@sfc-gh-mbobowski sfc-gh-mbobowski requested a review from a team as a code owner June 3, 2024 11:41
@sfc-gh-mbobowski sfc-gh-mbobowski force-pushed the mbobowski-SGRC-4405-update-deps branch from 92fc4d7 to 6f38e6a Compare June 3, 2024 11:56
@sfc-gh-mbobowski sfc-gh-mbobowski requested a review from a team as a code owner June 3, 2024 13:28
@@ -34,10 +35,13 @@ public abstract class ConnectClusterBaseIT {

@BeforeAll
public void beforeAll() {
Map<String, String> workerConfig = new HashMap<>();
Copy link
Contributor Author

@sfc-gh-mbobowski sfc-gh-mbobowski Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -94,7 +98,7 @@ protected final void waitForConnectorStopped(String connectorName) {
try {
connectCluster
.assertions()
.assertConnectorAndTasksAreStopped(connectorName, "Failed to stop the connector");
.assertConnectorDoesNotExist(connectorName, "Failed to stop the connector");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous implementation of assertConnectorAndTasksAreStopped returned true for any connector state other than RUNNING and was deleted in favour of assertConnectorIsStopped which checks exact matching of state STOPPED.

In our case the connector status after deletion is always NOT_FOUND.

7.2.*)
DOWNLOAD_URL="https://packages.confluent.io/archive/7.2/confluent-community-$CONFLUENT_VERSION.tar.gz"
7.6.*)
DOWNLOAD_URL="https://packages.confluent.io/archive/7.6/confluent-community-$CONFLUENT_VERSION.tar.gz"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a strong feeling that we can do better than this :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a ticket for tech debt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt if we ever have enough space to tackle such low priority issues. I will try to fix it by myself in the next PR rather than create a ticket.

@sfc-gh-mbobowski sfc-gh-mbobowski marked this pull request as draft June 5, 2024 10:05

<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lack of this dependency caused TestNativeStringAvrosr to fail on a task start with the following exception:
java.util.ServiceConfigurationError: io.confluent.kafka.schemaregistry.rules.RuleExecutor: io.confluent.kafka.schemaregistry.encryption.FieldEncryptionExecutor not a subtype

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for kafka-schema-rules

@sfc-gh-mbobowski sfc-gh-mbobowski marked this pull request as ready for review June 6, 2024 08:06
Copy link
Contributor

@sfc-gh-achyzy sfc-gh-achyzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Great work.

@sfc-gh-mbobowski sfc-gh-mbobowski merged commit cd3d281 into master Jun 7, 2024
80 of 81 checks passed
@sfc-gh-mbobowski sfc-gh-mbobowski deleted the mbobowski-SGRC-4405-update-deps branch June 7, 2024 10:44
ConfluentSemaphore pushed a commit to confluentinc/snowflake-kafka-connector that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants