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.
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
[backend] Implement log shipping to Graylog via GELF (#9629) #8410
base: master
Are you sure you want to change the base?
[backend] Implement log shipping to Graylog via GELF (#9629) #8410
Changes from 4 commits
e16f734
2e39d23
151f2ea
3fd8920
1ed5f3d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 1 in opencti-platform/opencti-graphql/src/boot.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/boot.js#L1
Check warning on line 50 in opencti-platform/opencti-graphql/src/boot.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/boot.js#L41-L50
Check warning on line 205 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L203-L205
Check warning on line 235 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L233-L235
Check warning on line 326 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L326
Check warning on line 337 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L328-L337
Check warning on line 340 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L339-L340
Check warning on line 343 in opencti-platform/opencti-graphql/src/config/conf.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/conf.js#L342-L343
Check warning on line 26 in opencti-platform/opencti-graphql/src/config/gelf-transport.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/gelf-transport.js#L23-L26
Check warning on line 45 in opencti-platform/opencti-graphql/src/config/gelf-transport.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/gelf-transport.js#L29-L45
Check warning on line 49 in opencti-platform/opencti-graphql/src/config/gelf-transport.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/gelf-transport.js#L48-L49
Check warning on line 31 in opencti-platform/opencti-graphql/src/config/log-shipping.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/log-shipping.js#L17-L31
Check warning on line 34 in opencti-platform/opencti-graphql/src/config/log-shipping.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/log-shipping.js#L33-L34
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.
Correct me if I'm wrong but this will put in the logs all env variables prefixed with APP__ for instance ?
Why do you need these ?
They might contain sensitive information.
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.
Yes, that's precisely what it does.
The reasoning is that when you have all the machines in a cluster, shipping all their logs to a central location, it becomes virtually impossible to distinguish between the logs originating from different instances. This feature is intended to help with this issue by allowing the users to expose (as meta-data) information about the originating instance so that it becomes easily identifiable.
The actual prefix is configurable in the JSON config so the users can make it very explicit, e.g. "EXPOSE_TO_GRAYLOG_". This way nothing unintended will be exposed.
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.
Hello, to identify machine you can add the NODE_INSTANCE_ID
opencti/opencti-platform/opencti-graphql/src/config/conf.js
Line 84 in cef1be3
And if you need, the node id can be configured per node in env with APP__NODE_IDENTIFIER
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 would prefer an opt-in approach indeed : just add what you need. It seems dangerous to be able to gather all secrets in the environment and send them
Check warning on line 39 in opencti-platform/opencti-graphql/src/config/log-shipping.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/log-shipping.js#L36-L39
Check warning on line 50 in opencti-platform/opencti-graphql/src/config/log-shipping.js
Codecov / codecov/patch
opencti-platform/opencti-graphql/src/config/log-shipping.js#L41-L50