PKI and PKIZ tokens contain unnecessary whitespace

Bug #1348262 reported by Dolph Mathews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Alexander Makarov

Bug Description

In the race to produce smaller PKI tokens, we've overlooked that we can produce smaller JSON bodies by removing all whitespace between structural characters. For example, the following JSON blobs are all equally valid:

  { "key" : "value" , "foo" : "bar" }

... as compared to what we're producing today:

  {"key": "value", "foo": "bar"}

... as compared to all unnecessary whitespace removed:

  {"key":"value","foo":"bar"}

This optimization would save us a few bytes in both PKI and PKIZ tokens.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/109343

Changed in keystone:
status: Triaged → In Progress
Dolph Mathews (dolph)
tags: added: pki
Dolph Mathews (dolph)
Changed in keystone:
milestone: juno-3 → none
assignee: Dolph Mathews (dolph) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Dolph Mathews (<email address hidden>) on branch: master
Review: https://review.openstack.org/109343
Reason: if anyone is interested in picking this up, please do

tags: added: low-hanging-fruit
Changed in keystone:
assignee: nobody → Alexander Makarov (amakarov)
Changed in keystone:
status: Triaged → In Progress
Changed in keystone:
assignee: Alexander Makarov (amakarov) → Marek Denis (marek-denis)
Changed in keystone:
assignee: Marek Denis (marek-denis) → Alexander Makarov (amakarov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/120043
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=0b877af50e9ed62f8eeb82e11f8aa95d5db82626
Submitter: Jenkins
Branch: master

commit 0b877af50e9ed62f8eeb82e11f8aa95d5db82626
Author: Alexander Makarov <email address hidden>
Date: Tue Sep 9 13:28:31 2014 +0400

    PKI and PKIZ tokens unnecessary whitespace removed

    In the race to produce smaller PKI tokens, we've overlooked
    that we can produce smaller JSON bodies by removing all whitespace
    between structural characters.

    This patch offers a solution by overloading
    item_separator and key_separator in class SmarterEncoder
    used to produce json response.

    Change-Id: Id7fcc82a28359e85feac57f9469f2bcd9192ee50
    Closes-Bug: #1348262

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (feature/hierarchical-multitenancy)

Fix proposed to branch: feature/hierarchical-multitenancy
Review: https://review.openstack.org/138182

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (feature/hierarchical-multitenancy)

Change abandoned by Morgan Fainberg (<email address hidden>) on branch: feature/hierarchical-multitenancy
Review: https://review.openstack.org/138182

Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
description: updated
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.