-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limits permitted commands in Runner (#1016)
- Limit permitted commands to those listed in runner.yaml config file. - Fixes API calls to send correct invalid status for both non-existing and not permitted commands
- Loading branch information
1 parent
1f2a070
commit a42678a
Showing
24 changed files
with
1,098 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// This file is to be used for testing runner during development | ||
|
||
@hostname = localhost | ||
@port = 5000 | ||
@ContentType = application/json | ||
|
||
### | ||
GET http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}}/history HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
{ | ||
"name": "create" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}}/history HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
{ | ||
"name": "configure" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}}/history HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
{ | ||
"command": "create" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}} HTTP/1.1 | ||
content-type: {{ContentType}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}:{{port}}/history HTTP/1.1 | ||
content-type: {{ContentType}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// This file is to be used for testing runner deployed | ||
// in the user workspace of DTaaS. | ||
// It is assumed that the Traefik gateway to DTaaS application | ||
// is using HTTP basic authentication for login | ||
|
||
@hostname = foo.com | ||
@port = 5000 | ||
@User = alice | ||
@URLToken = 4b7d01e14269e12e38f3ed041043e58f877c6b63 | ||
@AuthToken = VGVzdFazZXJZdGFhczpUZXN5VXNlckq0YWFzVGVxdFVzZGJEdGFhcw== | ||
@WorkspaceCookie = workspace-token-tool-5000="4b7d01e14269e45f56f3ed067129e58f877c6b63" | ||
@ContentType = application/json | ||
@_XSRFCookie = _xsrf:2|19tf64b5|2037f58cf647235b3a6c43k4l4v643fk|4349295348 | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/history?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
{ | ||
"name": "create" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/history?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
{ | ||
"name": "configure" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/history?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
POST http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
{ | ||
"command": "create" | ||
} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} | ||
|
||
### | ||
|
||
GET http://{{hostname}}/{{User}}/shared/tools/{{port}}/history?token={{URLToken}} HTTP/1.1 | ||
Authorization: Basic {{AuthToken}} | ||
content-type: {{ContentType}} | ||
Cookie:{{WorkspaceCookie}} | ||
Cookie:{{_XSRFCookie}} |
Oops, something went wrong.