)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7f66c7754b88f85c11ab6898c7682cc09181ec72","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds documentation for public secret types.  Add two examples of storing"},{"line_number":10,"context_line":"public secrets, one with a POST followed by PUT, and one with a single"},{"line_number":11,"context_line":"POST.  The second example is incomplete until bug 1441866 is fixed."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I5c892d1b09e6bc0cb155c5591b12f409d3c86419"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a57f1b5_06f84c48","line":11,"range":{"start_line":11,"start_character":7,"end_line":11,"end_character":67},"updated":"2016-02-11 23:24:27.000000000","message":"This can be removed next commit.","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"}],"doc/source/api/reference/secret_types.rst":[{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_2f6bf9f2","line":119,"updated":"2015-04-09 01:39:27.000000000","message":"Comma after currently if this link is to be believed. Its on the Internet so it had to be true right?\n\nhttp://www.grammarly.com/answers/questions/14019-comma-after-currently/","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_f5c60099","line":119,"in_reply_to":"9aa53dc9_2f6bf9f2","updated":"2015-04-09 03:22:09.000000000","message":"Done","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request, the contents of the file must be encoded, since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_cf76cdd6","line":123,"updated":"2015-04-09 01:39:27.000000000","message":"Did you want \"content-type\" rather than \"content type\"? Also, if its \"content-type\" should it be have the `` as well?","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request, the contents of the file must be encoded, since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_9550d4d5","line":123,"in_reply_to":"9aa53dc9_cf76cdd6","updated":"2015-04-09 03:22:09.000000000","message":"Yeah, content-type is probably better.  I\u0027ll change all instances to use the hyphen.  I\u0027ve been using the double backquote for emphasis, and I don\u0027t think content type needs to be highlighted here.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request, the contents of the file must be encoded, since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"},{"line_number":127,"context_line":"encoded and the content encoding of ``base64`` can be used."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_4f519d35","line":125,"updated":"2015-04-09 01:39:27.000000000","message":"Comma not required \"encoded,\". I don\u0027t think its needed here either: \"request,\"","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request, the contents of the file must be encoded, since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"},{"line_number":127,"context_line":"encoded and the content encoding of ``base64`` can be used."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_95fe94ac","line":125,"in_reply_to":"9aa53dc9_4f519d35","updated":"2015-04-09 03:22:09.000000000","message":"Done","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        \"algorithm\": \"RSA\"}\u0027 \\"},{"line_number":150,"context_line":"   http://localhost:9311/v1/secrets | python -m json.tool"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This should return a reference (URI) for the Secret that was created:"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":".. code-block:: json"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_6f334115","line":152,"updated":"2015-04-09 01:39:27.000000000","message":"\"Secret\" is not capitalized in previous usage so should not be here either...?","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        \"algorithm\": \"RSA\"}\u0027 \\"},{"line_number":150,"context_line":"   http://localhost:9311/v1/secrets | python -m json.tool"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This should return a reference (URI) for the Secret that was created:"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":".. code-block:: json"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_55336cab","line":152,"in_reply_to":"9aa53dc9_6f334115","updated":"2015-04-09 03:22:09.000000000","message":"+1 for consistency.  I\u0027ll update all instances to lowercase.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"34f471dd4197cb4b990594431f5303d66a1ca6e2","unresolved":false,"context_lines":[{"line_number":167,"context_line":"   -H \u0027Accept: application/json\u0027 \\"},{"line_number":168,"context_line":"   -H \u0027Content-Type: application/octet-stream\u0027 \\"},{"line_number":169,"context_line":"   --data-binary @public.pem \\"},{"line_number":170,"context_line":"   http://localhost:9311/v1/secrets/cd20d134-c229-417a-a753-86432ad13bad"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"The server shoudl respond with a 2xx response to indicate that the PUT request"},{"line_number":173,"context_line":"was processed successfully:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_b2e52e39","line":170,"updated":"2015-04-09 02:27:26.000000000","message":"| python -m json.tool","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"   -H \u0027Accept: application/json\u0027 \\"},{"line_number":168,"context_line":"   -H \u0027Content-Type: application/octet-stream\u0027 \\"},{"line_number":169,"context_line":"   --data-binary @public.pem \\"},{"line_number":170,"context_line":"   http://localhost:9311/v1/secrets/cd20d134-c229-417a-a753-86432ad13bad"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"The server shoudl respond with a 2xx response to indicate that the PUT request"},{"line_number":173,"context_line":"was processed successfully:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_75d5501a","line":170,"in_reply_to":"9aa53dc9_b2e52e39","updated":"2015-04-09 03:22:09.000000000","message":"Barbican responds to this request with a 204 - No Content response as shown in the code block below.  Piping that into json.tool would result in an error.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":169,"context_line":"   --data-binary @public.pem \\"},{"line_number":170,"context_line":"   http://localhost:9311/v1/secrets/cd20d134-c229-417a-a753-86432ad13bad"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"The server shoudl respond with a 2xx response to indicate that the PUT request"},{"line_number":173,"context_line":"was processed successfully:"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":".. code-block:: json"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_4f387def","line":172,"updated":"2015-04-09 01:39:27.000000000","message":"Spelling \" shoudl\" -\u003e \"should\"","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":169,"context_line":"   --data-binary @public.pem \\"},{"line_number":170,"context_line":"   http://localhost:9311/v1/secrets/cd20d134-c229-417a-a753-86432ad13bad"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"The server shoudl respond with a 2xx response to indicate that the PUT request"},{"line_number":173,"context_line":"was processed successfully:"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":".. code-block:: json"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_35db4851","line":172,"in_reply_to":"9aa53dc9_4f387def","updated":"2015-04-09 03:22:09.000000000","message":"Done","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"updated\": \"2015-04-08T21:52:57.523969\""},{"line_number":206,"context_line":"    }"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Finally we can use the default content type listed in ``content_types`` to"},{"line_number":209,"context_line":"retrieve the public key:"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_ef2751c8","line":208,"updated":"2015-04-09 01:39:27.000000000","message":"\"Finally,\"  ? Add comma","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"updated\": \"2015-04-08T21:52:57.523969\""},{"line_number":206,"context_line":"    }"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Finally we can use the default content type listed in ``content_types`` to"},{"line_number":209,"context_line":"retrieve the public key:"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_15e044f9","line":208,"in_reply_to":"9aa53dc9_ef2751c8","updated":"2015-04-09 03:22:09.000000000","message":"Done","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"34f471dd4197cb4b990594431f5303d66a1ca6e2","unresolved":false,"context_lines":[{"line_number":233,"context_line":"   openssl rsa -in private.pem -out public.pem -pubout"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"   # Base64 encode the contents of the public key"},{"line_number":236,"context_line":"   PUB_BASE64\u003d$(base64 \u003c public.pem)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"   curl -vv -H \"X-Auth-Token: $TOKEN\" \\"},{"line_number":239,"context_line":"   -H \u0027Accept: application/json\u0027 \\"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_5267024d","line":236,"updated":"2015-04-09 02:27:26.000000000","message":"The contents of the key are already base64, why does the entire key need to be encoded again?","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":233,"context_line":"   openssl rsa -in private.pem -out public.pem -pubout"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"   # Base64 encode the contents of the public key"},{"line_number":236,"context_line":"   PUB_BASE64\u003d$(base64 \u003c public.pem)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"   curl -vv -H \"X-Auth-Token: $TOKEN\" \\"},{"line_number":239,"context_line":"   -H \u0027Accept: application/json\u0027 \\"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_55c12c53","line":236,"in_reply_to":"9aa53dc9_5267024d","updated":"2015-04-09 03:22:09.000000000","message":"The content of the public.pem file is a series of ascii character similar to:\n\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAooDFApVo0kDEXegR9QKT\n2wKZ0aS5FMqxKZ50q6GvnqD7xEpLM9pl385FKA3rm94CgZ9DHBVAP8MxsfGvlIJf\nvbo0sJK+7gLVhfo4I915lpQYl/HO7JP8F1E1ILXn53YxnSUDY8g0bsIGwb87JDXD\ne02YlHlMuzPCDxOiT70ZeupTuX65xJtjjb4g0Q6jnC1e/Qyw8MVjk2tOfwQX1qrG\nWsVUiT9TxJMbh+rOVyeJKpV15rayrO1GwuYTta2b0lNXCHqTBml245EUtc5l4FAb\ni4WCCOICydzE+PkS8XVBy9nX/hyvb7JY9PzoXF6S9umA8z0HA5p2XzpWRBQYpMaf\nvQIDAQAB\n-----END PUBLIC KEY-----\n\nWhich is not a valid base64 string because of the header and footer.  It also includes newline characters which are not shown in gerrit.  The newline characters are not allowed in a JSON string (they need to be escaped), so it\u0027s necessary to base64 encode the entire contents of the file to be able to send it inside the JSON request.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"0da41e2a32c9206a53ace0144e98a6b8ee1fafb5","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        \"algorithm\": \"RSA\"}\u0027 \\"},{"line_number":247,"context_line":"   http://localhost:9311/v1/secrets | python -m json.tool"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the Secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_4f1f5d6c","line":249,"updated":"2015-04-09 01:39:27.000000000","message":"\"Secret\". I don\u0027t think this needs to be capitalized here.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        \"algorithm\": \"RSA\"}\u0027 \\"},{"line_number":247,"context_line":"   http://localhost:9311/v1/secrets | python -m json.tool"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the Secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_3580e8f6","line":249,"in_reply_to":"9aa53dc9_4f1f5d6c","updated":"2015-04-09 03:22:09.000000000","message":"Done","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"34f471dd4197cb4b990594431f5303d66a1ca6e2","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the Secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_125dfa78","line":251,"updated":"2015-04-09 02:27:26.000000000","message":"I got this to work once I removed the newline characters from the key file.  The actual bug is that the newlines aren\u0027t handled correctly, right?","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c69621b78148bcfd5afd65711df98a576ab8964f","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the Secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9aa53dc9_f5ccc06b","line":251,"in_reply_to":"9aa53dc9_125dfa78","updated":"2015-04-09 03:22:09.000000000","message":"No, I think the bug is that we\u0027re mixing up a detail of the implementation of a PEM file (the fact that it uses base64 under the hood) with the barbican feature of allowing a user to base64 encode a binary payload so it can be included inside a JSON request.  As I mentioned in my reply on line 236, the content of the public.pem file is not in itself a valid base64-encoded string.","commit_id":"b59f776a5369a5b773276c1788eb4a2dbf9ae2bd"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"15d2679d653619beccc442d5017b4aa432bff7dc","unresolved":false,"context_lines":[{"line_number":2,"context_line":"Secret Types"},{"line_number":3,"context_line":"************"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Every secret in Barbican has a type.  secret types are used to describe"},{"line_number":6,"context_line":"different kinds of secret data that is stored in Barbican.  The type for a"},{"line_number":7,"context_line":"particular secret is listed in the secret\u0027s metadata as the ``secret_type``"},{"line_number":8,"context_line":"attribute."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9aa53dc9_75067087","line":5,"updated":"2015-04-09 03:26:27.000000000","message":"Heh, I think I took that s/Secret/secret a little too far. \u003e_\u003c","commit_id":"b889b0cf40736a85be4fb9e7af376735b2ff8899"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7eadf91f1ff324ab3b3254a7ae90e05fea336eef","unresolved":false,"context_lines":[{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently, there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_5973ba15","line":120,"range":{"start_line":120,"start_character":31,"end_line":120,"end_character":51},"updated":"2016-02-11 05:48:19.000000000","message":"``SubjectPublicKeyInfo``","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7eadf91f1ff324ab3b3254a7ae90e05fea336eef","unresolved":false,"context_lines":[{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently, there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_f9606637","line":120,"range":{"start_line":120,"start_character":52,"end_line":120,"end_character":60},"updated":"2016-02-11 05:48:19.000000000","message":"structure","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently, there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_c049bb61","line":120,"range":{"start_line":120,"start_character":31,"end_line":120,"end_character":51},"in_reply_to":"3a57f1b5_5973ba15","updated":"2016-02-11 22:22:15.000000000","message":"Done","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":117,"context_line":"The ``public`` secret type is used to store the public key of an asymmetric"},{"line_number":118,"context_line":"keypair.  For example, a public secret can be used to store the public key"},{"line_number":119,"context_line":"of an RSA keypair.  Currently, there is only one file format accepted for"},{"line_number":120,"context_line":"public secrets:  A DER-encoded SubjectPublicKeyInfo structre as defined by"},{"line_number":121,"context_line":"X.509 RFC 5280 that has been Base64 encoded with a PEM header and footer."},{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_e046374e","line":120,"range":{"start_line":120,"start_character":52,"end_line":120,"end_character":60},"in_reply_to":"3a57f1b5_f9606637","updated":"2016-02-11 22:22:15.000000000","message":"Done","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":19673,"name":"Michael Perng","email":"mperng@us.ibm.com","username":"mp"},"change_message_id":"a70d775c182e9f806f3947509f79d4ae3503fb21","unresolved":false,"context_lines":[{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request the contents of the file must be encoded since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"},{"line_number":127,"context_line":"encoded and the content encoding of ``base64`` can be used."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_7308f191","line":125,"range":{"start_line":125,"start_character":7,"end_line":125,"end_character":8},"updated":"2016-02-11 16:13:56.000000000","message":"nit: add comma here","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":122,"context_line":"This is the type of public key that is generated by the ``openssl`` tool by"},{"line_number":123,"context_line":"default.  The content-type used with public secrets is"},{"line_number":124,"context_line":"``application/octet-stream``.  When storing a public secret with a single POST"},{"line_number":125,"context_line":"request the contents of the file must be encoded since JSON does not accept"},{"line_number":126,"context_line":"newline characters.  In this case, the contents of the file must be Base64"},{"line_number":127,"context_line":"encoded and the content encoding of ``base64`` can be used."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_807663a2","line":125,"range":{"start_line":125,"start_character":7,"end_line":125,"end_character":8},"in_reply_to":"3a57f1b5_7308f191","updated":"2016-02-11 22:22:15.000000000","message":"Done","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":19673,"name":"Michael Perng","email":"mperng@us.ibm.com","username":"mp"},"change_message_id":"a70d775c182e9f806f3947509f79d4ae3503fb21","unresolved":false,"context_lines":[{"line_number":129,"context_line":"Example 2.1"},{"line_number":130,"context_line":"***********"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Create an RSA keypair and store the public key in Barbican.  For this example"},{"line_number":133,"context_line":"we will be using a metadata-only POST followed by a PUT."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_532cd501","line":132,"updated":"2016-02-11 16:13:56.000000000","message":"nit: add comma here (after \"For this example\")","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":129,"context_line":"Example 2.1"},{"line_number":130,"context_line":"***********"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Create an RSA keypair and store the public key in Barbican.  For this example"},{"line_number":133,"context_line":"we will be using a metadata-only POST followed by a PUT."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_6071e7a7","line":132,"in_reply_to":"3a57f1b5_532cd501","updated":"2016-02-11 22:22:15.000000000","message":"Done","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7eadf91f1ff324ab3b3254a7ae90e05fea336eef","unresolved":false,"context_lines":[{"line_number":218,"context_line":"The ``retrieved_public.pem`` file now has the same contents as the public.pem"},{"line_number":219,"context_line":"file we started with."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"Example 2.2"},{"line_number":222,"context_line":"***********"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"Create an RSA keypair and store the public key in Barbican.  For this example"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_1451870e","line":221,"updated":"2016-02-11 05:48:19.000000000","message":"This example isn\u0027t working. I\u0027m getting a 400 Malformed Json. Log: http://paste.openstack.org/show/486648/","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":218,"context_line":"The ``retrieved_public.pem`` file now has the same contents as the public.pem"},{"line_number":219,"context_line":"file we started with."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"Example 2.2"},{"line_number":222,"context_line":"***********"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"Create an RSA keypair and store the public key in Barbican.  For this example"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_e0bf17a8","line":221,"in_reply_to":"3a57f1b5_1451870e","updated":"2016-02-11 22:22:15.000000000","message":"Example 2.2 works for me running master (95eb30ad7caee9f54a6e6b303ee42ca94ba4bca0).  I just copy/pasted all the commands listed below.  Maybe it was a typing error?","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7f66c7754b88f85c11ab6898c7682cc09181ec72","unresolved":false,"context_lines":[{"line_number":218,"context_line":"The ``retrieved_public.pem`` file now has the same contents as the public.pem"},{"line_number":219,"context_line":"file we started with."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"Example 2.2"},{"line_number":222,"context_line":"***********"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"Create an RSA keypair and store the public key in Barbican.  For this example"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_895d2f7b","line":221,"in_reply_to":"3a57f1b5_e0bf17a8","updated":"2016-02-11 23:24:27.000000000","message":"Still doesn\u0027t work for me.\n\nI copied it straight from: https://review.openstack.org/cat/171859%2C4%2Cdoc/source/api/reference/secret_types.rst\n\nInput Log: http://paste.openstack.org/show/486775/\nBarbican Log: http://paste.openstack.org/show/486776/\n\nI think it\u0027s because of the spaces in $PUB_BASE64, generated from the new lines. Check this out: http://paste.openstack.org/show/486777/","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7eadf91f1ff324ab3b3254a7ae90e05fea336eef","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_99505260","line":251,"updated":"2016-02-11 05:48:19.000000000","message":"There should\u0027t be TODOs in docs, fix has been released as of Juno -\u003e https://bugs.launchpad.net/barbican/+bug/1441866","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"7f66c7754b88f85c11ab6898c7682cc09181ec72","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_26e0e828","line":251,"in_reply_to":"3a57f1b5_20020f3e","updated":"2016-02-11 23:24:27.000000000","message":"sounds good.","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"665bdc19f51634702c98362e661aedac92508311","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"This should return a reference (URI) for the secret that was created."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"TODO(dmend): Finish this example after bug #1441866 is fixed."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_20020f3e","line":251,"in_reply_to":"3a57f1b5_99505260","updated":"2016-02-11 22:22:15.000000000","message":"Not sure that I agree with the blanket statement of \"No TODOs in docs\", but you\u0027re right that the bug is fixed.  Will update with the appropriate response instead of the TODO.","commit_id":"cab3efdab4dfbe350a8e675ebf351e9879e37f37"}]}
