[Openstack] Ubuntu 12.04 B1, Keystone (redux) + Service Catalogs
Kevin Jackson
kevin at linuxservices.co.uk
Mon Mar 12 09:35:47 UTC 2012
Hi Dean,
This is true only if that particular command line option is used - so in
that case it makes sense, but this issue arose because I (possibly
inadvertently, but as an admin setting up accounts and testing accounts
this is feasible so one would argue if this is an edge case) had
SERVICE_TOKEN set which meant that --username --password were ignored: The
issue in this case is that if SERVICE_ENDPOINT and SERVICE_TOKEN is used,
it overrides anyone wanting to use --username --password, for example.
This make sense:
parser.add_argument('--token',
default=env('SERVICE_TOKEN'),
help='Defaults to env[SERVICE_TOKEN]')
parser.add_argument('--endpoint',
default=env('SERVICE_ENDPOINT'),
help='Defaults to env[SERVICE_ENDPOINT]')
But not if I chose to use
parser.add_argument('--username',
default=env('OS_USERNAME'),
help='Defaults to env[OS_USERNAME]')
it doesn't affect the user's journey path as it is only interested in a
valid token - not my options.
I can see a rationale for this - if you have a token already, then why
authenticate. But because I specifically asked for authentication on the
command line by specifying a --username and --password it should use these
instead?
Regards,
Kev
On 11 March 2012 22:58, Dean Troyer <dtroyer at gmail.com> wrote:
> On Sun, Mar 11, 2012 at 2:35 PM, Kevin Jackson
> <kevin at linuxservices.co.uk> wrote:
> > Thanks Adam for clarifying the position of the ENVVARS: SERVICE_ENDPOINT
> and
> > SERVICE_TOKEN.
> > There are a couple of issues I have with this though:
> >
> > 1) It's not clear that these are strictly over-riding envvars.
>
> Actually, the environment variables (if set) are used for the default
> value of the command-line options, so the command-line option do in
> fact override the environment variables.
>
>
> https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/shell.py#L97
>
> dt
>
> --
>
> Dean Troyer
> dtroyer at gmail.com
>
--
Kevin Jackson
@itarchitectkev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120312/e5ee1a43/attachment.html>
More information about the Openstack
mailing list