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

Add opaque Payload property to AuditMessage #153

Merged
merged 3 commits into from
May 29, 2024

Conversation

aleksmaus
Copy link
Member

  • Add opaque Payload property to AuditMessage
  • Replace deprecated ioutil
  • Get rid of go.uber.org/multierr dependency
  • Update go to 1.21

* Add opaque Payload property to AuditMessage
* Replace deprecated ioutil
* Get rid of go.uber.org/multierr dependency
* Update go to 1.21
…ile on Mac vs Linux, so the test on Mac fails while works on Linux
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

What is the use case for this?

Comment on lines 108 to 113
func testPayloadForMessage(msg *auparse.AuditMessage) map[string]interface{} {
return map[string]interface{}{
"seq": msg.Sequence,
"typ": msg.RecordType,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Caller before callee.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you please elaborate what needs to be changed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you place the helper below the calling function in source order. We don't have C compiler constraints and context first makes code easier to comprehend.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved after the calling function, gave it a better name.

@aleksmaus
Copy link
Member Author

What is the use case for this?

This is for OTel, need to be able to attach the "context" to the messages, so can reconstruct the otel "scope" and "resources" attributes after "reassembly"

@aleksmaus aleksmaus requested a review from efd6 May 28, 2024 12:57
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

LGTM but please wait for @andrewkroh for design approval.

@aleksmaus aleksmaus merged commit bebb5c6 into elastic:main May 29, 2024
3 checks passed
renini pushed a commit to renini/go-libaudit that referenced this pull request Jun 26, 2024
* Add opaque Payload property to AuditMessage

* Add opaque Payload property to AuditMessage
* Replace deprecated ioutil
* Get rid of go.uber.org/multierr dependency
* Update go to 1.21

* Rollback the golden file check, apparently it creates the different file on Mac vs Linux, so the test on Mac fails while works on Linux

* Address code review feedback
@AkihiroSuda AkihiroSuda mentioned this pull request Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants