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

Enable scripts for Windows hosts that automatically enroll to Fleet #17528

Open
6 tasks
noahtalerman opened this issue Mar 11, 2024 · 21 comments
Open
6 tasks

Enable scripts for Windows hosts that automatically enroll to Fleet #17528

noahtalerman opened this issue Mar 11, 2024 · 21 comments
Assignees
Labels
~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-eponym customer-preston #g-mdm MDM product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. story A user story defining an entire feature
Milestone

Comments

@noahtalerman
Copy link
Member

noahtalerman commented Mar 11, 2024

Goal

User story
As a Client Platform Engineer (CPE) who turned on Windows MDM,
I want to automatically enable scripts for my Windows hosts that automatically enroll
so that I can run PowerShell scripts against my hosts w/o having to deploy a new fleetd w/ the --scripts-enabled flag.

Context

Changes

Product

  • Changes: Add support for enabling scripts when installing the fleetd agent for Windows:
msiexec /i fleetd-base.msi ENABLE_SCRIPTS=true FLEET_URL="<target_url>" FLEET_SECRET="<secret_to_use>" 
  • This enables Fleet to automatically install fleetd w/ scripts enabled on Windows hosts.
  • Changes to paid features or tiers: Available in Fleet Free and Fleet Premium

Engineering

  • Database schema migrations: TODO
  • Load testing: TODO

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

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

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 noahtalerman added story A user story defining an entire feature ~feature fest Will be reviewed at next Feature Fest labels Mar 11, 2024
@noahtalerman noahtalerman added :product Product Design department (shows up on 🦢 Drafting board) and removed ~feature fest Will be reviewed at next Feature Fest labels Mar 29, 2024
@noahtalerman
Copy link
Member Author

Pulling notes from the issue description into a comment here:

  1. Check if the fleetd-base.msi package that gets installed for automatic enrollment was built with the --enable-scripts flag. Is there another solution for this? What about customer-ufa who uses the base fleetd but doesn't want scripts.

  2. Enable for manual enrollment. We can't find any additional logic that would enable scripts post facto if you didn't build your installer with scripts enabled.

@noahtalerman noahtalerman changed the title Automatically enable scripts for hosts w/ Windows MDM turned on Enable scripts for Windows hosts w/ MDM turned on Apr 1, 2024
@noahtalerman noahtalerman added the #g-mdm MDM product group label Apr 1, 2024
@georgekarrv
Copy link
Member

@georgekarrv georgekarrv removed the :product Product Design department (shows up on 🦢 Drafting board) label Apr 22, 2024
@noahtalerman noahtalerman added the :product Product Design department (shows up on 🦢 Drafting board) label May 13, 2024
@noahtalerman
Copy link
Member Author

Hey @georgekarrv heads up, I pulled this story back onto the drafting board knowing we have 61 points in remaining capacity for the upcoming sprint.

Let's discuss during today's sprint planning call.

@noahtalerman noahtalerman removed the :product Product Design department (shows up on 🦢 Drafting board) label May 14, 2024
@georgekarrv georgekarrv added the :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. label May 20, 2024
@georgekarrv georgekarrv removed their assignment May 20, 2024
@noahtalerman noahtalerman added this to the 4.51.0-tentative milestone May 20, 2024
@nonpunctual nonpunctual added ~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-eponym labels May 29, 2024
@valentinpezon-primo
Copy link

valentinpezon-primo commented Jun 3, 2024

Hi,

I saw that this issue was relatd to the #18461.
I'm afraid that enabling script only will not do the job since the script only locks out locals accounts.In some cases there is no local accounts but only remote accounts when using AzureAD

Is it possible to include remote account in the testing of the lock script ?

thanks ! (fyi @nonpunctual )

@zayhanlon
Copy link
Contributor

@noahtalerman ^ for QA / testing of workflows

@noahtalerman
Copy link
Member Author

Heads up @georgekarrv and @PezHub, testing request from Valentine here.

cc @zayhanlon

@georgekarrv
Copy link
Member

While that doesn't pertain to this ticket we can certainly investigate and create a corresponding ticket if that is the case

@valentinpezon-primo
Copy link

While that doesn't pertain to this ticket we can certainly investigate and create a corresponding ticket if that is the case

Hi @georgekarrv , this current issue (#17528) was created after this on "Windows lock script doesn't work in some scenarios #18461", after the comment made [here] .(#18461 (comment)) in my understanding, locking remote user that are managed buy AzureAD is a "scenario"

I thought this current issue was related to fix the AzureAD flow 🤔

Thankks !

@dantecatalfamo dantecatalfamo self-assigned this Jun 12, 2024
@dantecatalfamo
Copy link
Member

dantecatalfamo commented Jun 12, 2024

@noahtalerman Looking for context on this issue. What do you mean by run scripts on hosts without --scripts-enabled? I thought the purpose of the flag was so that hosts could choose to not enable scripts? Should all hosts enrolled in MDM have scripts enabled regardless of the flag? Thanks! 🙂

@noahtalerman
Copy link
Member Author

Hey @valentinpezon-primo! Thanks for follow up.

Let's move this conversation over to the "Windows lock script doesn't work..." issue here: #18461

@dantecatalfamo
Copy link
Member

This could be a side-car issue for #19219. Then we could add --scripts-enabled to the msiexec auto enrollment.

@noahtalerman noahtalerman changed the title Enable scripts for Windows hosts w/ MDM turned on Enable scripts for Windows hosts that automatically enroll to Fleet Jun 12, 2024
@noahtalerman
Copy link
Member Author

noahtalerman commented Jun 12, 2024

What do you mean by run scripts on hosts without --scripts-enabled? I thought the purpose of the flag was so that hosts could choose to not enable scripts? Should all hosts enrolled in MDM have scripts enabled regardless of the flag? Thanks!

@dantecatalfamo and I hopped on a call and we updated this story. It now covers turning on scripts for Windows hosts that automatically enroll.

To turn on scripts for hosts that manually enroll, IT admins will install fleetd that was generated w/ the --scripts-enabled=true flag or pass SCRIPTS_ENABLED=true as a parameter in the install script (msiexec).

@noahtalerman
Copy link
Member Author

pass SCRIPTS_ENABLED=true as a parameter in the install script (msiexec).

Since the work to add the SCRIPTS_ENABLED parameter is being done as part of this story, we can remove this requirement from the following story:

FYI @marko-lisica @dantecatalfamo

@noahtalerman
Copy link
Member Author

FYI @nonpunctual ^^

@roperzh
Copy link
Member

roperzh commented Jun 17, 2024

@georgekarrv @dantecatalfamo want to call out that having this fixed for the customer requires to coordinate two different releases:

  1. fleetd-base.msi, which generally gets updated only with fleetd releases
  2. fleetctl + fleet release (which happens at our regular cadence)

edit: and we can't release fleetd-base.msi until we fix #19176 which is blocked by #19182

@georgekarrv
Copy link
Member

Since this requires the 2 blocked tickets complete for end users to see the effects we will hold this ticket from the 4.53 milestone and skip it and QA in the next release when those other tickets are already complete

@roperzh
Copy link
Member

roperzh commented Jul 5, 2024

This is not blocked anymore and should be ready to test. No special setup needed.

@samleb
Copy link

samleb commented Jul 11, 2024

Hello @noahtalerman !
What's the situation on this ticket please ?
We're about to launch Autopilot in beta, and this is the last blocking bit.
Thank you very much 🙏

@noahtalerman
Copy link
Member Author

Hey @samleb! It looks like we're targeting shipping this in Fleet 4.54.

If it's helpful, you can tell by looking at the milestone in the issue here:
Screenshot 2024-07-11 at 2 58 51 PM

cc @zayhanlon @georgekarrv

@zayhanlon
Copy link
Contributor

@samleb you can check our meeting agenda as well :) i know you had a conflict on Monday's call, but all top priority issues are updated there

@PezHub
Copy link
Contributor

PezHub commented Jul 12, 2024

QA Notes:
Wiped my Surface Laptop and fresh enrolled via Azure AD and confirmed the run script action was enabled. Successfully executed a powershell script.
QA Approved.
Screenshot 2024-07-11 at 7 58 42 PM
Screenshot 2024-07-11 at 8 00 23 PM

@georgekarrv georgekarrv added :demo and removed :demo labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-eponym customer-preston #g-mdm MDM product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. story A user story defining an entire feature
Projects
None yet
Development

No branches or pull requests

9 participants