[openstack-dev] [Keystone] Reviewers wanted: Delegated Auth a la Oauth
stevemar at ca.ibm.com
Fri Jul 19 15:57:31 UTC 2013
I don't want to derail anything, as there are still open issues in your
note; but it's worth mentioning that the session fixation attack issue you
mentioned was in OAuth1.0, it was addressed in OAuth1.0a.
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: 07/19/2013 07:15 AM
Subject: Re: [openstack-dev] [Keystone] Reviewers wanted: Delegated Auth
a la Oauth
On 19/07/2013 07:10, Steve Martinelli wrote:
> Hi David,
> 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.
As I recall, there was a presentation from David Waite, Ping Identity,
about OAuth2, and after this it was agreed that OAuth2 would be used as
the generic delegation protocol in OpenStack, and that OAuth1 would only
be used as an alternative to the existing trusts delegation mechanism.
If this is not explicitly recorded in the meeting notes, then we will
need to ask others who were present at the design summit what their
> 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?
These are documented in RFC 5849 (http://tools.ietf.org/rfc/rfc5849.txt)
which is presumably the specification of OAuth1 that you are implementing.
There is also a session fixation attack documented here
> 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 say.
If the use case is to replace trusts, and to allow delegation from a
user to one or more openstack services then yes, it should be the user
who is wanting to launch the openstack service, and not any user who
happens to have the same role as this user. Otherwise a consumer could
get one user to authorise the job of another user, if they have the same
If the use case is general delegation, then relating it to Adam's post:
in order to future proof, the consumer should request authorising
attributes, rather than roles, since as Adam points out, the policy
based authz system is not restricted to using roles.
> 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.
This solves one of my problems, because now you are effectively saying
that the consumer has to be pre-registered with Keystone and have a
un/pw allocated to it. I did not see this mentioned in the original
blueprint, and thought (wrongly) that anything could be a consumer
without any pre-registration requirement. So the pre-registration
requirement removes most probability that the consumer can be evil,
since one would hope that the Keystone administrator would check it out
before registering it.
On the server side, we grab the consumer
> entity from our database and recreate the oauth_signature value, then
> verify the request.
> * 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
> Inactive hide details for David Chadwick ---06/19/2013 04:38:56 PM--- Hi
> Steve On 19/06/2013 20:56, Steve Martinelli wrote:David Chadwick
> ---06/19/2013 04:38:56 PM--- Hi Steve On 19/06/2013 20:56, Steve
> Martinelli wrote:
> 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
> Hi Steve
> On 19/06/2013 20:56, Steve Martinelli wrote:
> > Hey David,
> > 1. and 5. The delegate is not always known to keystone. The delegate
> > 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
> > to keystone. (Apologies if my keystoneclient example led you to
> > that)
> 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
> 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
> > 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,
> > 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
> > secret; the client would then sign the request and send only the key
> > *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
> > Thanks,
> > _____________________________________________
> > 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
> > 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
> > 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
> > 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
> > to delegate. One would normally expect the delegator to request
> > 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
> > The same security weakness is in step 1f as well.
> > 5. What is the purpose of having the delegate's secret?
> > regards
> > David
> > On 14/06/2013 14:31, Steve Martinelli wrote:
> > > Greetings!
> > >
> > > I've implemented the following blueprint for keystone: Delegated
> Auth a
> > > la Oauth [1
> > >
> > > The original spec [2 <https://gist.github.com/termie/5225817>]
> > > use case to help understand why we are providing this ability in
> > Keystone.
> > > 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
> > > 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