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] Improve package policy validation #125655

Closed
juliaElastic opened this issue Feb 15, 2022 · 6 comments
Closed

[Fleet] Improve package policy validation #125655

juliaElastic opened this issue Feb 15, 2022 · 6 comments
Assignees
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

juliaElastic commented Feb 15, 2022

In #125625 it turned out that the current package policy validation is not complete, it doesn't consider package vars moved inside inputs.
This is causing a failure in aws integration tests.

Vars should be valid in different levels: elastic/package-spec#132
See this discussion: #125625 (comment)

The change in validation that caused this issue to surface was introduced here: #124215

Related issue:

@botelastic botelastic bot added the needs-team Issues missing a team label label Feb 15, 2022
@juliaElastic juliaElastic added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 15, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Feb 15, 2022
@juliaElastic juliaElastic added the enhancement New value added to drive a business result label Feb 15, 2022
@joshdover joshdover added bug Fixes for quality problems that affect the customer experience and removed enhancement New value added to drive a business result labels Feb 21, 2022
@endorama
Copy link
Member

endorama commented Mar 1, 2022

Following up on this comment by @juliaElastic :

Yes, it works if I put it in global vars (outside of inputs), but my question is, the same vars can appear inside inputs/streams as well, should Fleet take the values any level (e.g. moved inside inputs) and load them on UI?

To clarify naming for packages different variables "levels" (I've seen some confusion around this):

The hierarchy for these variables is pacakge > policy template > input.

Is my understanding that the same variable (es AWS access_key_id) is not expected to be present at different levels (es package and input), but this is not prohibited by the spec. Is that correct?

Is also my understanding that so far input level variables are not exposed in Fleet UI due to lack of support, so are not used by packages.

/cc @mtojek

@juliaElastic
Copy link
Contributor Author

@endorama based on the open issue, it seems that input level variables are not yet supported on Fleet UI. Could you give an example on which package has this problem? I checked aws and some of the azure ones, but didn't see any vars under policy_template.inputs

On the issue raised on validation, the case was that global vars were moved to input level, and that seems to be supported in package spec.

@endorama
Copy link
Member

endorama commented Mar 1, 2022

@endorama based on the open #112272, it seems that input level variables are not yet supported on Fleet UI. Could you give an example on which package has this problem? I checked aws and some of the azure ones, but didn't see any vars under policy_template.inputs

Not sure I'm following, no package use this because is not supported in Fleet. I was just pointing out that as you say is supported by package-spec, so is probably a meaningful case for validation.

@juliaElastic
Copy link
Contributor Author

juliaElastic commented Apr 5, 2022

I'm not quite sure what would be the expected behavior on Fleet UI for package vars moved to input vars:

  • Should input vars be accepted valid if they appear as package vars in spec?
  • If package vars come as input vars in package policy request, the UI doesn't display them. Should it be in scope for this issue to show them as package vars?

To be honest I find this feature of moving package vars to input vars confusing.

@jen-huang could you help answering the questions above? I saw that the related issue was closed.

@jen-huang jen-huang self-assigned this Jun 6, 2022
@jen-huang
Copy link
Contributor

Going to close this as discussion in the parent issue(s) have been resolved.

@jen-huang jen-huang closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
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

5 participants