Skip to content

Simple examples for the purpl gRPC interceptor

Notifications You must be signed in to change notification settings

PrivacyEngineering/purpl-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

purpl - examples

We used this repository for early stage evaluations and testing (mainly in the performance branch).

Citation

To cite the preprint version of the paper to appear in the Proceedings of the 24th International Conference on Web Engineering (ICWE 2024), use the following BibTeX entry:

@InProceedings{loechel2024hookin,
      author={Louis Loechel and Siar-Remzi Akbayin and Elias Grünewald and Jannis Kiesel and Inga Strelnikova and Thomas Janke and Frank Pallas},
      editor={Stefanidis, Kostas and Systa, Kari and Matera, Maristella and Heil, Sebastian and Kondylakis, Haridimos and Quintarelli, Elisa},
      title={{Hook-in Privacy Techniques for gRPC-based Microservice Communication}}, 
      year={2024},
      publisher="Springer Nature Switzerland",
      address="Cham",
      note={to appear in the Proceedings of the 24th International Conference on Web Engineering (ICWE 2024)},
      eprint={2404.05598},
      archivePrefix={arXiv},
      primaryClass={cs.CR},
}

In the /playground directory you'll find two examples showcasing the purpl-interceptor's functionality.

Example 1: /pingpong

Simple example for how to modify the server's response using a gRPC interceptor. Implements data minimzation in forms of reduction, noising & generalization.

🏓 two clients, one server

who? what?
goodclient sends request to server
badclient sends request to server
server_two sends a name, phone number, street, age and sex as response
interceptor minimizes the response depending on the client JWT

To find out more and try it out, head over to /pingpong.

Example 2: /interceptors

Find first steps in the ./playground/interceptors directory. As of right now it's a modified version of the go-grpc-middleware Repo. To to run,

cd playground/interceptors/examples
go run server/main.go
go run client/main.go

Wait a few seconds and then stop the server (ctrl + C).

Changes to server/main.go:

  • removed existing interceptors
  • added own interceptor
  • added own selector.MatchFunc

About

Simple examples for the purpl gRPC interceptor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.3%
  • Makefile 1.6%
  • Shell 0.1%