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

Watcher: Store username from execution in the watch history #31772

Closed
spinscale opened this issue Jul 3, 2018 · 1 comment
Closed

Watcher: Store username from execution in the watch history #31772

spinscale opened this issue Jul 3, 2018 · 1 comment

Comments

@spinscale
Copy link
Contributor

When a watch is stored and security is enabled, we currently store metadata with the watch, as which user the watch should be run.

However we never emit this information in the watch history, so that debugging this is unnecessarily hard, as it can happen, that a watch does not return any search results in the search input, but works well when executed in kibana, because the user is logged in as an admin user.

We should extend the WatchRecord class to also contain the name of the user the watch was executed in order to ease debugging (similar to how the node id was added most recently).

This requires: changing of the watch history template to add such a field, increasing it's template number in WatcherIndexTemplateRegistryField, and adding the required code in the WatchRecord as well as storing that information in the watch execution context.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

hub-cap added a commit to hub-cap/elasticsearch that referenced this issue Jul 6, 2018
There is currently no way to see what user executed a watch. This commit
adds the decrypted username to each execution in the watch history, in a
new field executed_by.

Closes elastic#31772
hub-cap added a commit that referenced this issue Jul 16, 2018
There is currently no way to see what user executed a watch. This commit
adds the decrypted username to each execution in the watch history, in a
new field "user".

Closes #31772
hub-cap added a commit that referenced this issue Jul 23, 2018
There is currently no way to see what user executed a watch. This commit
adds the decrypted username to each execution in the watch history, in a
new field "user".

Closes #31772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants