# GCP Application Credentials

**URL:** <https://community.doppler.com/t/gcp-application-credentials/211>\
**Category:** Need Help\
**Created:** [May 6, 2021, 12:50am UTC](https://community.doppler.com/t/gcp-application-credentials/211 "2021-05-06T00:50:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![avaitla16](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/avaitla16/32/136_2.png) [@avaitla16](https://community.doppler.com/u/avaitla16)\
**Post date:** [May 6, 2021, 12:50am UTC](https://community.doppler.com/t/gcp-application-credentials/211/1 "2021-05-06T00:50:51Z")

</div>

Some of our jobs use Google Cloud Service Accounts for Authentication (GOOGLE\_APPLICATION\_CREDENTIALS env var). This is usually a file path: [Getting started with authentication &nbsp;|&nbsp; Authentication &nbsp;|&nbsp; Google Cloud](https://cloud.google.com/docs/authentication/getting-started)

Whats the best way to run a process this way with doppler? I’m thinking we can certainly store the json into an env var, but we’d need to write this to the filesystem before running the process unless you know of a better way.

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [May 6, 2021, 1:57am UTC](https://community.doppler.com/t/gcp-application-credentials/211/2 "2021-05-06T01:57:26Z")

</div>

Hi @avaitla16,

If you’re using a language-specific SDK, you should be able to pass in the JSON directly instead of using the env var file method.

Are you using a language SDK or the gcloud CLI?

---

<div class="post-metadata">

**Author:** ![avaitla16](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/avaitla16/32/136_2.png) [@avaitla16](https://community.doppler.com/u/avaitla16)\
**Post date:** [May 6, 2021, 2:38am UTC](https://community.doppler.com/t/gcp-application-credentials/211/3 "2021-05-06T02:38:32Z")

</div>

Unfortunately we’re using a third party [Quick Start - Maxwell's Daemon](https://maxwells-daemon.io/quickstart/), which doesn’t have the ability to read from a json string (no special case for providing: Configurations.getGoogleCloudCredentials())

I ended up simply doing `echo $GOOGLE_APPLICATION_CREDENTIALS_JSON > google_creds.json` on startup.

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [May 6, 2021, 2:43am UTC](https://community.doppler.com/t/gcp-application-credentials/211/4 "2021-05-06T02:43:40Z")

</div>

Ok, thanks for replying back.

And just to confirm, is the `echo $GOOGLE_APPLICATION_CREDENTIALS_JSON > google_creds.json` code in a shell script that is being run by Doppler?

---

<div class="post-metadata">

**Author:** ![avaitla16](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/avaitla16/32/136_2.png) [@avaitla16](https://community.doppler.com/u/avaitla16)\
**Post date:** [May 6, 2021, 2:44am UTC](https://community.doppler.com/t/gcp-application-credentials/211/5 "2021-05-06T02:44:51Z")

</div>

Yes exactly:

```auto
doppler run -- ./main.sh

```

main.sh:

```auto
!/bin/bash

echo $GOOGLE_APPLICATION_CREDENTIALS_JSON > google_creds.json
/app/bin/maxwell ...

```

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [May 6, 2021, 2:47am UTC](https://community.doppler.com/t/gcp-application-credentials/211/6 "2021-05-06T02:47:49Z")

</div>

Great! Thanks for clarifying.
