keystone/keystone
wangxiyuan 203787c37f Clean up token extra code
Originally, the "extra" in token data is generated by auth plugin
and then will be return to users within token data.

In Kilo, the "extra" in token data was deprecated[1], after that
if the auth plugin generate the "extra", a warning log will be
raised. To stop the warning, the auth plugins should stop
generating "extra" field.

After two releases, in Mitaka, the "extra" in token data was
removed[2], but the "extra" was still created by default as an
empty dict {}. Actually, "extra" should not be created any more
in Mitaka because Keystone has warned the auth plugins for two
releases.

Now in Rocky, it's safe enough to remove the "extra" from token
issue flow at all since it has never been used from Mitaka. The
only concern for the out tree plugins about the removal is that
if they still put "extra" into auth_context, Keystone will raise
KeyError. But can it be happened? Only if the out tree plugins
ignore the warning in Kilo, and still contain "extra" but never
use them from Mitaka. For most auth plugins which follow the
Keystone deprecation step, this patch is a silent change.

[1]: https://review.openstack.org/#/c/162662
[2]: https://review.openstack.org/#/c/249480

Change-Id: I828cc0ad3ac265abdfea2e1571806add128ae51e
2018-08-02 11:52:10 +08:00
..
api Move trusts to flask native dispatching 2018-07-26 10:30:24 -07:00
application_credential Convert Keystone to use Flask 2018-06-04 20:14:41 -07:00
assignment Convert Keystone to use Flask 2018-06-04 20:14:41 -07:00
auth Clean up token extra code 2018-08-02 11:52:10 +08:00
catalog Convert json_home and version discovery to Flask 2018-06-27 09:58:35 -07:00
cmd Remove uuid token size check from doctor 2018-07-13 08:34:57 +08:00
common Merge "Simplify the token provider API" 2018-08-01 16:44:47 +00:00
conf Merge "Deprecate [token] infer_roles=False" 2018-07-27 00:49:05 +00:00
contrib Merge "Simplify the token provider API" 2018-08-01 16:44:47 +00:00
credential Move Credentials API to Flask Native 2018-07-16 21:58:21 -07:00
endpoint_policy Convert Keystone to use Flask 2018-06-04 20:14:41 -07:00
federation Merge "Simplify the token provider API" 2018-08-01 16:44:47 +00:00
identity Merge "Refactor _set_domain_id_and_mapping functions" 2018-07-20 11:36:26 +00:00
limit Merge "Address nits in strict-two-level implementation" 2018-07-27 04:40:31 +00:00
locale Imported Translations from Zanata 2018-06-16 06:28:00 +00:00
middleware Cleanup keystone.token.providers.common 2018-07-13 14:49:07 +00:00
models Remove remnants of token bind 2018-07-13 14:46:00 +00:00
oauth1 Override oauthlib docstrings that fail with Sphinx 1.7.5 2018-06-26 15:52:25 +00:00
policy Implement base for new RBAC Enforcer 2018-06-27 22:38:06 +00:00
resource Merge "Delete project limits when deleting project" 2018-07-25 02:34:21 +00:00
revoke Convert Keystone to use Flask 2018-06-04 20:14:41 -07:00
server Move unenforced_api decorator to module function 2018-08-01 18:22:52 +00:00
tests Clean up token extra code 2018-08-02 11:52:10 +08:00
token Cleanup keystone.token.providers.common 2018-07-13 14:49:07 +00:00
trust Move trusts to flask native dispatching 2018-07-26 10:30:24 -07:00
__init__.py Revert "Disable eventlet monkey-patching of DNS" 2013-05-10 10:24:48 -04:00
exception.py Merge "Add serialization for TokenModel object" 2018-07-26 05:05:03 +00:00
i18n.py Update links in keystone 2017-09-12 15:18:13 +08:00
notifications.py Simplify federation and oauth token callbacks 2018-02-16 21:41:30 +00:00
version.py Convert json_home and version discovery to Flask 2018-06-27 09:58:35 -07:00