<div dir="ltr">If we were to write a uuid/fernet hybrid provider, it would only be expected to support something like stable/liberty to stable/mitaka, right? This is something that we could contribute to stackforge, too.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 9:21 AM, Adam Young <span dir="ltr"><<a href="mailto:ayoung@redhat.com" target="_blank">ayoung@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 05/03/2016 09:55 AM, Clint Byrum wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Excerpts from Steve Martinelli's message of 2016-05-02 19:56:15 -0700:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Comments inline...<br>
<br>
On Mon, May 2, 2016 at 7:39 PM, Matt Fischer <<a href="mailto:matt@mattfischer.com" target="_blank">matt@mattfischer.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, May 2, 2016 at 5:26 PM, Clint Byrum <<a href="mailto:clint@fewbar.com" target="_blank">clint@fewbar.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello! I enjoyed very much listening in on the default token provider<br>
work session last week in Austin, so thanks everyone for participating<br>
in that. I did not speak up then, because I wasn't really sure of this<br>
idea that has been bouncing around in my head, but now I think it's the<br>
case and we should consider this.<br>
<br>
Right now, Keystones without fernet keys, are issuing UUID tokens. These<br>
tokens will be in the database, and valid, for however long the token<br>
TTL is.<br>
<br>
The moment that one changes the configuration, keystone will start<br>
rejecting these tokens. This will cause disruption, and I don't think<br>
that is fair to the users who will likely be shown new bugs in their<br>
code at a very unexpected moment.<br>
<br>
</blockquote>
This will reduce the interruption and will also as you said possibly catch<br>
bugs. We had bugs in some custom python code that didn't get a new token<br>
when the keystone server returned certain code, but we found all those in<br>
our dev environment.<br>
<br>
From an operational POV, I can't imagine that any operators will go to<br>
work one day and find out that they have a new token provider because of a<br>
new default. Wouldn't the settings in keystone.conf be under some kind of<br>
config management? I don't know what distros do with new defaults however,<br>
maybe that would be the surprise?<br>
<br>
</blockquote>
With respect to upgrades, assuming we default to Fernet tokens in the<br>
Newton release, it's only an issue if the the deployer has no token format<br>
specified (since it defaulted to UUID pre-Newton), and relied on the<br>
default after the upgrade (since it'll switches to Fernet in Newton).<br>
<br>
</blockquote>
Assume all users are using defaults.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm glad Matt outlines his reasoning above since that is nearly exactly<br>
what Jesse Keating said at the Fernet token work session we had in Austin.<br>
The straw man we come up with of a deployer that just upgrades without<br>
checking then config files is just that, a straw man. Upgrades are well<br>
planned and thought out before being performed. None of the operators in<br>
the room saw this as an issue. We opened a bug to prevent keystone from<br>
starting if fernet setup had not been run, and Fernet is the<br>
selected/defaulted token provider option:<br>
<a href="https://bugs.launchpad.net/keystone/+bug/1576315" rel="noreferrer" target="_blank">https://bugs.launchpad.net/keystone/+bug/1576315</a><br>
<br>
</blockquote>
<br>
Right, I responded there, but just to be clear, this is not about<br>
_operators_ being inconvenienced, it is about _users_.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For all new installations, deploying your cloud will now have two extra<br>
steps, running "keystone-manage fernet_setup" and "keystone-manage<br>
fernet_rotate". We will update the install guide docs accordingly.<br>
<br>
With all that said, we do intend to default to Fernet tokens for the Newton<br>
release.<br>
<br>
</blockquote>
Great! They are supremely efficient and I love that we're moving<br>
forward. However, users really do not care about something that just<br>
makes the operator's life easier if it causes all of their stuff to blow<br>
up in non-deterministic ways (since their new jobs won't have that fail,<br>
it will be a really fun day in the debug chair).<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wonder if one could merge UUID and Fernet into a provider which<br>
handles this transition gracefully:<br>
<br>
if self._fernet_keys:<br>
return self._issue_fernet_token()<br>
else:<br>
return self._issue_uuid_token()<br>
<br>
And in the validation, do the same, but also with an eye toward keeping<br>
the UUID tokens alive:<br>
<br>
if self._fernet_keys:<br>
try:<br>
self._validate_fernet_token()<br>
except InvalidFernetFormatting:<br>
self._validate_uuid_token()<br>
else:<br>
self._validate_uuid_token()<br>
<br>
</blockquote></blockquote>
This just seems sneaky/wrong to me. I'd rather see a failure here than<br>
switch token formats on the fly.<br>
<br>
</blockquote>
You say "on the fly" I say "when the operator has configured things<br>
fully".<br>
<br>
Perhaps we have different perspectives. How is accepting what we<br>
previously emitted and told the user would be valid sneaky or wrong?<br>
Sounds like common sense due diligence to me.<br>
<br>
Anyway, the idea could use a few kicks, and I think perhaps a better<br>
way to state what I'm thinking is this:<br>
<br>
When the operator has configured a new token format to emit, they should<br>
also be able to allow any previously emitted formats to be validated to<br>
allow users a smooth transition to the new format. We can then make the<br>
default behavior for one release cycle to emit Fernet, and honor both<br>
Fernet and UUID.<br>
<br>
Perhaps ignore the other bit that I put in there about switching formats<br>
just because you have fernet keys. Let's say the new pseudo code only<br>
happens in validation:<br>
<br>
try:<br>
self._validate_fernet_token()<br>
except NotAFernetToken:<br>
self._validate_uuid_token()<br>
</blockquote>
<br></div></div>
I was actually thinking of a different migration strategy, exactly the opposite: for a while, run with the uuid tokens, but store the Fernet body. After while, switch from validating the uuid token body to the stored Fernet. Finally, switch to validating the Fernet token from the request. That way, we always have only one token provider, and the migration can happen step by step.<br>
<br>
It will not help someone that migrates from Icehouse to Ocata. Then again, the dual plan you laid out above will not either; at some point, people will have to dump the token table to make major migrations.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I fight for the users -- Tron<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>