fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.69k stars 383 forks source link

Configuration profiles: target hosts by excluding any label #17315

Open noahtalerman opened 4 months ago

noahtalerman commented 4 months ago

Goal

User story
As a Client Platform Engineer (CPE),
I want to scope macOS and Windows configuration profiles by excluding labels
so that I can install a configuration profile on all my hosts except those in the European Union (EU).

Context

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

Manual testing steps

  1. Validate hosts are excluded after Config Profile deploys using existing labels
  2. Validate hosts are excluded after Config Profile deploys using new labels
  3. Ensure all hosts that are not excluded receive Config Profiles
  4. Test for any regression with existing Label features. e.g. How will existing profiles behave?

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.
noahtalerman commented 4 months ago

Hey @dherder heads up, we didn't have the space to take this one on in the current design sprint (4.48).

Leaving the feature fest label on it so we can weigh it at the next feature fest.

noahtalerman commented 3 months ago

Hey @dherder, heads up, we discussed this issue during feature fest.

We decided not to draft this in the current design sprint (4.49).

Removing it from the feature fest board.

noahtalerman commented 2 months ago

Hey @georgekarrv heads up, I pulled this story back into specified.

I think up to you if it should get re-estimated.

PezHub commented 1 week ago

UI and GitOps workflow is working as expected. QA Approved.

GitOps notes - Confirmed that yaml config file works as expected

./build/fleetctl gitops -f ~/fleetdm/gitops/default.yml                                            11:50:49 AM
[+] applying MDM profiles for team A
[+] applied 1 teams
[!] gitops succeeded

Confirmed that for a given profile, only one of labels_exclude_any orlabels_include_all can be specified. Below error message is displayed

./build/fleetctl gitops -f ~/fleetdm/gitops/default.yml                                                11:34:40 AM
Error: applying teams: POST /api/latest/fleet/spec/teams received status 422 Validation Failed: Couldn't edit macos_settings.custom_settings. For each profile, only one of "labels_exclude_any", "labels_include_all" or "labels" can be included.