)]}'
{"specs/liberty/container-acl.rst":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ab553d361f6dafd42ab5e96d5a41288f128b1d26","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There needs to be a way to set ACL\u0027s on Barbican Containers such that a"},{"line_number":24,"context_line":"Keystone User can be granted read access to all of the secrets the container"},{"line_number":25,"context_line":"points to."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_bb70ed0b","line":25,"updated":"2015-06-11 08:38:46.000000000","message":"Can you describe why the current ACL solution is not sufficient for your needs?","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"332e8e900ad3cad87b10610f09e1cd3fb89146a5","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There needs to be a way to set ACL\u0027s on Barbican Containers such that a"},{"line_number":24,"context_line":"Keystone User can be granted read access to all of the secrets the container"},{"line_number":25,"context_line":"points to."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_b30a4278","line":25,"in_reply_to":"3afb71cf_bb70ed0b","updated":"2015-06-11 16:27:52.000000000","message":"The requirements below are not met by the current acl solution. Atomic\u0027ness is the biggest issue at the moment. There is no race free way to manage the acl entries and being security related, really must be safe.\n\nCurrently, you need to put an acl on the Container and then iterate on the container\u0027s secrets and add acl\u0027s on all of the secrets. Deleting the stack requires the opposite. When you are doing this in a template, this is significantly more work than needed and potentially error prone. Both the heat engine and the barbican api will see the extra load, and heat will potentially have to store a lot more state in its db. Also, what happens if a secret was a member of a container when the stack was launched, but removed before the heat stack was deleted? Would that permission stick around incorrectly?\n\nHeat Resources are basically thin wrappers around the create/delete methods of the services it orchestrates. Putting very much logic in them is usually a very bad idea and strongly discouraged by the Heat developers. Being required to put much logic in them tends to show deficiencies in the underlying project\u0027s API\u0027s.\n\nI\u0027m looking for a single PUT/DELETE call that can safely and race free add and remove the ability for a user to be able to gain read access a whole container of secrets.\n\nIf you believe I am incorrect in my understanding of the current acl situation (I totally could be), can you please provide me a rough workflow of how a heat template would orchestrate the example workflow below in a way that uses the current acls?","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ab553d361f6dafd42ab5e96d5a41288f128b1d26","unresolved":false,"context_lines":[{"line_number":61,"context_line":"is a race that will break security. So a restful API will be needed."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_b8b35397","line":64,"updated":"2015-06-11 08:38:46.000000000","message":"Can you be more verbose with the solution you\u0027re proposing? Honestly it\u0027s not very clear to me.","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"332e8e900ad3cad87b10610f09e1cd3fb89146a5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"is a race that will break security. So a restful API will be needed."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_99b9a77c","line":64,"in_reply_to":"3afb71cf_b8b35397","updated":"2015-06-11 16:27:52.000000000","message":"currently the api is something like:\n\nhttp post \u0027\u0027{\"read\": [\"uiserid1\", \"userid2\"], \"write\": [\"userid3\"]}\u0027 to /v1/container/acl\n\nIts race prone though. To add an entry, you have to download the old one, make your modifications, and re-post it back, hopefully without someone doing the same thing in the process, braking things.\n\nThis changes it to split out the users from the document posted so that records in the acl are rest addressable and atomically create/deletable.\n\nSo instead, you:\ncurl -d \u0027{\"access\":\"read\"}\u0027 https://barbican/v1/container/foo/acl/user/userid1\n\nTo undo that acl entry, you just delete it, ala\ncurl -X DELETE https://barbican/v1/container/foo/acl/user/userid1/read\n\nThen creates/deletes to bob don\u0027t race with creates/deletes to user joe in the same acl. The race is handled inside the Barbican database where its easy to deal with.\n\nDoes that help? There are two places in this document where the api is described and its not clear if I should just strip out the description here and rely on the one in the api section below. What do you think?","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ab553d361f6dafd42ab5e96d5a41288f128b1d26","unresolved":false,"context_lines":[{"line_number":69,"context_line":"not be used to make generic templates that are redistributable."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Proposed solution:"},{"line_number":72,"context_line":"GET /v1/container/\u003ccontainer_name or container_id\u003e/secret/\u003csecret_name\u003e"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Alternatives"},{"line_number":75,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_3b8bdd20","line":72,"updated":"2015-06-11 08:38:46.000000000","message":"Taking a quick look a the code, seems to me like filtering containers by name is missing. I could easily add that option though, in the same fashion that it\u0027s done for secrets.\n\nYou could do a GET call filtering containers by name. Once you\u0027re there, you would actually get a list of the secrets in the container, which would actually contain the name of the secret. You could iterate that, fetch the one with the appropriate name and then fetch the secret. Is that solution sufficient? or is there something missing there? It would be an extra call, but it would work.","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"332e8e900ad3cad87b10610f09e1cd3fb89146a5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"not be used to make generic templates that are redistributable."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Proposed solution:"},{"line_number":72,"context_line":"GET /v1/container/\u003ccontainer_name or container_id\u003e/secret/\u003csecret_name\u003e"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Alternatives"},{"line_number":75,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3afb71cf_d92f1f3d","line":72,"in_reply_to":"3afb71cf_3b8bdd20","updated":"2015-06-11 16:27:52.000000000","message":"Yes, adding the filtering by name thing would be a good thing and could be used to potentially avoid needing this api. I\u0027d be in favor of adding it no matter whether this spec ends up using it or not.\n\nThat being said, I\u0027m looking for a simple way to download a single secret from a\ncontainer by container_name and secret name. You are right in that this logic\ncould all be pushed out into the client to deal with. For this one use case, I think\nthat is a bad idea for the following reasons:\n\n * It adds extra load the api side\n * Makes the client much more complex.\n    * With this solution, a secret can be retrieved with a single curl call.\n    * Without, you probably need to go with the barbican cli in the vm, which\n       has a lot of dependencies.\n    * I\u0027d like to use this solution with some CentOS 6 vm\u0027s and maintaining modern \n      OpenStack client\u0027s in that environment is quite a lot of work. But curl works fine.\n * Its unclear how you could use a Container level ACL that allows secrets listed\n   within it to be downloaded with the existing Secret retrieval api. That api maybe\n   could add a check for the container acl but might degrade performance too\n   much.\n\nWhat do you think?","commit_id":"fb04f73f52374fbc500f0f13dd185df7e77adb43"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"8c62d2440d435ede9039941ab057c4534b925fa2","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There needs to be a way to set ACL\u0027s on Barbican Containers such that a"},{"line_number":24,"context_line":"Keystone User can be granted read access to all of the secrets the container"},{"line_number":25,"context_line":"points to."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_0d0796ca","line":25,"updated":"2015-06-25 10:19:33.000000000","message":"Sounds to me like what you would like is container ACL cascading. So when the ACL of a container would be set, that would \"cascade\" into the secrets it contains; meaning that the secrets would by default have the same ACL as the container. Of course, that could later be changed a certain secret\u0027s ACL is explicitly changed.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"6b24db4b4aa4f7b8a5831813455d862d1283ca1f","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There needs to be a way to set ACL\u0027s on Barbican Containers such that a"},{"line_number":24,"context_line":"Keystone User can be granted read access to all of the secrets the container"},{"line_number":25,"context_line":"points to."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_91e411e0","line":25,"in_reply_to":"fa32b979_0d0796ca","updated":"2015-08-05 16:23:03.000000000","message":"Juan, Yes, that would be one way of solving it. Solving it that way would be tricky, since you would either need to reference count the container -\u003e secret acl user entries or put in another field in the secret acl letting it know its associated with a container acl... The problem comes about when you have users using both the container and the secret acl\u0027s. If the user sets a container, then a secret acl, and then removes the container acl, the secret still should be available. If not done carefully that might not be the case.\n\nIts also harder to implement that rippling unless you do it at the database layer in a transaction. If the container acl rest call just calls the secret acl rest api, there\u0027s a lot of potential for breakage and error handling will be complicated.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"f8770be67f45bf7f7dce4cc72af3aadd0d8a246b","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There needs to be a way to set ACL\u0027s on Barbican Containers such that a"},{"line_number":24,"context_line":"Keystone User can be granted read access to all of the secrets the container"},{"line_number":25,"context_line":"points to."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ba3cc151_d557ef57","line":25,"in_reply_to":"fa32b979_0d0796ca","updated":"2015-07-09 17:03:27.000000000","message":"Would it be easier to just have some variable on the container like \"secret_acl_same\u003dtrue\" or some other named variable which indicates that the secrets within the container have the same ACL as the container? That way access to the secrets within the container is determined at the Container level.\n\nCascading can take a while if a lot of secrets occupy  a container and every time a new user needs access the ACL\u0027s will have to be updated for every secret. \n\nThen to deactivate this functionality just set \"secret_acl_same\u003dfalse\". Just a thought.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"8c62d2440d435ede9039941ab057c4534b925fa2","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"},{"line_number":29,"context_line":"created."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Lastly, there needs to be a simple API endpoint to allow fetching of a secret"},{"line_number":32,"context_line":"if all you know is a containername/uuid, and a secret name in the container."}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_cdda0e4b","line":29,"updated":"2015-06-25 10:19:33.000000000","message":"Seems to me like this could be handled by the \"cascading\" functionality. For the Container ACL operations, there could be a \"cascade\" flag, where, if set, it would also try to do the same operation for the secrets that the container encapsulates.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"6b24db4b4aa4f7b8a5831813455d862d1283ca1f","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Also, the adding and removing of User\u0027s to containers must be atomic and race"},{"line_number":28,"context_line":"free to enable a proper Heat Resource for OS::Barbican::ContainerACL to be"},{"line_number":29,"context_line":"created."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Lastly, there needs to be a simple API endpoint to allow fetching of a secret"},{"line_number":32,"context_line":"if all you know is a containername/uuid, and a secret name in the container."}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_31f50550","line":29,"in_reply_to":"fa32b979_cdda0e4b","updated":"2015-08-05 16:23:03.000000000","message":"Yes. It could potentially be solved in Barbican since it could do it all in a transaction in the db safely. It can\u0027t be done outside of Barbican. So I\u0027m ok with that solution.\n\nI prefer slightly the acl itself having a permission that implies recursion though, since cascading with a flag on acl create only affects secrets currently associated with a container. With the acl itself, it has the advantage that the user should be able to hot add/remove secrets from the container and those get automatically granted/revoked. If not carefully managed, secrets may not correctly have their acl\u0027s removed when the container acl is removed.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"7a9572504a6a12624e82e2fbd57eae716a04e9cf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"created."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Lastly, there needs to be a simple API endpoint to allow fetching of a secret"},{"line_number":32,"context_line":"if all you know is a containername/uuid, and a secret name in the container."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"All together these pieces will enable a Heat template to create an autoscaling"},{"line_number":35,"context_line":"group that launches and destroys Instance Stacks on the fly based on load that:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_996376dd","line":32,"updated":"2015-08-05 14:04:05.000000000","message":"If all you know is the Container ID, then you can find all secret IDs and names by just doing a GET.  I don\u0027t think a new endpoint is needed.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"6b24db4b4aa4f7b8a5831813455d862d1283ca1f","unresolved":false,"context_lines":[{"line_number":29,"context_line":"created."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Lastly, there needs to be a simple API endpoint to allow fetching of a secret"},{"line_number":32,"context_line":"if all you know is a containername/uuid, and a secret name in the container."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"All together these pieces will enable a Heat template to create an autoscaling"},{"line_number":35,"context_line":"group that launches and destroys Instance Stacks on the fly based on load that:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a4dcd0f_a8f032ff","line":32,"in_reply_to":"fa32b979_996376dd","updated":"2015-08-05 16:23:03.000000000","message":"If all you know is the containername, not the id, your stuck without doing something complicated. id\u0027s are specific to a tenant, and even specific to a given time. if you delete and recreate a container keeping the name, you would have to go update all of your heat templates if it was done by id. The app catalog needs to use names.\n\nThis part of the spec was intended to make it possible to have a very simple, single line curl command to retrieve secrets from barbican inside the vm. rather then a multi call algorithm but with the nova instance user spec getting super complicated, I\u0027m expecting it to be impossible now to not have a complicated client inside the vm, so this probably does not matter any more. :(","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"7a9572504a6a12624e82e2fbd57eae716a04e9cf","unresolved":false,"context_lines":[{"line_number":61,"context_line":"is a race that will break security. So a restful API will be needed."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_f903a274","line":64,"updated":"2015-08-05 14:04:05.000000000","message":"It\u0027s not clear from this route that it\u0027s an acl operation.  See","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"6b24db4b4aa4f7b8a5831813455d862d1283ca1f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"is a race that will break security. So a restful API will be needed."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a4dcd0f_68446a1a","line":64,"in_reply_to":"fa32b979_f903a274","updated":"2015-08-05 16:23:03.000000000","message":"Ah. yeah. acl should be in the path some where. Thanks for catching this.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"f5f21afd1eec35953a112e6e176c8b65036fb48f","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"},{"line_number":68,"context_line":"container. Container ID\u0027s are unique to the cloud they are on, and thus can"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_2a237c57","line":65,"updated":"2015-06-24 18:52:55.000000000","message":"As with Secrets, can Containers have the same name. If so we should just use \u003ccontainer_id\u003e since this is unique.\n\nIn: GET /v1/container/\u003ccontainer_name\u003e/secret/\u003csecret_name\u003e, how would we know to grab by name rather than id? \n\nex.)\n{\"container_ref\": \"http://localhost:9311/v1/containers/0fecaec4-7cd7-4e70-a760-cc7eaf5c3afb\"}\n\nworks, but for:\n\n{\"container_ref\": \"http://localhost:9311/v1/containers/\u003ccontainer_name\u003e\"}\n\n{\n    \"type\": \"generic\",\n    \"status\": \"ACTIVE\",\n    \"name\": \"Test Environment User Passwords\",\n    \"consumers\": [],\n    \"container_ref\": \"https://{barbican_host}/v1/containers/{uuid}\",\n    \"secret_refs\": [\n        {\n            \"name\": \"test_admin_user\",\n            \"secret_ref\": \"https://{barbican_host}/v1/secrets/{uuid}\"\n        },\n        {\n            \"name\": \"test_audit_user\",\n            \"secret_ref\": \"https://{barbican_host}/v1/secrets/{uuid}\"\n        }\n    ],\n    \"created\": \"2015-03-30T21:10:45.417835\",\n    \"updated\": \"2015-03-30T21:10:45.417835\"\n}\n\nwe would have to search in every container for one with container name.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":9237,"name":"Kevin Fox","email":"kevin@efox.cc","username":"kfox1111"},"change_message_id":"810448b12d072cf35301375600676aea5969f745","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"},{"line_number":68,"context_line":"container. Container ID\u0027s are unique to the cloud they are on, and thus can"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_ca369002","line":65,"in_reply_to":"fa32b979_2a237c57","updated":"2015-06-24 19:04:43.000000000","message":"I\u0027m thinking it should match the api\u0027s of other openstack projects. If the name is unique, go ahead and resolve it. If its not unique, throw an error. Its up to the user to decide if they want to keep their names unique and be able to lookup by name, or make them nonunique and have to deal with entering uuids.\n\nI\u0027m thinking of the usecase where a user has a heat parameter they have to specify the container to pull keys from. If its the name, you can default the text box to something friendly like \"trac\" for a trac site, and the user can just go create that container. If it s a uuid, you can\u0027t prepopulate the heat parameter and they have to deal with finding and pasting in uuids. A much worse user experience.\n\njaosorior said it should be relatively easy to add functionality to lookup/filter by name. \n\nAlso, I\u0027ve already basically implemented this part of the api once before here:\nhttps://review.openstack.org/#/c/159573/5/barbican/api/controllers/vm.py\n\nSo it should be possible to adapt it pretty easily.","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"014e471578bd2923756cbf6edb2d81ca510e4cce","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Proposed solution:"},{"line_number":64,"context_line":"POST \u0027{\"access\":\"read\"}\u0027 \u0026 DELETE /v1/container/\u003ccontainer_uuid\u003e/user/\u003cUSER_ID\u003e"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Second, the API must be extended to support simple fetching of secrets if all"},{"line_number":67,"context_line":"the user know\u0027s is the container\u0027s name and the name of the secret inside the"},{"line_number":68,"context_line":"container. Container ID\u0027s are unique to the cloud they are on, and thus can"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_45ea71dc","line":65,"in_reply_to":"fa32b979_ca369002","updated":"2015-06-24 19:28:39.000000000","message":"Sounds good. Just a little overhead in searching for the names, but that should be fine :)","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"014e471578bd2923756cbf6edb2d81ca510e4cce","unresolved":false,"context_lines":[{"line_number":68,"context_line":"container. Container ID\u0027s are unique to the cloud they are on, and thus can"},{"line_number":69,"context_line":"not be used to make generic templates that are redistributable."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Proposed solution:"},{"line_number":72,"context_line":"GET /v1/container/\u003ccontainer_name or container_id\u003e/secret/\u003csecret_name\u003e"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa32b979_4544b148","line":71,"updated":"2015-06-24 19:28:39.000000000","message":"Just a consideration, but may not be necessary:\n\nConsider changing:\n/v1/container/\u003ccontainer_name or container_id\u003e/secret/\u003csecret_name\u003e\n\nto\n/v1/container/\u003ccontainer_name or container_id\u003e/secret_refs/\u003csecret_ref_name\u003e\n\nin order to match:\n{\n    \"type\": \"generic\",\n    \"status\": \"ACTIVE\",\n    \"name\": \"Test Environment User Passwords\",\n    \"consumers\": [],\n    \"container_ref\": \"https://{barbican_host}/v1/containers/{uuid}\",\n    \"secret_refs\": [\n        {\n            \"name\": \"test_admin_user\",\n            \"secret_ref\": \"https://{barbican_host}/v1/secrets/{uuid}\"\n        },\n        {\n            \"name\": \"test_audit_user\",\n            \"secret_ref\": \"https://{barbican_host}/v1/secrets/{uuid}\"\n        }\n    ],\n    \"created\": \"2015-03-30T21:10:45.417835\",\n    \"updated\": \"2015-03-30T21:10:45.417835\"\n}","commit_id":"310d4deead3ea770207670f8935dbcab5f9faa2e"}]}
