Encryption and decryption GCP APIs
The code in this project is written in Python 3.7.6). The following additional libraries have been used:
- pandas
- google-cloud
- pandas-gbq
- google-cloud-storage
- google-cloud-bigquery
- gcsfs
- pycrypto
To deploy the Cloud Function into GCP using cloud SDK run the following:
gcloud functions deploy gcp-encrypt
--runtime python37
--env-vars-file ./env.yaml
--entry-point encrypt_from_bucket
--trigger-resource YOUR_TRIGGER_BUCKET_NAME
--trigger-event google.storage.object.finalize
To Expose the Cloud Function as API:
gcp-encrypt loads a csv file from a GCP bucket, encrypts some columns using SHA-256 encryption. A enc.csv is stored in another bucket with the encrypted columns replacing the clear ones.
The API is deployed to GCP as a Cloud Function.
- requirements.txt
- main.py
- env.yaml
- key.json
For licensing see LICENSE file.