Description
Turn on SELECT and PREPARE events on the audit configuration screen.
Create a prepared statement with a parameter and run the prepared statement.
curl http://localhost:8093/query/service -d "statement=prepare example as select * from system:namespaces where one=?" -u Administrator:password |
|
curl http://localhost:8093/query/service -d 'prepared="example"&args=["bar"]' |
The resulting audit event has "bar" as a string form of a string, not a plain string.
{"timestamp":"2018-03-14T06:27:52.992-07:00","real_userid":{"source":"internal","user":"unknown"},"requestId":"56c5278b-5842-45a9-8549-5c7f52f109a7","statement":"","positionalArgs":["\"bar\""],"isAdHoc":false,"userAgent":"curl/7.43.0","node":"127.0.0.1:8091","status":"success","metrics":{"elapsedTime":"1.363373ms","executionTime":"1.334763ms","resultCount":0,"resultSize":0},"id":28672,"name":"SELECT statement","description":"A N1QL SELECT statement was executed"} |
This should work correctly for numbers, bools, arrays, and maps also.