Browse Source

restrict getting kubeconfig

Mohammed Nafees 3 years ago
parent
commit
3c06a0e2f8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/server/router/cluster.go

+ 1 - 1
api/server/router/cluster.go

@@ -697,7 +697,7 @@ func getClusterRoutes(
 	// GET /api/projects/{project_id}/clusters/{cluster_id}/kubeconfig -> cluster.NewGetTemporaryKubeconfigHandler
 	getTemporaryKubeconfigEndpoint := factory.NewAPIEndpoint(
 		&types.APIRequestMetadata{
-			Verb:   types.APIVerbGet,
+			Verb:   types.APIVerbUpdate, // we do not want users with no-write access to be able to use this
 			Method: types.HTTPVerbGet,
 			Path: &types.Path{
 				Parent:       basePath,