Secret file (for Google ADC)

psoudan
PRO

5 months ago

Hi,

I need to provide a credentials file with secrets available at runtime (for google's ADC: https://cloud.google.com/docs/authentication/application-default-credentials).

In render.com there is a feature available to upload secrets that will be made available at runtime in the deployed containers: https://render.com/docs/configure-environment-variables#secret-files

I need to have a similar feature (if available) or a way how to do the same thing.

Thanks!

Awaiting User Response

5 Replies

unicodeveloper
PRO

5 months ago

You can do the same by adding it as an environment variable and adding the link to the file as a value.


Status changed to Awaiting User Response Railway 5 months ago


psoudan
PRO

5 months ago

The idea is to keep the content of the file as a secret.

How would I add the file to the container without making it part of the repository it checks out when deploying?

What I did now to work around this limitation, is adding the contents of a credentials file to an ENV VAR and at runtime, in the application, writing this contents to disk and setting a new ENV VAR pointing to this file location


Status changed to Awaiting Railway Response Railway 5 months ago


unicodeveloper
PRO

5 months ago

That's a good work around. It's not on the roadmap to support file secrets yet.


Status changed to Awaiting User Response Railway 5 months ago


suhjohn
PRO

4 months ago

fyi this doesn't work because of private keys that contain new lines


Status changed to Awaiting Railway Response Railway 4 months ago


4 months ago

The RAW Editor afaik does, but we do need to support files at some point.


Status changed to Awaiting User Response Railway 4 months ago