Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Implement encrypting message wrapper #1

Open
matthias-willhaben opened this issue Mar 31, 2021 · 0 comments
Open

Implement encrypting message wrapper #1

matthias-willhaben opened this issue Mar 31, 2021 · 0 comments

Comments

@matthias-willhaben
Copy link
Contributor

matthias-willhaben commented Mar 31, 2021

Description

Similar to the already existing HmacValidationWrapper, we want to have a MessageWrapper implementation that allows us to send Kafka messages fully end-to-end encrypted. The already existing MessageWrappingSerDe does all the message handling already, so the implementation of this feature can and should be completely Kafka independent (no Kafka knowledge/dependencies should be necessary, just a general understanding of messaging systems).

Requirements

  • Implement the Message wrapper interface, so the wrapMessage method replaces the whole message (byte-array) with an encrypted message and the unwrapMessage method should extract the original raw message
  • Make it easy and intuitive to use
  • Think of transitioning scenarios (encryption might be introduced to an already running topic, keys might change)
  • Make the code efficient, as it potentially runs for millions of messages (but without any tradeoffs in security)
  • Make meaningful assumptions for undefined parts of the implementation
  • Allow different encryption algorithms to be used with the implementation (nice to have for first iteration)

Non-requirements

  • Key-Exchange (you can just assume that you get all needed parameters in the constructor)

TODOs

  • Implement the Code
  • Write useful documentation if necessary (either in code or separately)
  • Implement Tests (Depending on the way it is tested this may require some limited Kafka knowledge, but can probably be easily duplicated from existing tests)

Note to a potential external developer: The existing code might not be ideal, it was written by one developer in a single iteration with barely any code reviews, so please keep that in mind when looking trough the existing code. Do not copy or stick to things that do not make sense for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant