Giter Club home page Giter Club logo

Comments (8)

macdude357 avatar macdude357 commented on June 2, 2024

I can't take a shot at this one. By "validate" do you mean prompt the user to acknowledge that the account number in the config is the desired one?

from cloudraider.

pandian912 avatar pandian912 commented on June 2, 2024

Store account number in config... Get account number with aws api call and verify if they match

from cloudraider.

macdude357 avatar macdude357 commented on June 2, 2024

The way I'm thinking about implementing this is to have the user add a property to src/test/resources/config.properties named "aws.targetAccount". In looking at how I would insert the logic to validate the account, I was thinking about creating a base class for the Delegator classes and put the logic in that base class. Ideally, I could refactor a lot of the boilerplate code from the Delegators into that base class. Does that work?

from cloudraider.

pandian912 avatar pandian912 commented on June 2, 2024

Validating the account number on aws credential initialization would be better i believe.

from cloudraider.

zeeshanSD avatar zeeshanSD commented on June 2, 2024

Are we limiting this for config driven accounts? What about credentials that are stored in environment variables or aws config files? Not sure the value of account number here? Perhaps "Who am I?" api call to see which account it is?

from cloudraider.

pandian912 avatar pandian912 commented on June 2, 2024
  1. we can get account number from env variable
  2. also handle case where account number is not present.. In such a case we disable acc number validation altogether.

from cloudraider.

macdude357 avatar macdude357 commented on June 2, 2024

So my understanding is that you want the user to indicate what account he is targeting via an env var. The code should then validate that the credentials that are being used are actually for that "target" account number. If the env var does not exist, then no validation takes place.

from cloudraider.

pandian912 avatar pandian912 commented on June 2, 2024

Added comments here - https://github.com/intuit/CloudRaider/pull/13/files

So the check priority will be like as follows:

  • account number from env variable (doucment the variable name in readme)
  • account number in config file
  • no account number found in above scenarios, so don't do account number verification (log the same)

from cloudraider.

Related Issues (14)

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.