Skip to content

Commit

Permalink
[KYUUBI apache#3951][FOLLOWUP] Audit the rest request params
Browse files Browse the repository at this point in the history
### _Why are the changes needed?_

Before:
```
user=anonymous(auth:BASIC) ip=127.0.0.1 proxyIp=null    method=GET      uri=/api/v1/operations/5e286c5d-2880-443f-a4e8-633964dcd699/rowset      protocol=HTTP/1.1       status=200
```

After:

```
user=anonymous(auth:BASIC) ip=127.0.0.1 proxyIp=null    method=GET      uri=/api/v1/operations/5e286c5d-2880-443f-a4e8-633964dcd699/rowset      params=maxrows=2&fetchorientation=FETCH_NEXT       protocol=HTTP/1.1       status=200
```

```
params=maxrows=2&fetchorientation=FETCH_NEXT
```
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes apache#4389 from turboFei/rest_params.

Closes apache#3951

6ffc1ad [fwang12] comments
61e12b1 [fwang12] nit
0632860 [fwang12] Audit the request params

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
  • Loading branch information
turboFei committed Feb 21, 2023
1 parent 16c7792 commit d288a2b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object AuthenticationAuditLogger extends Logging {
sb.append(s"proxyIp=${HTTP_PROXY_HEADER_CLIENT_IP_ADDRESS.get()}").append("\t")
sb.append(s"method=${request.getMethod}").append("\t")
sb.append(s"uri=${request.getRequestURI}").append("\t")
sb.append(s"params=${request.getQueryString}").append("\t")
sb.append(s"protocol=${request.getProtocol}").append("\t")
sb.append(s"status=${response.getStatus}")
info(sb.toString())
Expand Down

0 comments on commit d288a2b

Please sign in to comment.