{"action":"closed","issue":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/1249","labels_url":"https://api.github.com/repos/tsuru/tsuru/issues/1249/labels{/name}","comments_url":"https://api.github.com/repos/tsuru/tsuru/issues/1249/comments","events_url":"https://api.github.com/repos/tsuru/tsuru/issues/1249/events","html_url":"https://github.com/tsuru/tsuru/issues/1249","id":97423594,"number":1249,"title":"issue? tsuru key-add doesn't remove old key on overwrite","user":{"login":"mtekel","id":483891,"avatar_url":"https://avatars.githubusercontent.com/u/483891?v=3","gravatar_id":"","url":"https://api.github.com/users/mtekel","html_url":"https://github.com/mtekel","followers_url":"https://api.github.com/users/mtekel/followers","following_url":"https://api.github.com/users/mtekel/following{/other_user}","gists_url":"https://api.github.com/users/mtekel/gists{/gist_id}","starred_url":"https://api.github.com/users/mtekel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtekel/subscriptions","organizations_url":"https://api.github.com/users/mtekel/orgs","repos_url":"https://api.github.com/users/mtekel/repos","events_url":"https://api.github.com/users/mtekel/events{/privacy}","received_events_url":"https://api.github.com/users/mtekel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tsuru/tsuru/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"fsouza","id":108725,"avatar_url":"https://avatars.githubusercontent.com/u/108725?v=3","gravatar_id":"","url":"https://api.github.com/users/fsouza","html_url":"https://github.com/fsouza","followers_url":"https://api.github.com/users/fsouza/followers","following_url":"https://api.github.com/users/fsouza/following{/other_user}","gists_url":"https://api.github.com/users/fsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/fsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsouza/subscriptions","organizations_url":"https://api.github.com/users/fsouza/orgs","repos_url":"https://api.github.com/users/fsouza/repos","events_url":"https://api.github.com/users/fsouza/events{/privacy}","received_events_url":"https://api.github.com/users/fsouza/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-27T09:34:28Z","updated_at":"2015-07-29T21:34:28Z","closed_at":"2015-07-29T21:34:28Z","body":"Suppose you do:\r\n```\r\n$ ssh-keygen -b 2048 -t rsa -f ~/.ssh/key_a -q -N \"\"\r\n$ ssh-keygen -b 2048 -t rsa -f ~/.ssh/key_b -q -N \"\"\r\n$ ssh-keygen -y -f ~/.ssh/key_a >~/.ssh/key_a.pub\r\n$ ssh-keygen -y -f ~/.ssh/key_b >~/.ssh/key_b.pub\r\n\r\n$ tsuru key-add mykey ~/.ssh/key_a.pub\r\nKey \"mykey\" successfully added!\r\n$ tsuru key-add mykey ~/.ssh/key_b.pub\r\nKey \"mykey\" successfully added!\r\n$ tsuru key-add mykey ~/.ssh/key_a.pub\r\nError: Key already exists.\r\n```\r\nWhen you now list keys with `tsuru key-list -n`, you will see the contents of key_b.pub. Nevertheless, key_a.pub is never removed from gandalf and does still keep working. Is this intended behaviour? Essentially, I'd expect that key to be removed/overwritten on update. I should then be able to overwrite/update the key back to original value. \r\n\r\nAlso, having keys in gandalf, which do work but aren't listed in keys is a bit of security issue. You assume only listed keys work, but in reality there are some additional keys that can be still used to push apps."}}