latchset / custodia

An API to manage secrets storage and retrieval
GNU General Public License v3.0
85 stars 27 forks source link

Make key container creation idempotent #206

Closed mbarnes closed 7 years ago

mbarnes commented 7 years ago

POST /secrets/mycontainer returns a 409 Conflict if mycontainer already exists. But since the request doesn't take any additional parameters, there's really no conflict.

I suggest instead returning a 200 OK to make the API a bit more "RESTful". Users could still distinguish whether the container already existed by checking for 200 OK vs 201 Created.

simo5 commented 7 years ago

sounds like a good idea