{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17115","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17115/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17115/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17115/events","html_url":"https://github.com/kubernetes/kubernetes/issues/17115","id":116346016,"number":17115,"title":"\"kubectl proxy\" could rewrite absolute URLs using session cookies","user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars3.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"labels":[{"id":149621825,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/awaiting-more-evidence","name":"priority/awaiting-more-evidence","color":"fef2c0","default":false},{"id":173493835,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false},{"id":116712108,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/network","name":"sig/network","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-11-11T14:34:11Z","updated_at":"2017-05-15T20:18:21Z","closed_at":null,"body":"Springboarding off https://github.com/kubernetes/kubernetes/issues/17032#issuecomment-155622936: Right now, `kubectl proxy` (and the apiserver proxy) can't handle applications that do things like request absolute URLs in JavaScript. As more and more modern frameworks do this, this is going to limit the usefulness of the proxy. A proposal for a possibly evil way to handle this in `kubectl proxy`:\n- For the API proxy alone (i.e. not the static content proxy): Responses get tagged with a session cookie that identifies the original URL, e.g. `/api/v1/proxy/namespaces/default/services/zeppelin`.\n- For all incoming requests, we first check for a cookie and modify the request before it hits the mux, if it has a cookie and _isn't_ prefixed with `/api` (because the apiserver is doing rewrites here too, for good or ill). For the above cookie, we would prepend `/api/v1/proxy/namespaces/default/services/zeppelin` to the request.\n\nI think the biggest wart on the solution is that on the client side it doesn't look it's possible to tell the difference between `/api/v1/proxy/namespaces/default/services/zeppelin` and, say, `/api/v1/proxy/namespaces/default/services/zeppelin/#/`, without hacking to hack the URL namespace (which seems kind of gross). The latter is an actual URL that Zeppelin redirects to almost immediately, so if you whack on your browser bar and end up saving that URL, it's certainly a valid use case.\n\nI'm probably missing something obvious, and it's obviously not perfect, but I bet it solves #17032 and others we haven't seen yet.\n\ncc @brendandburns @liggitt \n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/301592281","html_url":"https://github.com/kubernetes/kubernetes/issues/17115#issuecomment-301592281","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17115","id":301592281,"user":{"login":"cmluciano","id":4790487,"avatar_url":"https://avatars2.githubusercontent.com/u/4790487?v=3","gravatar_id":"","url":"https://api.github.com/users/cmluciano","html_url":"https://github.com/cmluciano","followers_url":"https://api.github.com/users/cmluciano/followers","following_url":"https://api.github.com/users/cmluciano/following{/other_user}","gists_url":"https://api.github.com/users/cmluciano/gists{/gist_id}","starred_url":"https://api.github.com/users/cmluciano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmluciano/subscriptions","organizations_url":"https://api.github.com/users/cmluciano/orgs","repos_url":"https://api.github.com/users/cmluciano/repos","events_url":"https://api.github.com/users/cmluciano/events{/privacy}","received_events_url":"https://api.github.com/users/cmluciano/received_events","type":"User","site_admin":false},"created_at":"2017-05-15T20:18:21Z","updated_at":"2017-05-15T20:18:21Z","body":"Is this still relevant? I'm not sure if this is related to SIG-Network anymore."}}
{"actor":{"display_login":"cmluciano"}}