Skip to content

Commit

Permalink
CBG-4228 correct docs for /db/_config/audit (#7108)
Browse files Browse the repository at this point in the history
  • Loading branch information
torcolvin authored Sep 5, 2024
1 parent 51c00da commit 26926af
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 66 deletions.
135 changes: 72 additions & 63 deletions docs/api/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1847,69 +1847,78 @@ Database:
example: ["CRUD", "HTTP", "Query"]
audit:
description: Audit logging configuration.
type: object
properties:
enabled:
description: Whether audit logging is enabled.
type: boolean
default: false
enabled_events:
description: List of enabled audit events for this database.
type: array
items:
type: number
example: [1234, 5678]
disabled_users:
description: List of users for which audit logging is disabled
type: array
items:
type: object
properties:
domain:
description: The domain of the user for which audit logging is disabled.
type: string
name:
description: The name of the user for which audit logging is disabled.
type: string
disabled_roles:
description: List of roles for which audit logging is disabled
type: array
items:
type: object
properties:
domain:
description: The domain of the role for which audit logging is disabled.
type: string
name:
description: The name of the role for which audit logging is disabled.
type: string
allOf:
- type: object
properties:
enabled:
description: Whether audit logging is enabled.
type: boolean
default: false
enabled_events:
description: List of enabled audit events for this database.
type: array
items:
type: number
example: [1234, 5678]
- $ref: '#/Disabled-users-and-roles'
title: Database-config
Database-audit:
title: Database-audit
description: A map of audit events and whether they are enabled or not.
Disabled-users-and-roles:
type: object
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
type: boolean
disabled_users:
description: List of users for which audit logging is disabled.
type: array
items:
type: object
properties:
domain:
description: The domain of the user for which audit logging is disabled. Either cbs or sgw.
type: string
name:
description: The name of the user for which audit logging is disabled.
type: string
disabled_roles:
description: List of roles for which audit logging is disabled. Either cbs or sgw.
type: array
items:
type: object
properties:
domain:
description: The domain of the role for which audit logging is disabled.
type: string
name:
description: The name of the role for which audit logging is disabled.
type: string
Database-audit:
title: Simple
description: A map of audit events and whether they are enabled or not.
allOf:
- type: object
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
type: boolean
- $ref: '#/Disabled-users-and-roles'
Database-audit-verbose:
title: Database-audit-verbose
title: Verbose
description: A map of detailed audit events.
type: object
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
$ref: '#/AuditEventVerbose'
allOf:
- type: object
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
$ref: '#/AuditEventVerbose'
- $ref: '#/Disabled-users-and-roles'
AuditEventVerbose:
title: audit-event-verbose
description: Detailed information about an audit event.
Expand Down Expand Up @@ -2390,7 +2399,7 @@ Logging-config:
type: integer
collation_buffer_size:
description: The size of the log collation buffer.
default: 10
default: 0
type: integer
readOnly: true
warn:
Expand All @@ -2409,7 +2418,7 @@ Logging-config:
type: integer
collation_buffer_size:
description: The size of the log collation buffer
default: 1000
default: 0
type: integer
readOnly: true
info:
Expand All @@ -2428,7 +2437,7 @@ Logging-config:
type: integer
collation_buffer_size:
description: The size of the log collation buffer
default: 1000
default: 0
type: integer
readOnly: true
debug:
Expand All @@ -2447,7 +2456,7 @@ Logging-config:
type: integer
collation_buffer_size:
description: The size of the log collation buffer
default: 0
default: 1000
type: integer
readOnly: true
trace:
Expand All @@ -2466,7 +2475,7 @@ Logging-config:
type: integer
collation_buffer_size:
description: The size of the log collation buffer
default: 0
default: 1000
type: integer
readOnly: true
stats:
Expand Down
6 changes: 3 additions & 3 deletions docs/api/paths/admin/db-_config-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ get:
Required Sync Gateway RBAC roles:
* TODO
* Sync Gateway Architect
parameters:
- name: verbose
in: query
Expand Down Expand Up @@ -49,7 +49,7 @@ put:
Required Sync Gateway RBAC roles:
* TODO
* Sync Gateway Architect
requestBody:
description: The new database audit configuration to use
content:
Expand Down Expand Up @@ -77,7 +77,7 @@ post:
Required Sync Gateway RBAC roles:
* TODO
* Sync Gateway Architect
parameters:
- name: verbose
in: query
Expand Down

0 comments on commit 26926af

Please sign in to comment.