Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.43 KB

File metadata and controls

59 lines (41 loc) · 1.43 KB

Key repository sample (Streams API)

This is a dummy sample of a bank account. Each account has an associated key to encrypt all operations associated to the account.

For this account, we manage the bank view and the agency view.

  • The bank has access to the full key repository (acount 0 to 9).

  • Agency 1 has only access to a subset of key repository (account 0 to 4)

  • Agency 2 has only access to a subset of key repostory (account 5 to 9)

All operations are written encrypted into a common topic operations

Running the sample

cd samples/kafkastream-with-keyrepo-sample
docker-compose up # on windows and OSX, you need to adjust
sh generateKeys.sh
sh runSamples.sh

Usage

Sample Main
link:./src/main/java/io/quicksign/kafka/crypto/samples/stream/keyrepo/SamplesMain.java[role=include]
Producer side
SampleProducer.java
link:./src/main/java/io/quicksign/kafka/crypto/samples/stream/keyrepo/SampleProducer.java[role=include]
Stream side
SampleStream.java
link:./src/main/java/io/quicksign/kafka/crypto/samples/stream/keyrepo/SampleStream.java[role=include]

and display

SampleStream.java
link:./src/main/java/io/quicksign/kafka/crypto/samples/stream/keyrepo/SampleStream.java[role=include]