-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
error creating an alert with security off #51361
Comments
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
Here's a change that allows the alert to be created, and the alert seems to run fine: change the following code:
to const result = await securityPluginSetup.authc.createAPIKey(request, {
name: `source: alerting, generated uuid: "${uuid.v4()}"`,
role_descriptors: {},
})
if (result == null) return { created: false };
return { created: true, result }; Basically, if it would have previously returned That |
In a discussion with Mike, it seems like this is another config-related scenario that we will want to have a separate test scenario for. The current "security off" scenario (at least the Will likely create a separate issue to create a new test scenario, since I'm thinking we may end up having more scenarios to test once alerting/actions become enabled by default. |
running from Kibana master:
config/kibana.dev.yml
contents:run the following to start es and kibana, hopefully in security off mode:
create an action and then an alert (with kbn-action):
At that point, Kibana's output will report an error thrown:
on the client side, a 500 is returned from the http request:
The error occurs in this block of code:
kibana/x-pack/legacy/plugins/alerting/server/alerts_client.ts
Lines 115 to 131 in a853609
The variable
apiKey
has the value:{ created: true, result: null }
. That seems to be unexpected, as laterapiKey.result.id
(and other props) are referenced without first checking ifapiKey.result
isnull
or not. I guess it's assumed that ifcreated
wastrue
,result
must not benull
.The text was updated successfully, but these errors were encountered: