mirror of https://github.com/docker/cli.git
pkg: authorization: add Err to tweak response status code
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
8b3b2571d7
commit
e79f2fcc21
|
@ -147,12 +147,12 @@ should implement the following two methods:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"User": "The user identification"
|
"User": "The user identification",
|
||||||
"UserAuthNMethod": "The authentication method used"
|
"UserAuthNMethod": "The authentication method used",
|
||||||
"RequestMethod": "The HTTP method"
|
"RequestMethod": "The HTTP method",
|
||||||
"RequestUri": "The HTTP request URI"
|
"RequestUri": "The HTTP request URI",
|
||||||
"RequestBody": "Byte array containing the raw HTTP request body"
|
"RequestBody": "Byte array containing the raw HTTP request body",
|
||||||
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string "
|
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string ",
|
||||||
"RequestStatusCode": "Request status code"
|
"RequestStatusCode": "Request status code"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -161,26 +161,26 @@ should implement the following two methods:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Allow" : "Determined whether the user is allowed or not"
|
"Allow": "Determined whether the user is allowed or not",
|
||||||
"Msg": "The authorization message"
|
"Msg": "The authorization message",
|
||||||
|
"Err": "The error message if things go wrong"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### /AuthzPlugin.AuthZRes
|
#### /AuthzPlugin.AuthZRes
|
||||||
|
|
||||||
**Request**:
|
**Request**:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"User": "The user identification"
|
"User": "The user identification",
|
||||||
"UserAuthNMethod": "The authentication method used"
|
"UserAuthNMethod": "The authentication method used",
|
||||||
"RequestMethod": "The HTTP method"
|
"RequestMethod": "The HTTP method",
|
||||||
"RequestUri": "The HTTP request URI"
|
"RequestUri": "The HTTP request URI",
|
||||||
"RequestBody": "Byte array containing the raw HTTP request body"
|
"RequestBody": "Byte array containing the raw HTTP request body",
|
||||||
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string"
|
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string",
|
||||||
"RequestStatusCode": "Request status code"
|
"RequestStatusCode": "Request status code",
|
||||||
"ResponseBody": "Byte array containing the raw HTTP response body"
|
"ResponseBody": "Byte array containing the raw HTTP response body",
|
||||||
"ResponseHeader": "Byte array containing the raw HTTP response header as a map[string][]string"
|
"ResponseHeader": "Byte array containing the raw HTTP response header as a map[string][]string",
|
||||||
"ResponseStatusCode":"Response status code"
|
"ResponseStatusCode":"Response status code"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -189,11 +189,12 @@ should implement the following two methods:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Allow" : "Determined whether the user is allowed or not"
|
"Allow": "Determined whether the user is allowed or not",
|
||||||
"Msg": "The authorization message"
|
"Msg": "The authorization message",
|
||||||
"ModifiedBody": "Byte array containing a modified body of the raw HTTP body (or nil if no changes required)"
|
"Err": "The error message if things go wrong",
|
||||||
"ModifiedHeader": "Byte array containing a modified header of the HTTP response (or nil if no changes required)"
|
"ModifiedBody": "Byte array containing a modified body of the raw HTTP body (or nil if no changes required)",
|
||||||
"ModifiedStatusCode": "int containing the modified version of the status code (or 0 if not change is required)"
|
"ModifiedHeader": "Byte array containing a modified header of the HTTP response (or nil if no changes required)",
|
||||||
|
"ModifiedStatusCode": "int containing the modified version of the status code (or 0 if not change is required)"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -222,7 +223,8 @@ Request body | []byte | Raw request body
|
||||||
Name | Type | Description
|
Name | Type | Description
|
||||||
--------|--------|----------------------------------------------------------------------------------
|
--------|--------|----------------------------------------------------------------------------------
|
||||||
Allow | bool | Boolean value indicating whether the request is allowed or denied
|
Allow | bool | Boolean value indicating whether the request is allowed or denied
|
||||||
Message | string | Authorization message (will be returned to the client in case the access is denied)
|
Msg | string | Authorization message (will be returned to the client in case the access is denied)
|
||||||
|
Err | string | Error message (will be returned to the client in case the plugin encounter an error)
|
||||||
|
|
||||||
### Response authorization
|
### Response authorization
|
||||||
|
|
||||||
|
@ -249,4 +251,5 @@ Response body | []byte | Raw docker daemon response body
|
||||||
Name | Type | Description
|
Name | Type | Description
|
||||||
--------|--------|----------------------------------------------------------------------------------
|
--------|--------|----------------------------------------------------------------------------------
|
||||||
Allow | bool | Boolean value indicating whether the response is allowed or denied
|
Allow | bool | Boolean value indicating whether the response is allowed or denied
|
||||||
Message | string | Authorization message (will be returned to the client in case the access is denied)
|
Msg | string | Authorization message (will be returned to the client in case the access is denied)
|
||||||
|
Err | string | Error message (will be returned to the client in case the plugin encounter an error)
|
||||||
|
|
Loading…
Reference in New Issue