I have a scenario to encrypt/decrypt (AES) my data coming in pubsub/GCS bucket. I am getting bigdata(terabytes of records) in either GCS or Pubsub. I have apache beam code running using dataflow to do some kind of transformation (group by etc). I would need to include encryption of few fields (PII) while processing the data also i would required to decrypt this records in future. The processed data write to Bigquery.
My decryption request is something like below in BQ.
select firstname, lastname from table where id=1234
Here in this above example , previously I have encrypted my first , last name and id as it contains PII info.(deterministic). my encryption should be based on Id (1234).
encrypted value of first name and last name of 567 is vary from 1234.
when i am giving query where id=1234 , this 1234 is id in clear text(un encrypted form).
is there anyway to implement such kind of encryption/decryption mechanism in GCP/apach beam/dataflow ?. I don't want to use DLP as it have some limitations.