Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-28676

query parameters in audit records should have proper types, not string values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • query
    • None
    • Untriaged
    • Unknown

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johan.larson Johan Larson (Inactive)
            johan.larson Johan Larson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty