Skip to content

[AVRO] Encryption fails when referencing self defined types #2254

Closed

Description

Consider the following schema:

{
  "type": "record",
  "name": "test",
  "fields": [
    {
      "name": "complexField1",
      "type": {
        "fields": [
          {
            "name": "stringValue",
            "type": "string",
            "confluent:tags": [
              "PII"
            ]
          }
        ],
        "name": "ComplexFieldType",
        "type": "record"
      }
    },
    {
      "name": "complexField2",
      "type": "ComplexFieldType"
    }
  ]
}

Right now encryption correctly encrypts/decrypts complexField1 but fails to encrypt/decrypt complexField2.

The reason is that the code for encrypting the values does not follow/expand references and therefore does not see complexField2 as a record but as a single field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:schema-registry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions