Skip to content

Decision Time: How to specify which fields to encrypt/decrypt#3

Open
asliwka-jobvalley wants to merge 1 commit intomainfrom
decision/what-fields-to-encrypt
Open

Decision Time: How to specify which fields to encrypt/decrypt#3
asliwka-jobvalley wants to merge 1 commit intomainfrom
decision/what-fields-to-encrypt

Conversation

@asliwka-jobvalley
Copy link
Contributor

Decision Time

The producer of the event has a list of fields to encrypt and replaces their value with the an object containing the encrypted value and some meta information, notably the name of the key used. The consumer has the same list, and for each field finds the used key by its given name and so can reproduce the original value.

In our CoP Architecture Meeting on 2022-08-03 we discussed three different solutions to the "which fields to encode" complex. In our next meeting on 2022-08-17 we will vote for one these proposal to be the final solution:

@SilvanCodes
Copy link
Contributor

I vote for suggestion no. 3 with suggested format:

{
  "encryptedFields": [
      "$.path.to.some.field",
      "$.path.to.other.field"
  ]
}

@kaikuchn
Copy link
Contributor

Where can I find the rationales behind those options? Pros/Cons, etc.?

Also have you considered not putting anything into the meta field? We are documenting our domain events anyway and part of that is to define the type. An encrypted field could just be a container-like type. If you absolutely want to have automated recognition of encrypted fields you could do that via json-spec.

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