GithubHelp home page GithubHelp logo

Comments (6)

mtibben avatar mtibben commented on August 15, 2024

Could you just do both? Write out env vars as well as use the metadata
approach?
On Tue, 13 Oct 2015 at 5:04 PM, Lachlan Donald [email protected]
wrote:

Some SDKs don't support http_proxy for Instance Metadata, which means
that they can't get credentials from aws-vault, as it exposes the server
instance via http_proxy.

The impact of this issue is that some tools just aren't able to get
credentials, like in #40
#40.

(Side note: some SDKs have very short timeouts, probably a different issue)

So whilst there is the --write-env that provides a band-aid, it's hard to
imagine how to provide a solution that would work universally. Some options
I'm considering are:

  1. Change the default back to writing out environment vars and allow
    opt-in to the metadata approach
  2. Provide a small daemon that would actually bind to 169.254.169.254
    and forward to the correct exec server via magic. :'(
  3. ???


Reply to this email directly or view it on GitHub
#41.

from aws-vault.

pda avatar pda commented on August 15, 2024

I'm guessing the presence of the environment variables would stop the SDK from using the instance metadata server; presumably on EC2 you can override the latter with the former…

You can't bind to 169.254.169.254 without having a network interface associated with that address/network. Dynamically reconfiguring network interfaces is another jump in complexity. It might work though, and would seem more reliable than http_proxy.

from aws-vault.

lox avatar lox commented on August 15, 2024

After some thought, I think the best way forward is to do a couple of things:

  • Default to writing environment vars.
  • Allow opting in to --ec2-metadata, which defaults to 127.0.0.1:0 via http_proxy env.
  • Allow --ec2-metadata=169.254.169.254, which will work if you've run the contrib/lo-ec2-metadata.sh script that will be written.
  • Add an aws command for invoking the aws cli with the correct params.

from aws-vault.

mtibben avatar mtibben commented on August 15, 2024

Perhaps you could introduce the idea of profiles - a set of environment var config to make a certain command or sdk work. The default profile should attempt to work in most use cases, but you could potentially have boto or old-aws or ruby-sdk profiles to give those environments what they're expecting

from aws-vault.

lox avatar lox commented on August 15, 2024

It's tempting @mtibben, but I'd rather something that simply works for everything.

from aws-vault.

lox avatar lox commented on August 15, 2024

Fixed in master.

from aws-vault.

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.