Skip to content

DGS-21268 Add support for full payload encryption #1452

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

Merged
merged 1 commit into from
Jul 18, 2025

Refactor encryptor

2984574
Select commit
Loading
Failed to load commit list.
Merged

DGS-21268 Add support for full payload encryption #1452

Refactor encryptor
2984574
Select commit
Loading
Failed to load commit list.
SonarQube-Confluent / confluent-kafka-go Sonarqube Results failed Jul 14, 2025 in 52s

Quality Gate failed

Failed

  • 44.60% Coverage on New Code (is less than 80.00%)

Analysis Details

48 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 48 Code Smells

Coverage and Duplications

  • Coverage 44.60% Coverage (55.40% Estimated after merge)
  • Duplications No duplication information (0.50% Estimated after merge)

Project ID: confluent-kafka-go

View in SonarQube

Annotations

Check failure on line 97 in schemaregistry/serde/avrov2/avro.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro.go#L97

Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.

Check failure on line 204 in schemaregistry/serde/avrov2/avro.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro.go#L204

Refactor this method to reduce its Cognitive Complexity from 55 to the 15 allowed.

Check failure on line 394 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L394

Define a constant instead of duplicating this literal "Serializer configuration" 32 times.

Check failure on line 1540 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1540

Define a constant instead of duplicating this literal "encrypt.kms.type" 11 times.

Check failure on line 406 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L406

Define a constant instead of duplicating this literal "Deserializer configuration" 33 times.

Check failure on line 501 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L501

Define a constant instead of duplicating this literal "Expected valid schema id, found %d" 37 times.

Check failure on line 1543 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1543

Define a constant instead of duplicating this literal "ERROR,NONE" 8 times.

Check failure on line 1539 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1539

Define a constant instead of duplicating this literal "encrypt.kek.name" 11 times.

Check failure on line 499 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L499

Define a constant instead of duplicating this literal "Schema registration" 37 times.

Check failure on line 1533 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1533

Define a constant instead of duplicating this literal "test-encrypt" 11 times.

Check failure on line 351 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L351

Define a constant instead of duplicating this literal "topic1-value" 39 times.

Check failure on line 391 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L391

Define a constant instead of duplicating this literal "Schema Registry configuration" 33 times.

Check failure on line 388 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L388

Define a constant instead of duplicating this literal "mock://" 33 times.

Check failure on line 1541 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1541

Define a constant instead of duplicating this literal "encrypt.kms.key.id" 11 times.

Check failure on line 1540 in schemaregistry/serde/avrov2/avro_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/avrov2/avro_test.go#L1540

Define a constant instead of duplicating this literal "local-kms" 14 times.

Check failure on line 99 in schemaregistry/serde/jsonschema/json_schema.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema.go#L99

Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.

Check failure on line 208 in schemaregistry/serde/jsonschema/json_schema.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema.go#L208

Refactor this method to reduce its Cognitive Complexity from 28 to the 15 allowed.

Check failure on line 242 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L242

Define a constant instead of duplicating this literal "Serializer configuration" 24 times.

Check failure on line 236 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L236

Define a constant instead of duplicating this literal "mock://" 22 times.

Check failure on line 1124 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L1124

Define a constant instead of duplicating this literal "encrypt.kms.type" 5 times.

Check failure on line 254 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L254

Define a constant instead of duplicating this literal "Deserializer configuration" 21 times.

Check failure on line 1125 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L1125

Define a constant instead of duplicating this literal "encrypt.kms.key.id" 5 times.

Check failure on line 407 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L407

Define a constant instead of duplicating this literal "Expected valid schema id, found %d" 22 times.

Check failure on line 1127 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L1127

Define a constant instead of duplicating this literal "ERROR,NONE" 5 times.

Check failure on line 1123 in schemaregistry/serde/jsonschema/json_schema_test.go

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / confluent-kafka-go Sonarqube Results

schemaregistry/serde/jsonschema/json_schema_test.go#L1123

Define a constant instead of duplicating this literal "encrypt.kek.name" 5 times.