When building Fernet token payloads, we should attempt to convert user IDs to bytes
because this makes the payload a little smaller, resulting in a smaller token.
But if we are unable to convert the user ID to bytes we shouldn't fail with a
ValueError because the user ID could be coming from LDAP, or some other
external identity backend. We can't assume the user ID is a UUID.
Change-Id: I05b1e8389b15475c3fe512a2f82ec86f81422a05
Closes-Bug: 1459382
(cherry picked from commit cb32568954e7ab7f2dbaa2aa7a3070b34ae3ca08)
Reviewed: https:/ /review. openstack. org/186376 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=b255b8ff71a ab225d2788bf7cc 49f35e665aa9fc
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit b255b8ff71aab22 5d2788bf7cc49f3 5e665aa9fc
Author: Lance Bragstad <email address hidden>
Date: Wed May 27 18:18:28 2015 +0000
Don't fail on converting user ids to bytes
When building Fernet token payloads, we should attempt to convert user IDs to bytes
because this makes the payload a little smaller, resulting in a smaller token.
But if we are unable to convert the user ID to bytes we shouldn't fail with a
ValueError because the user ID could be coming from LDAP, or some other
external identity backend. We can't assume the user ID is a UUID.
Change-Id: I05b1e8389b1547 5c3fe512a2f82ec 86f81422a05 f2dbaa2aa7a3070 b34ae3ca08)
Closes-Bug: 1459382
(cherry picked from commit cb32568954e7ab7