Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-3808

Encryption Library: User-defined EncryptorField aliases are not used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • backlog-3.0
    • None
    • None
    • None
    • 1
    • SDK26, SDK28, SDK30

    Description

      ๐Ÿงต Story

      A user reported a bug in the forums where providing multiple Encryptor keys in their POCOs would throw an error "Missing encryptor for alias โ€˜โ€™" upon serializing their document before being sent over the network.

      This seems to be caused by a mixup during changing from LegacySigningKeyName to the new KeyName:

      • The EncryptedFieldContractResolver which only looked at the Attribute's LegacySigningKeyName and passed it to the EncryptedFieldConverter (which is null by default).
      • The EncryptedFieldConverter which did not pass the _legacySigningKeyName in the method parameters of ICryptoManager.Encrypt

      Meaning using a custom key alias e.g. [EncryptedField(KeyName = "customKey")] would make the library replace it with the default "_DEFAULT_".

      ๐Ÿ› ๏ธ Acceptance Criteria

      Multiple custom key names.

      ๐Ÿ“š Resources

      Attachments

        Activity

          People

            emilien.bevierre Emilien Bevierre
            emilien.bevierre Emilien Bevierre
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              PagerDuty