-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
ECS audit events for alerting #84113
Merged
Merged
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
51a784a
ECS audit events for alerts plugin
thomheymann 3652cf0
added api changes
thomheymann ac215a0
fixed linting and testing errors
thomheymann 7abc2b0
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann 6c3cb47
fix test
thomheymann 5f10ab5
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann 4e3d1a1
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann 337a902
Fixed linting errors after prettier update
thomheymann 5f598d1
Revert "Allow predefined ids for encrypted saved objects (#83482)"
thomheymann a2dd90f
Added suggestions from code review
thomheymann c9082be
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann d11ffc2
Fixed unit tests
thomheymann 6e473a9
Added suggestions from code review
thomheymann fa5215a
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann 9014744
Changed names of alert events
thomheymann 2873fe7
Changed naming as suggested in code review
thomheymann 5b91bb8
Merge branch 'master' into alerting/audit-logging
kibanamachine 459e0c4
Added suggestions from PR
thomheymann 0ff3dfe
Merge remote-tracking branch 'origin/master' into alerting/audit-logging
thomheymann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
docs/development/core/server/kibana-plugin-core-server.generatesavedobjectid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [generateSavedObjectId](./kibana-plugin-core-server.generatesavedobjectid.md) | ||
|
||
## generateSavedObjectId() function | ||
|
||
Generates a random id for saved objects. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function generateSavedObjectId(): string; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`string` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should reduce non-contract APIs exposed from
core
to a minimum (the import/export static functions are remains from legacy that will be moved to the SO service mid term). Any reason thisgenerateSavedObjectId
is exposed as a static function instead of being provided by thesavedObjects
service contract?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a pure function that doesn't require any shared state so didn't make sense to me to add it to the
SavedObjectsSerializer
. Maybe we could add it as a static method toSavedObjectsServiceSetup
if that addresses your concern?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @rudolf wdyt? is exposing
generateSavedObjectId
statically from the index acceptable to you, or do you think this should be exposed from the SO service contract?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option could be to put this into
kbn-utils
package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should.
Separate by domain
is one of our main principles, so it should belong tosaved objects
.++ to add it as a
setup/start
contract property.id creation
operation doesn't sound likeserializer
responsibility.btw why other code in SO service still calls
uuid
to generateid
?kibana/src/core/server/saved_objects/service/lib/repository.ts
Line 350 in d4b2a51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the logic for ID generation is changing in the very near future (👀 @jportner), so I feel like it'd be safer to keep the logic consolidated in the static helper. Asking consumers to use
uuid.v1
is leaking an implementation detail of the SO service, which feels worse to me than exposing a static function from the service.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharing Saved Objects will implement ID (re-)generation when existing objects are converted, but I have no plans to change "regular" ID generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it in
SavedObjectsUtils
then. it would be easier to track than greping foruuid
anyway when we'll need to move that to the service contract.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done. Please give it another parse.