-
Notifications
You must be signed in to change notification settings - Fork 515
abnormal_security,aws_bedrock,crowdstrike: add required variables in system tests #15832
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
abnormal_security,aws_bedrock,crowdstrike: add required variables in system tests #15832
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportTo see the full report comment with |
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.
Why are there three different YAML approaches to defining the required variables? This change has
wait_interval: ""
file_selectors: |
queue_url:
ssl: |which equates to either empty string or null
{
"wait_interval": "",
"file_selectors": "",
"queue_url": null,
"ssl": ""
}Could we use the same approach in all cases?
(To be clear, I'm not thrilled that we can bypass the required variable check by passing empty strings or nulls, but that's a different problem.)
I initially tried using null everywhere, but it didn’t resolve issue in system test. So, I went with a different approach. For consistency, I’ll change it to use an empty string everywhere. |
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.
Looking at the change that added this configuration value (#14235), I think that it would be entirely reasonable for the config to be made non-required. This is based on the agent config code that was added and the description in the commit.
| queue_url: '{{TF_OUTPUT_queue_url}}' | ||
| preserve_original_event: true | ||
| preserve_duplicate_custom_fields: true | ||
| file_selectors: "" |
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.
The complaint from ep is that this should be an array. Should this not be null?
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 throws the same error when I use null. The other option was to use an empty array, like file_selectors: |
So, I’ve changed it to an empty string for consistency.
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.
Why not use the empty array? file_selectors: [] (file_selectors: | is an empty string, depending on the lines that follow).
It seems to me that the validation is missing something if it allows a string in an array slot.
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.
@efd6 I've made the changes as per your suggestion.
| preserve_original_event: true | ||
| hosts: | ||
| - http://{{Hostname}}:{{Port}}/metrics | ||
| ssl: [] |
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.
This satisfies the required var check, but I think there is a bug here because the ssl configuration should not have multi: true. Also the handlebar template is wonky because the if check is looking at ssl.certificate_authorities.
integrations/packages/nvidia_gpu/data_stream/stats/agent/stream/stream.yml.hbs
Lines 18 to 20 in a5139fe
| {{#if ssl.certificate_authorities}} | |
| ssl: | |
| {{ssl}} |
I think the package needs a policy test to check the handlebar rendering. If my assumption is correct, then multi: true should be removed, and then an empty string can satisfy the required check.
It may be best to merge this as is, and open a separate ticket for the nvidia_gpu package owner to sort this out, because I'm not sure of their original intent with the certificate_authorities if check.
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.
Public issue: #15928
@moxarth-rathod, please change the team label in the issue as per CODEOWNERS
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.
@kcreddy done, thanks.
💚 Build Succeeded
History
|
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
integrations/packages/crowdstrike directory.
Related issues