[openstack-dev] [Keystone] Reviewers wanted: Delegated Auth a la Oauth
stevemar at ca.ibm.com
Fri Jul 19 06:10:14 UTC 2013
This email is long overdue.
1. I don't recall ever stating that we were going to use OAuth 1.0a over
2.0, or vice versa. I've checked
https://etherpad.openstack.org/havana-external-auth and couldn't find
anything that said definitively that we were going to use 2.0.
OAuth provider implementations (in python) of either version of the
protocol are few and far between.
2. I think I'm going to regret asking this question... (as I don't want to
get into a long discussion about OAuth 1.0a vs 2.0), but what are the
security weaknesses you mention?
3. I think you are disagreeing with the consumer requesting roles? And are
suggesting the consumer should be requesting an authorizing user instead?
I'm not completely against it, but I'd be interested in what others have to
4. Regarding the evil consumer; we do not just use the consumer key, the
magic oauth variables I mentioned also contain oauth_signature, which (if
you are using a standard oauth client) is the consumers secret (and other
values) and also hashed. On the server side, we grab the consumer entity
from our database and recreate the oauth_signature value, then verify the
If the evil consumer did not provide a provide a secret, (or a wrong
secret) it would fail on the verify step on the server side
(signatures wouldn't match).
If the evil consumer used his own library, he would still need to
sign the request correctly (done only with the correct consumer
Steve Martinelli | A4-317 @ IBM Toronto Software Lab
Software Developer - OpenStack
Phone: (905) 413-2851
E-Mail: stevemar at ca.ibm.com
From: David Chadwick <d.w.chadwick at kent.ac.uk>
To: Steve Martinelli/Toronto/IBM at IBMCA,
Cc: openstack-dev at lists.openstack.org
Date: 06/19/2013 04:38 PM
Subject: Re: [openstack-dev] [Keystone] Reviewers wanted: Delegated Auth
a la Oauth
On 19/06/2013 20:56, Steve Martinelli wrote:
> Hey David,
> 1. and 5. The delegate is not always known to keystone. The delegate (I
> like to say consumer) would use an oauth client (web-based one here
> _http://term.ie/oauth/example/client.php_); in an oauth flow, the
> delegate requires a key/secret pair, they don't have to be already known
> to keystone. (Apologies if my keystoneclient example led you to believe
I know that in Oauth the consumer is not always known to the resource
provider (Keystone) but Oauth has security weaknesses in it which OAuth2
has fixed. So I would hope we are not going to use Oauth as the general
delegation model. I thought that the last design summit agreed that
Oauthv2 should be the right way to go for general delegation, and that
Oauth was only going to be used to replace Adam's existing delegation
scheme in which all the entities are known to Keystone.
So consider this, where the consumer is not known to Keystone.
Keystone trusts the user, and the user trusts the consumer to access his
resources on Keystone/OpenStack. Keystone has no idea who the consumer
is. Now we all know that users are easily tricked by spear phishing,
spam and the rest into trusting evil sites, so an evil consumer tricks
the user and now OpenStack is open to abuse as the naive user has given
his privileges away to an evil consumer. Surely you cannot be saying
that we should build support for this into OpenStack and Keystone are you?
So I would propose that the OAuth delegation system you are building is
restricted to only work with entities that are already known to Keystone
and have been registered there by trusted administrators, who should be
much more difficult to trick than naive users. In other words, Keystone
should not provide full unrestricted support for OAuth delegation, that
should be reserved for OAuthv2 (or whatever the group decides).
> 3. The authorizing step happens later on, 1e; any user with sufficient
> credentials (the role matching the requested role), can authorize the
> request token. If you don't expect the delegate to have knowledge of
> roles, they shouldn't have knowledge of users either; so specifying one
> wouldn't make things easier.
The delegate/consumer has knowledge of the user (delegator) since it is
in direct communication with him/her. (They have to be in order for the
secret to be passed between themselves). The delegate does not a priori
have any knowledge of what should be delegated to it (the role). Only
the delegator knows this. So I do not follow your logic.
> 2. Continuing with my previous answer, to authorize a request token, the
> requested role would have to be a subset of the delegator roles.
> Otherwise any user could authorize the token.
We are agreed on this point, for sure.
> 4. When using an oauth client, the delegate would input both the key and
> secret; the client would then sign the request and send only the key and
> *other oauth specific variables* over to the server side.
this worries me a bit. Consider the case of the evil consumer again, who
is not using any standard oauth client software, but is using his own.
We have to make sure that the protocol exchange strongly authenticates
the consumer, and I dont see how your exchange does this with only the
username/key and some unspecified magic oauth variables.
The last thing we want to do is knowingly introduce security
vulnerabilities into Keystone
> Steve Martinelli | A4-317 @ IBM Toronto Software Lab
> Software Developer - OpenStack
> Phone: (905) 413-2851
> E-Mail: stevemar at ca.ibm.com
> Inactive hide details for David Chadwick ---06/14/2013 10:45:34 AM---Hi
> Steve Can I ask a few questions about this pleaseDavid Chadwick
> ---06/14/2013 10:45:34 AM---Hi Steve Can I ask a few questions about
> this please
> From: David Chadwick <d.w.chadwick at kent.ac.uk>
> To: OpenStack Development Mailing List
<openstack-dev at lists.openstack.org>,
> Cc: Steve Martinelli/Toronto/IBM at IBMCA
> Date: 06/14/2013 10:45 AM
> Subject: Re: [openstack-dev] [Keystone] Reviewers wanted: Delegated Auth
> a la Oauth
> Hi Steve
> Can I ask a few questions about this please
> 1. Step 0b. Why do we need a new consumers table containing essentially
> un/pw pairs for the delegate (called key/secret in the spec) when the
> delegate is already known to keystone and can authenticate using its
> existing credentials?
> 2. Step 1b. How does the delegate know which role to request? This is
> unintuitive. A delegator (rather than delegate) knows the role he wants
> to delegate. One would normally expect the delegator to request Keystone
> to delegate this role to the named delegate, rather than the delegate
> asking for a role to be delegated to it, since it requires an out of
> band communications between the delegator and delegate to take place
> before the delegation, in which the delegator tells the delegate its
> un/pw and the role it should ask for. This seems to be a rather
> contrived exchange of messages.
> 3. Step 1b. Why does the delegate not specify who should do the
> delegation?. This is another unintuitive feature. A delegate would not
> normally simply ask a service to give it a role, since the service is
> not empowered to do this. It has to be the existing role holder (the
> delegator) who has to authorise this, but in step 1b the delegator is
> not mentioned.
> 4. In step 1b the delegate is only authenticating itself via its
> username/key, and this was specified by the delegator when he created
> the new consumer in step 0b. So the delegator could have used a simple
> name/key like Fred, which means that it would then be very easy for
> anyone to masquerade as the delegate. Wouldnt it be better to require
> both the un/pw (key/secret) in this exchange rather than simply the key?
> The same security weakness is in step 1f as well.
> 5. What is the purpose of having the delegate's secret?
> On 14/06/2013 14:31, Steve Martinelli wrote:
> > Greetings!
> > I've implemented the following blueprint for keystone: Delegated Auth
> > la Oauth [1
> > The original spec [2 <https://gist.github.com/termie/5225817>] has a
> > use case to help understand why we are providing this ability in
> > If you're familiar with keystone, or just familiar with Oauth, I'd
> > really appreciate your input. There are two change sets; a keystone
> > patch [3 <https://review.openstack.org/#/c/29130/>] and keystoneclient
> > patch [4 <https://review.openstack.org/#/c/30043/>].
> > Thanks!
> > References:
> > 1.
> > 2. https://gist.github.com/termie/5225817
> > 3. https://review.openstack.org/#/c/29130/
> > 4. https://review.openstack.org/#/c/30043/
> > Thanks,
> > _____________________________________________
> > Steve Martinelli | A4-317 @ IBM Toronto Software Lab
> > Software Developer - OpenStack
> > Phone: (905) 413-2851
> > E-Mail: stevemar at ca.ibm.com
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 105 bytes
Desc: not available
More information about the OpenStack-dev