livebook-dev / kino_db

Database integrations for Livebook
Apache License 2.0
40 stars 16 forks source link

Use Secrets for sensitive data inside GoogleBigQuery connection config #49

Open hugobarauna opened 2 years ago

hugobarauna commented 2 years ago

When we drag and drop the JSON credentials file to the Google BigQuery connection config, the Smart Cell generates code that contains sensitive data, like the private_key and private_key_id.

Now that we have the Secrets feature, we could use that feature somehow instead of saving sensitive data inside the notebook.

What do you think?

aleDsz commented 2 years ago

I've been thinking about this and storing the JSON itself inside a secret could work (detecting that's a JSON, and decoding after the System.fetch_env!/1). @josevalim WDYT?

josevalim commented 2 years ago

We would have to support secret uploads in the secret modal. Perhaps via a configuration parameter set when the modal is open by Kino. Then the file is uploaded and its contents stored in the env var.

/cc @cristineguadelupe