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

Add field validation for ilm_policy field in package spec. #92

Closed
Tracked by #399
kevinlog opened this issue Dec 8, 2020 · 2 comments · Fixed by #413
Closed
Tracked by #399

Add field validation for ilm_policy field in package spec. #92

kevinlog opened this issue Dec 8, 2020 · 2 comments · Fixed by #413
Assignees

Comments

@kevinlog
Copy link

kevinlog commented Dec 8, 2020

We now have a field to define a custom ilm_policy for a data stream in a package definition. Since the ilm_policy is shipped with the package itself, we should introduce field validation.

See this PR for details on the ilm_policy field: #90

@kevinlog kevinlog self-assigned this Dec 8, 2020
rw-access pushed a commit to rw-access/package-spec that referenced this issue Mar 23, 2021
@jsoriano jsoriano self-assigned this Sep 12, 2022
@jsoriano
Copy link
Member

Hey @kevinlog,

I am taking a look to this issue, but I am not sure about what validations we can do.

For example I see that the findings data stream of the Cloud Security Posture package indicates as ILM policy logs-cloud_security_posture.findings-default_policy. It also defines an ILM policy in a file called default_policy.json.

Should we validate that the ILM policy matches with something like the following pattern?

{data stream type}-{package name}.{data stream name}-{ilm file name without extension}

@kevinlog
Copy link
Author

@jsoriano it has been a while since I opened this ticket, so I am refreshing my memory.

I believe the original reason for opening was that we added support for a custom ilm policy, but there wasn't any validation for the naming convention, some context here.

The convention above looks good to me and would also work with the ilm_policy we defined here: https://github.com/elastic/endpoint-package/tree/master/package/endpoint/data_stream/collection

Our data_stream name: collection
ilm_policy: logs-endpoint.collection-diagnostic

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

Successfully merging a pull request may close this issue.

2 participants