Fix container terminal security risk

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-11-13 16:31:07 +08:00
parent 1cb1eb4f6d
commit cd99f78768
7 changed files with 27 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ func AddToContainer(c *restful.Container, client kubernetes.Interface, config *r
handler := newTerminalHandler(client, config)
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pod}").
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pod}/exec").
To(handler.handleTerminalSession).
Param(webservice.PathParameter("namespace", "namespace of which the pod located in")).
Param(webservice.PathParameter("pod", "name of the pod")).