GithubHelp home page GithubHelp logo

Filebeat Google Cloud Storage Input requires JSON or file credentials for authentication which causes issues when using workload identity about beats HOT 3 CLOSED

bkaznowski avatar bkaznowski commented on August 24, 2024
Filebeat Google Cloud Storage Input requires JSON or file credentials for authentication which causes issues when using workload identity

from beats.

Comments (3)

bkaznowski avatar bkaznowski commented on August 24, 2024 1

Yes, I believe this sounds right. We use the gcp-pubsub input too and we haven't had any issues with using it alongside workload identity. It would also be a nice solution to bring both of these under the same behaviour

from beats.

elasticmachine avatar elasticmachine commented on August 24, 2024

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

from beats.

andrewkroh avatar andrewkroh commented on August 24, 2024

I think the same logic used by the GCP Pub/Sub input could be implemented by the GCS input. If none of the config options are set then it checks if it can load application default credentials before failing.

func (c *config) Validate() error {
// credentials_file
if c.CredentialsFile != "" {
if _, err := os.Stat(c.CredentialsFile); os.IsNotExist(err) {
return fmt.Errorf("credentials_file is configured, but the file %q cannot be found", c.CredentialsFile)
} else {
return nil
}
}
// credentials_json
if len(c.CredentialsJSON) > 0 {
return nil
}
// Application Default Credentials (ADC)
ctx := context.Background()
if _, err := google.FindDefaultCredentials(ctx, pubsub.ScopePubSub); err == nil {
return nil
}
return fmt.Errorf("no authentication credentials were configured or detected " +
"(credentials_file, credentials_json, and application default credentials (ADC))")
}

Does that sound correct to you @bkaznowski?

from beats.

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.