{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/2255","repository_url":"https://api.github.com/repos/apache/incubator-trafficcontrol","labels_url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/2255/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/2255/comments","events_url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/2255/events","html_url":"https://github.com/apache/incubator-trafficcontrol/issues/2255","id":322115113,"number":2255,"title":"Traffic Ops API endpoint for generating SSL keys needs validation","user":{"login":"rawlinp","id":6724053,"avatar_url":"https://avatars2.githubusercontent.com/u/6724053?v=4","gravatar_id":"","url":"https://api.github.com/users/rawlinp","html_url":"https://github.com/rawlinp","followers_url":"https://api.github.com/users/rawlinp/followers","following_url":"https://api.github.com/users/rawlinp/following{/other_user}","gists_url":"https://api.github.com/users/rawlinp/gists{/gist_id}","starred_url":"https://api.github.com/users/rawlinp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawlinp/subscriptions","organizations_url":"https://api.github.com/users/rawlinp/orgs","repos_url":"https://api.github.com/users/rawlinp/repos","events_url":"https://api.github.com/users/rawlinp/events{/privacy}","received_events_url":"https://api.github.com/users/rawlinp/received_events","type":"User","site_admin":false},"labels":[{"id":678937359,"url":"https://api.github.com/repos/apache/incubator-trafficcontrol/labels/Traffic%20Ops%20API","name":"Traffic Ops API","color":"808080","default":false},{"id":435396616,"url":"https://api.github.com/repos/apache/incubator-trafficcontrol/labels/bug","name":"bug","color":"ee0701","default":true},{"id":678937474,"url":"https://api.github.com/repos/apache/incubator-trafficcontrol/labels/major","name":"major","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-10T23:02:12Z","updated_at":"2018-05-11T14:05:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The `/api/$version/deliveryservices/sslkeys/generate` route currently doesn't validate the request payload very well. If the request payload is missing `\"deliveryservice\"` or has that key set to `null`, the request is passed through successfully. However, downstream components such as Traffic Router that make use of the `/cdns/name/*/sslkeys.json` endpoint expect the `\"deliveryservice\"` key to exist and have a value (the xml_id). Traffic Router can get into a state on startup where it is unable to serve requests until the offending record has been removed from Riak (that in itself is a bug which needs to be fixed - #2254).\r\n\r\nExample bad request:\r\n```\r\n{\r\n  \"key\": \"badkey\",\r\n  \"hostname\": \"cdn.anotherbadhostname.foo.net\",\r\n  \"country\": \"US\",\r\n  \"state\": \"CO\",\r\n  \"city\": \"Denver\",\r\n  \"organization\": \"blah\",\r\n  \"businessUnit\": \"blah\",\r\n  \"cdn\": \"my-cdn\"\r\n}\r\n```\r\n\r\nThis endpoint should validate that the request payload has a deliveryservice that actually exists."},"comment":{"url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/comments/388373656","html_url":"https://github.com/apache/incubator-trafficcontrol/issues/2255#issuecomment-388373656","issue_url":"https://api.github.com/repos/apache/incubator-trafficcontrol/issues/2255","id":388373656,"user":{"login":"mitchell852","id":251272,"avatar_url":"https://avatars2.githubusercontent.com/u/251272?v=4","gravatar_id":"","url":"https://api.github.com/users/mitchell852","html_url":"https://github.com/mitchell852","followers_url":"https://api.github.com/users/mitchell852/followers","following_url":"https://api.github.com/users/mitchell852/following{/other_user}","gists_url":"https://api.github.com/users/mitchell852/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchell852/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchell852/subscriptions","organizations_url":"https://api.github.com/users/mitchell852/orgs","repos_url":"https://api.github.com/users/mitchell852/repos","events_url":"https://api.github.com/users/mitchell852/events{/privacy}","received_events_url":"https://api.github.com/users/mitchell852/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T14:05:11Z","updated_at":"2018-05-11T14:05:11Z","author_association":"MEMBER","body":"If you generate ssl keys using TP (https://localhost:8442/#!/delivery-services/:ds_id/ssl-keys/generate), the xml-id will be passed with the request so that's good.\r\n\r\nBut yes, if you use the API directly, I guess there's nothing to stop you from putting in a bad key or leaving it off entirely.\r\n\r\n"}}
{"actor":{"display_login":"mitchell852"}}