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

[ResponseOps][Alerting] classify API unauthorized errors as user error #196619

Open
pmuellr opened this issue Oct 16, 2024 · 2 comments
Open

[ResponseOps][Alerting] classify API unauthorized errors as user error #196619

pmuellr opened this issue Oct 16, 2024 · 2 comments
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Oct 16, 2024

Saw a number of messages of the following form in a QA project:

error(s): ResponseError: security_exception
	Root causes:
		security_exception: action [indices:data/read/search] is unauthorized for API key id [redacted] of user [redacted], this action is granted by the index privileges [read,all]

These are logged with tags: framework-error

These feel like they should be user error. It appears these set our rule run failure SLO off.

@pmuellr pmuellr changed the title [ResponseOps][Alerting] classify [ResponseOps][Alerting] classify API unauthorized errors as user error Oct 16, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 16, 2024
@pmuellr pmuellr added Feature:Alerting and removed needs-team Issues missing a team label labels Oct 16, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 16, 2024
@pmuellr pmuellr added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Oct 16, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 16, 2024
@pmuellr
Copy link
Member Author

pmuellr commented Oct 18, 2024

Was asked to check if these show up in alerting framework messages or just in the SIEM-specific messages logged by the rule executor.

Both. The ones from the SIEM-specific rule executors are noisy, but aren't specifically considered "errors" at all by the framework, they're just messages logged by the executor.

However, those rule executions do seem to be returned as failed by the executor, so we see the following logged when the rule completes:

message: Executing Rule siem.queryRule:<rule-id> has resulted in the following error(s): ResponseError: security_exception\n\tRoot causes:\n\t\tsecurity_exception: action [indices:data/read/search] is unauthorized for API key id [<api-key-id>] of user [<user-id>], this action is granted by the index privileges [read,all]

tags: <rule-id>, siem.queryRule, rule-run-failed, framework-error

So seems like we should get the SIEM rule to return these as user-error, unless we can figure out how to do this ourselves, by using our wrapped ES client library. Seems like that should be our first approach, since it would end up working for all rule types - see if we can determine this at the framework level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

2 participants