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

[Fleet] Give permissions to indices with rolling dates #103319

Closed
wants to merge 4 commits into from

Conversation

afgomez
Copy link
Contributor

@afgomez afgomez commented Jun 24, 2021

Summary

Some of the integrations add a suffix with the date to the indices they need to write in, like:

logs-osquery_manager.result-default-2021.06.23

The new permissions code doesn't account for this. This PR adds a * as a suffix to each entry in the agent policy permissions block to ensure indices with suffixes are possible.

@afgomez afgomez added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Fleet Fleet team's agent central management project Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 24, 2021
@afgomez afgomez requested a review from a team as a code owner June 24, 2021 16:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Feature:Fleet)

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang
Copy link
Contributor

@ruflin What do you think about this? It feels a bit odd to me, but I don't think we have any flags today on the integration that can tell us whether we expect the final data streams to be time series or not.

@ruflin
Copy link
Member

ruflin commented Jun 28, 2021

We want to get away from the * as otherwise we are back to the same problem that any indices could be created. So I don't think this is the right solution. Are these indices or data streams?

@aleksmaus Why are the above indices / data streams created and not the data stream naming scheme is followed? This also has implications on the number of shards etc.

@ruflin
Copy link
Member

ruflin commented Jun 28, 2021

@afgomez If we need a short term fix here, I rather have osquery as a special case instead of applying the * to all namespaces. But as mentioned before, I think we have a more fundamental issue here with osquerybeat.

@afgomez
Copy link
Contributor Author

afgomez commented Jun 28, 2021

I rather have osquery as a special case instead of applying the * to all namespaces

@ruflin That was my initial idea as well, but when I checked with @aleksmaus we couldn't figure out if this happened with other integrations as well.

If we know for sure this is the only one, then I can add a special case for it.

@ruflin
Copy link
Member

ruflin commented Jun 28, 2021

Do you know if the above are indices or data streams? Everything MUST use data streams and the data stream naming scheme. But seems like osquerybeat does not so if other integrations do the same, we have a larger issue that we need to investigate quickly.

@afgomez
Copy link
Contributor Author

afgomez commented Jun 28, 2021

Do you know if the above are indices or data streams?

Looking at https://epr.elastic.co/package/osquery_manager/0.2.3/ I'd say it's a data stream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @afgomez

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not merge. Indices should not have rolling dates, we should fix this on the osquerybeat side.

@jen-huang
Copy link
Contributor

Going to close this in favor of elastic/beats#26545.

@jen-huang jen-huang closed this Jun 28, 2021
@afgomez afgomez deleted the agent-policy-permissions-star branch June 29, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Fleet Fleet team's agent central management project release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants