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

Unable to set the new audit setting 'pruneAge' using REST API

    XMLWordPrintable

Details

    Description

      Steps:

      • Single node KV cluster with single bucket
      • Enable audit logs and update pruneAge settings using REST

      Observation:

      "pruneAge" value is always reported as 0 even after successful POST command execution

      root@sa1715-deb10:/opt/couchbase/var/lib/couchbase/logs# curl -v -w "\n" -X POST -u Administrator:password -H 'Content-Type: application/x-www-form-urlencoded' 172.23.108.67:8091/settings/audit -d auditPruneAge=10000
      Note: Unnecessary use of -X or --request, POST is already inferred.
      * Expire in 0 ms for 6 (transfer 0x55e4d0aec110)
      *   Trying 172.23.108.67...
      * TCP_NODELAY set
      * Expire in 200 ms for 4 (transfer 0x55e4d0aec110)
      * Connected to 172.23.108.67 (172.23.108.67) port 8091 (#0)
      * Server auth using Basic with user 'Administrator'
      > POST /settings/audit HTTP/1.1
      > Host: 172.23.108.67:8091
      > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
      > User-Agent: curl/7.64.0
      > Accept: */*
      > Content-Type: application/x-www-form-urlencoded
      > Content-Length: 19
      >
      * upload completely sent off: 19 out of 19 bytes
      < HTTP/1.1 200 OK
      < Cache-Control: no-cache,no-store,must-revalidate
      < Content-Length: 0
      < Date: Mon, 06 Nov 2023 06:19:08 GMT
      < Expires: Thu, 01 Jan 1970 00:00:00 GMT
      < Pragma: no-cache
      < Server: Couchbase Server
      < X-Content-Type-Options: nosniff
      < X-Frame-Options: DENY
      < X-Permitted-Cross-Domain-Policies: none
      < X-XSS-Protection: 1; mode=block
      <
      * Connection #0 to host 172.23.108.67 left intact
       
      root@sa1715-deb10:/opt/couchbase/var/lib/couchbase/logs# curl -v -w "\n" -X POST -u Administrator:password -H 'Content-Type: application/x-www-form-urlencoded' 172.23.108.67:8091/settings/audit -d auditPruneAge=100
      Note: Unnecessary use of -X or --request, POST is already inferred.
      * Expire in 0 ms for 6 (transfer 0x5633bc686110)
      *   Trying 172.23.108.67...
      * TCP_NODELAY set
      * Expire in 200 ms for 4 (transfer 0x5633bc686110)
      * Connected to 172.23.108.67 (172.23.108.67) port 8091 (#0)
      * Server auth using Basic with user 'Administrator'
      > POST /settings/audit HTTP/1.1
      > Host: 172.23.108.67:8091
      > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
      > User-Agent: curl/7.64.0
      > Accept: */*
      > Content-Type: application/x-www-form-urlencoded
      > Content-Length: 17
      >
      * upload completely sent off: 17 out of 17 bytes
      < HTTP/1.1 200 OK
      < Cache-Control: no-cache,no-store,must-revalidate
      < Content-Length: 0
      < Date: Mon, 06 Nov 2023 06:19:17 GMT
      < Expires: Thu, 01 Jan 1970 00:00:00 GMT
      < Pragma: no-cache
      < Server: Couchbase Server
      < X-Content-Type-Options: nosniff
      < X-Frame-Options: DENY
      < X-Permitted-Cross-Domain-Policies: none
      < X-XSS-Protection: 1; mode=block
      <
      * Connection #0 to host 172.23.108.67 left intact$ curl -X GET -u Administrator:password 172.23.108.67:8091/settings/audit | jq | tail -10
          45070
        ],
        "uid": "48287299",
        "auditdEnabled": true,
        "disabledUsers": [],
        "logPath": "/opt/couchbase/var/lib/couchbase/logs",
        "pruneAge": 0,
        "rotateInterval": 86400,
        "rotateSize": 20971520
      }

      Attachments

        Issue Links

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

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              ashwin.govindarajulu Ashwin Govindarajulu
              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