summaryrefslogtreecommitdiff
path: root/examples/pki/gen_cmsz.py
Commit message (Collapse)AuthorAgeFilesLines
* Update hacking for Python3Andreas Jaeger2020-03-311-0/+1
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: Ic161a8f88c28d88898863e5b9d9380016fbb0d08
* Update json module to jsonutilscao.yuan2019-02-251-4/+5
| | | | | | | | | | 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
* Compressed Signature and ValidationAdam Young2014-05-091-0/+117
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