3 Commits

Author SHA1 Message Date
Andreas Jaeger
e25df2943d Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: Ic161a8f88c28d88898863e5b9d9380016fbb0d08
2020-03-31 12:16:31 +02:00
cao.yuan
7a8ed5e312 Update json module to jsonutils
oslo project provide jsonutils, and keystoneclient  use it in many place[1],
this PS to update the remained json module to oslo jsonutils for
consistency.

[1]: https://github.com/openstack/python-keystoneclient/search?utf8=%E2%9C%93&q=jsonutils&type=

Change-Id: Id5275b5e6b5bf8f6d54406dac7ab95a30828cf58
2019-02-25 11:35:14 +00:00
Adam Young
3d6d749e6f Compressed Signature and Validation
Allows for a new form of document signature.

pkiz_sign will take data and encode it in a string that starts with
the substring  "PKIZ_".  This prefix indicates that the data has been:
1) Signed via PKI in Crypto Message Syntax (CMS) in binary (DER) format
2) Compressed using zlib (comparable to gzip)
3) urlsafe-base64 decoded

This process is reversed to validate the data.

middleware/auth_token.py will be capable of validating Keystone
tokens that are marshalled in the new format.  The current existing
"PKI" tokens will continue to be identified with "MII", issued by
default, and validated as well.  It will require corresponding changes
on the Keystone server to issue the new token format.

A separate script for generating the sample
data used in the unit tests,
examples/pki/gen_cmsz.py,
also serves as an example of how to
call the API from Python code.

Some of the sample data for the old tests had to be regenerated. A
stray comma in one of the JSON files made for non-parsing JSON.

Blueprint: compress-tokens
Closes-Bug: #1255321

Change-Id: Ia9a66ba3742da0bcd58c4c096b28cc8a66ad6569
2014-05-09 11:48:17 -07:00