Hiding sensitive data
The last thing that I want to add for this mini-project to be complete is to work with a field
option. In our case, we will work with an option called debug_redact
. This tells an application to redact the private information in the data. For us, this means hiding the phone numbers and email addresses.
Let’s start by adding the option to the fields we want to redact in our proto
file:
message Person { //... message PhoneNumber { string number = 1 [debug_redact = true]; Type type = 2; } string email = 1 [debug_redact = true]; repeated PhoneNumber phones = 2; } message Company { //... message EmailAddress { string email = 1 [debug_redact = true]; Department department = 2; } message PhoneNumber { string number = 1 [debug_redact...