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] Validate asset files to match patterns from spec #115386

Open
juliaElastic opened this issue Oct 18, 2021 · 1 comment
Open

[Fleet] Validate asset files to match patterns from spec #115386

juliaElastic opened this issue Oct 18, 2021 · 1 comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@juliaElastic
Copy link
Contributor

While adding a new asset type tag to kibana assets here #114110, it turned out that there is no validation of asset file patterns according to the spec: https://github.com/elastic/package-spec/blob/1e17043c2cf746e7c0168594e51824c903c00e35/versions/1/kibana/spec.yml#L94

Add a check when installing assets to only include files that match the pattern from the spec.

For example:
pattern: '^{PACKAGE_NAME}-.+.json$'`

Rationale, as @mtojek explained:
I can explain why there is the PACKAGE_NAME prefix. Two different packages install their assets and it may happen that they both refer to the same "magic-asset-1". In this case the first installed one will be overridden with the other one, so we want to prevent it using package name prefixes.

@juliaElastic juliaElastic added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@joshdover joshdover added the bug Fixes for quality problems that affect the customer experience label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

3 participants