GCP Authentication

I want to authenticate a custom actor to write to GCP Cloud Storage. While coding this up is easy, does APIFY provide an option on the console to store the keys used for authentication? I wonder if there is a way to provide authentication to GCP via GitHub CI/CD. Can someone help me on this?
6 Replies
wise-white
wise-whiteโ€ข13mo ago
Hi @Deepak Antony. Thanks for asking! You can create so called "secret input", by adding "isSecret": true to your input schema property. Here is an arctile regarding this https://docs.apify.com/platform/actors/development/actor-definition/input-schema/secret-input Also there is already an GCP Actor in the Apify store, ill share it here just in case you would want to use it / get inspired by it ๐Ÿ™‚ https://apify.com/vojtam/gcp-uploader
Secret input | Platform | Apify Documentation
Learn about making some Actor input fields secret and encrypted. Ideal for passing passwords, API tokens, or login cookies to Actors.
Apify
GCP Uploader ยท Apify
Upload datasets and KV store records to Google cloud storage
optimistic-gold
optimistic-goldOPโ€ข13mo ago
Hi Lukas, thank you for sharing this information! This is quite useful!!!
optimistic-gold
optimistic-goldOPโ€ข13mo ago
Hi Lukas, I also found this option to set environment varibales for the actor: https://docs.apify.com/platform/actors/development/programming-interface/environment-variables Is using Actor input considered the best practise? I would like to set the authentication key once and forget about it. (As we all do)
Environment variables | Platform | Apify Documentation
Learn how to provide your Actor with context that determines its behavior through a plethora of pre-defined environment variables offered by the Apify SDK.
wise-white
wise-whiteโ€ข13mo ago
Hi @Deepak Antony, yes thats another option. I would say if you just want to set it once and then not worry about it, I would go with the Environment variables. Secret Inputs are great if you want to release the Actor to store or if you plan to change the key often, but both approaches should achieve the same result. Hope it helps ๐Ÿ™‚
optimistic-gold
optimistic-goldOPโ€ข13mo ago
Hi Lukas, that helps!! Thank you for your insight
wise-white
wise-whiteโ€ข13mo ago
No problem, glad it helped ๐Ÿ™‚.

Did you find this page helpful?