Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2.1 backport] CBG-4230 correct docs for /db/_config/audit #7109

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 72 additions & 63 deletions docs/api/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1837,69 +1837,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 @@ -2380,7 +2389,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 @@ -2399,7 +2408,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 @@ -2418,7 +2427,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 @@ -2437,7 +2446,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 @@ -2456,7 +2465,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
Loading