You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
When creating a detector based on the Network ruleset, using an index alias as is described in the mappings API documentation and the UI itself, the dashboards' logs gives this error:
Security Analytics - IndexService - createAliases: StatusCodeError: [illegal_argument_exception] The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead.
How can one reproduce the bug?
Steps to reproduce the behavior:
Have an index template defined for an index pattern that also associates an alias
Have documents indexed to indexes matching that index pattern (in my case, it's Zeek logs)
Navigate to Create Security Detector
Give it a name
Select the alias described in step 1 for Select Indexes/aliases where it says "Aliases and data streams are recommended for optimal functioning of detectors."
Set up mappings if needed
Click next
Create a trigger with the default settings
Click Create detector
Wait a moment for the detector to be created
Observe debug logs from Logstash:
Security Analytics - IndexService - createAliases: StatusCodeError: [illegal_argument_exception] The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead.
at respond (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:349:15)
at checkRespForFailure (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:306:7)
at HttpConnector.<anonymous> (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
at IncomingMessage.wrapper (/usr/share/opensearch-dashboards/node_modules/lodash/lodash.js:4991:19)
at IncomingMessage.emit (node:events:529:35)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1400:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
status: 400,
displayName: 'BadRequest',
path: '/_aliases',
query: {},
body: {
error: {
root_cause: [Array],
type: 'illegal_argument_exception',
reason: 'The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead.'
},
status: 400
},
statusCode: 400,
response: '{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead."}],"type":"illegal_argument_exception","reason":"The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead."},"status":400}',
toString: [Function (anonymous)],
toJSON: [Function (anonymous)]
}
Why is it complaining that "The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead."? The documentation and UI itself clearly says I should be using an alias.
@mmguero I'm not an expert in this plugin (my expertise is in the security plugin), but I think that error indicates that the alias already exists. Its coming from here. The API to create and update an alias are the same and since it already exists I think its hitting this code block.
More code refs:
Where aliasOrIndexExists is used - My understanding is that it returns false when update alias API is called based on the comment in the code - tbh not sure why
What is the bug?
When creating a detector based on the Network ruleset, using an index alias as is described in the mappings API documentation and the UI itself, the dashboards' logs gives this error:
How can one reproduce the bug?
Steps to reproduce the behavior:
Why is it complaining that "The provided expression [malcolm_network] matches an alias, specify the corresponding concrete indices instead."? The documentation and UI itself clearly says I should be using an alias.
What is your host/environment?
opensearch security
andopensearch-performance-analyzer
The text was updated successfully, but these errors were encountered: