Questions tagged [google-secret-manager]

Secret Manager provides a secure and convenient tool for storing API keys, passwords, certificates, and other sensitive data on Google Cloud Platform.

Secret Manager is a Google Cloud product that provides a secure and convenient way to store and access API keys, passwords, certificates, and other sensitive data.

Resources

Related Products

312 questions
3
votes
2 answers

Permission denied to google cloud secret on firebase function deploy

I have a firebase project with a google cloud function like this: export const myFun = functions.region("europe-west1") .runWith({ timeoutSeconds: 10, secrets: ['MY_SECRET'] }) .https.onCall((data, context) => {/*doStuff()*/}); The function…
3
votes
1 answer

io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED when querying Secret Manager from App Engine

I'm trying to list secrets in Secret Manager with listSecrets() from an App Engine app, but the grpc requests keeps timing out after 60 s: com.google.api.gax.rpc.DeadlineExceededException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: Deadline…
3
votes
1 answer

How to correctly mock a gcp client library call in python

How do I correctly write a unit test for a function that uses the GCP secret manager client library. I've been reading up on unit testing and mocking but I just can't seem to grasp what's going wrong here. I've never really written unit tests other…
3
votes
1 answer

How to access multiple secrets from google secret manager?

I have an application which wants to access only the secrets for that application. Is there anyway to access multiple secrets instead of accessing single secret each time?
3
votes
1 answer

What if I want to store my service accounts credentials into GCP's secret manager to be used by my applications

To reach a secret stored in GCP's Secret Manager I need a user with the permission todo that, like for instance a SA+roles/secretManages.Accessor. There's no other way we can access the secrets from secret manager. Right? Is it safe to assume that…
JGG
  • 304
  • 2
  • 12
3
votes
1 answer

403 Request had insufficient authentication issues while accessing Secrets on GCP within a container

I am trying to access a secret on GCP Secrets and I get the following error : in get_total_results "api_key": get_credentials("somekey").get("somekey within key"), File "/helper.py", line 153, in get_credentials response =…
3
votes
3 answers

GCP secretmanager from Spring Boot throws ConverterNotFoundException

I'm trying to access gcp secreetmanager from an appengine deployed Spring Boot applicationm, but I keep getting a org.springframework.core.convert.ConverterNotFoundException: org.springframework.beans.factory.BeanCreationException: Error creating…
3
votes
2 answers

Error: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid auth credential

My Node.js code utilizing Google Secret Manager stopped working (it worked fine some time ago). I have set GOOGLE_APPLICATION_CREDENTIALS env variable to valid path and console.log(process.env.GOOGLE_APPLICATION_CREDENTIALS); prints it…
Destabilizator
  • 458
  • 6
  • 18
3
votes
3 answers

PROJECT_ID env and Secret Manager Access

I would like to use the Secret Manager to store a credential to our artifactory, within a cloud build step. I have it working using a build similar to: steps: - name: 'busybox:glibc' entrypoint: 'sh' args: ['-c', 'env'] secretEnv:…
Stefano
  • 412
  • 2
  • 10
3
votes
1 answer

How to properly use a secret from the Secret Manager in a Cloud Run deployment via gcloud shell

I am trying to build me a gcloud script to deploy my cloud run service. This service has access to a hosted MongoDB and therefore I have to provide the password credentials via environment variable. I'd like to pass this password via a secret…
xetra11
  • 7,671
  • 14
  • 84
  • 159
3
votes
3 answers

Google Cloud - How to grant access to group of secrets by label or name?

I want to be able to grant a service account in Google Cloud access to multiple secrets based on a naming convention or even better, based on a label. So far, it's beginning to look like GCP only provides ability to provide access based on the…
3
votes
1 answer

How do you get secrets from GCP's Secret Manager in a local environment?

I created a secret on the Secrets Manager console. Then I took tried using the Go code quickstart guide like ctx := context.Background() client, err := secretmanager.NewClient(ctx) if err != nil { log.Println(err) } // Build the request. req :=…
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
3
votes
2 answers

Look up secrets from gcloud secrets manager directly as secretGenerator with kustomize

I am setting up my Kubernetes cluster using kubectl -k (kustomize). Like any other such arrangement, I depend on some secrets during deployment. The route I want go is to use the secretGenerator feature of kustomize to fetch my secrets from files or…
2
votes
1 answer

How to create a CGP Cloud Run service that depends on Secret Manager with terrafrom without having secrets in local files

I want to use terraform to manage my Cloud Run deployments but the Cloud Run deployments depend on secrets. Therefore Secret Manager secrets have to be created by terraform beforehand but I do not want my secrets stored in variables. What I have am…
2
votes
0 answers

Passing Database Password to Dataproc PySpark batch job

I want to create a pyspark job, and I want to have two separate environments: sandbox and production. Based on the environment it runs in, the script should connect either to the sandbox or production postgres database that runs on Google Cloud…
1 2
3
20 21