euca2ools should read config and credentials from config file

Bug #485106 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Eucalyptus
Fix Released
Undecided
Unassigned
euca2ools (Ubuntu)
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

Binary package hint: euca2ools

euca2ools currently reads its configuration from 1 of 2 places:
a.) environment variables
b.) command line arguments

the configuration above that is read includes:
  EC2_URL
  EC2_ACCESS_KEY
  EC2_SECRET_KEY
  EC2_CERT
  EC2_PRIVATE_KEY
  S3_URL
  EUCALYPTUS_CERT

In addition to being a non-typical way of specifying configuration, the
environment variables
  EC2_ACCESS_KEY and EC2_PRIVATE_KEY
contain sensitive information. It is generally considered less than secure to
set sensitive information in the environment.

Instead or in addition to (really only for backwards compat) euca2ools should
read configuration from a config file. I suggest:

/etc/euca2ools/eucarc
$HOME/.eucarc

And additionally allow the caller to specify a config file. Ie:

euca-run-instances --config /tmp/my-config eki-abcdefg

Chuck Short (zulcss)
Changed in euca2ools (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Neil Soman (neilsoman) wrote :

Order of preference is user supplied config file (--config) followed by $HOME/.eucarc followed by /etc/euca2ools/eucarc followed by the environment.

------------------------------------------------------------
revno: 235
committer: Neil
branch nick: euca2ools-1.0
timestamp: Fri 2009-11-27 21:53:18 -0800
message:
  fixes #485106
------------------------------------------------------------

Changed in eucalyptus:
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

I'd also like to request the following:
 if no --config argument is found, and EUCA2OOLS_CFG is set (or some other environment variable) then it expected to have a path to a config file. ie:

# read default config
unset EUCA2OOLS_CFG; euca-describe-instances

# read /tmp/my.env.eucarc
export EUCA2OOLS_CFG=/tmp/my.env.eucarc; euca-describe-instances

# read /tmp/my.cmdline.cfg
unset EUCA2OOLS_CFG; euca-describe-instances --config /tmp/my.cmdline.cfg

# read /tmp/my.cmdline.cfg
export EUCA2OOLS_CFG=/tmp/my.env.eucarc; euca-describe-instances --config /tmp/my.cmdline.cfg

The benefit of this is that tools that invoke the euca2ools can be blissfully ignorant of --config, rather than having to explicitly support it.

Changed in euca2ools (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fixed upstream, merging...

Changed in euca2ools (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package euca2ools - 1.1~bzr238-0ubuntu1

---------------
euca2ools (1.1~bzr238-0ubuntu1) lucid; urgency=low

  * Merge from upstream bzr revision; should fix:
    - LP: #497495 - parse dir path correctly in euca-delete-bundle
    - LP: #439366 - show kernel and ramdisk in euca-describe-images
    - LP: #495618 - show blk dev mappings in euca-describe-image-attribute
    - LP: #485106 - read credentials from config file
    - LP: #450044 - create tmpfs mounts in euca-bundle-vol
    - LP: #479823 - correctly handle userid in euca-bundle-vol
    - LP: #461301 - fix user data encoding
  * Also, created Ubuntu packaging branch, with a common root to the upstream
    project
 -- Dustin Kirkland <email address hidden> Tue, 05 Jan 2010 23:13:36 -0600

Changed in euca2ools (Ubuntu):
status: In Progress → Fix Released
Changed in eucalyptus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.