Code Monkey home page Code Monkey logo

Comments (4)

sethvargo avatar sethvargo commented on May 24, 2024

Hi @sshashwat66

Thank you for opening an issue. Can you share the steps and commands you are running to grant and revoke access to the secret?

Also, if there is no access defined, meaning when I put the secret and try to access it I get the unencrypted access. Shouldn't the secret be always protected and only accessible by the SA or member whom we add using the berglas grant ${BUCKET_ID}/foo --member * command ?

You are most likely an owner of the project and the bucket, meaning you inherit those permissions by being a project.owner. In general, the user who creates the secret will have access to read it.

from berglas.

sshashwat66 avatar sshashwat66 commented on May 24, 2024

Thanks for the reply @sethvargo
Commands to revoke the secret:

berglas revoke ${BUCKET_ID}/abcd/xyz \
  --member serviceAccount:[email protected]

Command to read the secret:

berglas access ${BUCKET_ID}/abcd/xyz

Also yes, I am owner of the project but I am using the SA to access the creds using this command I am switching as a SA

gcloud auth activate-service-account [email protected] \
  --key-file=key.json

Which I verify by gcloud config list

from berglas.

sethvargo avatar sethvargo commented on May 24, 2024

What is the output of:

gcloud auth list

Berglas uses the Default Application Credentials (glcoud auth application-default). Can you try setting the environment variable GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/key.json?

You can also see what has permissions on the Cloud Storage bucket in the Web UI. Double check for typos, etc. (berglas revoke will succeed if given a non-existent member).

from berglas.

sshashwat66 avatar sshashwat66 commented on May 24, 2024

Got it.
It was because of GOOGLE_APPLICATION_CREDENTIALS.
Thanks.

from berglas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.