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

CBG-3924: Add mocked config and API for audit logging #6874

Merged
merged 11 commits into from
Jun 14, 2024

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Jun 5, 2024

CBG-3924

Unblocks Capella work since they can set the new config and reference new API endpoints.

  • Exposes SGAuditEvents for visibility from handler.
  • Adds mocked audit logging API endpoints
  • Adds unwired bootstrap config options for audit log output
  • Adds unwired dbconfig options for per-db audit log settings
  • Extends flag config support for additional flag types and pointer/non-pointers

Toy build

https://mobile.jenkins.couchbase.com/view/Sync_Gateway/job/sgw-toy-build/258/

Integration Tests

@bbrks bbrks requested review from torcolvin and JRascagneres June 5, 2024 14:40
@bbrks bbrks assigned torcolvin and bbrks and unassigned torcolvin Jun 5, 2024
Copy link
Collaborator

@torcolvin torcolvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is this worth adding to openapi docs?

@bbrks bbrks force-pushed the feature/CBG-3822-audit-logging branch from 8403859 to cd58f85 Compare June 11, 2024 14:44
@bbrks bbrks changed the title CBG-3924: Add config fields for audit logging CBG-3924: Add mocked config and API for audit logging Jun 11, 2024
@bbrks
Copy link
Member Author

bbrks commented Jun 12, 2024

@JRascagneres should I wait until you've tried this toy build before I merge?

@JRascagneres
Copy link
Member

@bbrks Up to you, might be a 'bit' away yet before I can test out all the endpoints.

@bbrks
Copy link
Member Author

bbrks commented Jun 12, 2024

Can you at least review then to make sure the config and endpoints are as you'd expect?

@bbrks bbrks removed their assignment Jun 12, 2024
@bbrks bbrks requested a review from torcolvin June 12, 2024 14:04
@torcolvin torcolvin self-assigned this Jun 12, 2024
type: boolean
default: false
enabled_events:
description: List of enabled audit events
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say that certain events will be enabled by default and have to be explicitly disabled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had discussions with PM earlier this week. The plan is to have this represent the full set of enabled events. It contains the set of default events, and you can disable by removing from this list.


Required Sync Gateway RBAC roles:

* TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a ticket to decide RBAC roles?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up in PRD

@bbrks bbrks assigned JRascagneres and unassigned torcolvin Jun 12, 2024
@bbrks bbrks merged commit 2d9995a into feature/CBG-3822-audit-logging Jun 14, 2024
21 checks passed
@bbrks bbrks deleted the CBG-3924 branch June 14, 2024 12:27
bbrks added a commit that referenced this pull request Jun 14, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jun 20, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jun 20, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jul 2, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jul 2, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jul 8, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
bbrks added a commit that referenced this pull request Jul 8, 2024
* Add config fields for audit logging

* Support all flag types and pointers in fillConfigWithFlags

* tweak comment

* wip

* rebase fix for rotation_interval

* Move uint map key to string for JSON

* Add API specs

* make GET API actually return the data...

* Add placeholder audit log config for runtime server config

* Add db/global audit log API changes

* unindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants