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 computer name, serial number, and UUID as variables in macOS configuration profiles #16958

Closed
10 tasks
Patagonia121 opened this issue Feb 19, 2024 · 30 comments
Closed
10 tasks
Assignees
Labels
~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. ~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-easterwood customer-pingali customer-reedtimmer customer-rosner customer-starchik customer-ufa #g-mdm MDM product group :product Product Design department (shows up on 🦢 Drafting board) prospect-cohen ~sc Request is a requirement in a presales opportunity story A user story defining an entire feature

Comments

@Patagonia121
Copy link
Member

Patagonia121 commented Feb 19, 2024

UPDATE: Closed this story and filed a testing ticket instead (#21294). We discovered that the MDM protocol allows users to set computer name, serial number, and UUID in the SCEP payload. Learn more here.

(noahtalerman 2024-07-12)


Goal

User story
As a Client Platform Engineer,
I want to add computer name, serial number, and UUID as a variable to a configuration profile
so that Fleet, for each host, populates this variable with host specific information. This way, I can install a unique SCEP certificate to enable Okta Verify on my macOS hosts.

Context

We should think about what it will take to implement the same feature for scripts and what approach should we take in order to make this work for both profiles and scripts (i.e. considering scripts while developing for profiles so we can reuse this when we start working on scripts).

Changes

Product

  • UI changes: Figma link
  • CLI changes: Figma link
  • Outdated documentation changes: Docs changes: Variables in macOS configuration profile #20231
  • Changes to paid features or tiers: Available in Fleet Premium only
  • Other changes:
    • Supported variables are: $FLEET.HOST.COMPUTER_NAME, $FLEET.HOST.HARDWARE_SERIAL, and $FLEET.HOST.UUID
    • Fleet server should parse profiles on upload and reject variables that are not supported. Fleet should reject only variables that start with $FLEET. but not supported.
      • If user specify for ex. $SERIAL_NUMBER Fleet will let this through as is, since it's not supported variable and doesn't have FLEET prefix
    • Before installing the profile to a host, Fleet should replace the variable with the respective value from the host.
    • GitOps should not replace variables that start with $FLEET.. It's still possible to use $ENV_VAR without FLEET prefix.
  • Redirect link for docs: Redirect: Variables in macOS configuration profile #20233

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

  • Risk level: Low

Manual testing steps

  1. Create config profiles with variables (whatever is supported as part of this MVP)
  2. Deploy config profiles to hosts
  3. Validate the data is ingested in Fleet and available

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.
@dherder
Copy link
Contributor

dherder commented Feb 27, 2024

@noahtalerman we will need this to support the "managed" status in SCEP workflows involving Okta Verify. Please refer to https://help.okta.com/oie/en-us/content/topics/identity-engine/devices/okta-ca-static-scep-macos-jamf.htm#Create for backgound

@noahtalerman noahtalerman added story A user story defining an entire feature :product Product Design department (shows up on 🦢 Drafting board) and removed ~feature fest Will be reviewed at next Feature Fest labels Mar 8, 2024
@noahtalerman
Copy link
Member

Hey @Patagonia121 heads up, this story was prioritized during feature fest.

Aiming to ship an improvement in the next 6 weeks.

@noahtalerman noahtalerman changed the title macOS profile variable substitution Add end user email to macOS configuration profile (certificate payload) Mar 11, 2024
@noahtalerman noahtalerman added the #g-mdm MDM product group label Mar 11, 2024
@noahtalerman
Copy link
Member

Moved the original issue description here:

Variable substitution in macOS profiles allows for dynamically creating profiles based on various attributes, for instance if you would want to create a certificate payload for each machine you wouldn't want to make 10,000 profiles you would want to make one that would send the profile with variable $USER prefilled

  1. this becomes incredibly powerful if you could pass the results of a query into the payload

@noahtalerman noahtalerman added ~feature fest Will be reviewed at next Feature Fest and removed :product Product Design department (shows up on 🦢 Drafting board) labels Mar 28, 2024
@noahtalerman
Copy link
Member

Hey @Patagonia121 heads up, we didn't get to this in the last design sprint.

Bringing it back to feature fest.

@noahtalerman noahtalerman changed the title Add end user email to macOS configuration profile (certificate payload) 🎸Add end user email to macOS configuration profile (certificate payload) Mar 28, 2024
@noahtalerman
Copy link
Member

Turing this into an air guitar so that we can better understand the problem.

@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 noahtalerman self-assigned this Mar 29, 2024
@nonpunctual nonpunctual added the ~csa Issue was created by or deemed important by the Customer Solutions Architect. label Apr 9, 2024
@nonpunctual
Copy link
Contributor

@dherder @noahtalerman @zwass Dave or Zach may have more up-to-date timelines than me. I can also make sure they are asked at the next CS call we have with them.

@noahtalerman noahtalerman removed the ~feature fest Will be reviewed at next Feature Fest label Jun 21, 2024
@noahtalerman
Copy link
Member

noahtalerman commented Jun 24, 2024

seethis blogpost regarding dynamic scep profiles with computername and UDID as variables in a Platform SSO use case

Important part here:

Screenshot 2024-06-24 at 3 50 48 PM

Once Fleet supports setting these variables in the SCEP config profile, Okta users can keep local macOS credentials sycned w/ Fleet + Okta.

cc @marko-lisica @dherder

@nonpunctual nonpunctual added the ~feature fest Will be reviewed at next Feature Fest label Jun 24, 2024
@noahtalerman
Copy link
Member

Hey @nonpunctual I pulled the ~feature fest off because this story is in the current design sprint :)

@noahtalerman noahtalerman added customer-reedtimmer and removed ~feature fest Will be reviewed at next Feature Fest labels Jun 27, 2024
@noahtalerman
Copy link
Member

From customer-reedtimmer's user stories:

Added as a blocker due to Smallstep certification deployment requiring including host’s serial in generated SCEP payload.

FYI @marko-lisica it sounds like we might want to support serial as a variable in this first pass for deploying SCEP certificates for Smallstep. Needs confirmation.

@noahtalerman noahtalerman added the ~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. label Jul 1, 2024
marko-lisica added a commit that referenced this issue Jul 5, 2024
Redirect for: #16958
@noahtalerman
Copy link
Member

Hey @marko-lisica, I just watched the Gong recording (internal) from the design review. We do already support GitHub environment variables and they use the $ENV_VAR syntax. The story is here:

We dogfood this feature today in the Google Chrome config profile here.

So, I think we have a couple options:

  1. Use the same $VAR syntax for Fleet's reserved host vital variables (ex. $HARDWARE_SERIAL. To @georgekarrv's point, this means we don't want to validate variables because a user can specify any variable as an environment variable. In the odd scenario the user specifies a reserved host vital variable an an env variable, we'd likely override the env variable (and document this behavior).
  2. Use a different syntax for Fleet's reserved host vitals variables. We can add validation in this case.

If we're focused on users coming from Jamf (we are), option (1) makes sense. That said, I'm not sure it's the best UX. We can't throw error messages which makes it hard to debug.

@getvictor and @lucasmrod any thoughts? Missing other options?

@georgekarrv
Copy link
Member

We mighty have a conflict now then. How do you differentiate between at upload time vs runtime. Let's discuss in design tomorrow

@getvictor
Copy link
Member

I recommend option 2 -- use a different syntax.

Option 3. Change the syntax of gitops env vars and have runtime use the normal $ENV_VAR syntax.

@noahtalerman
Copy link
Member

Hey @marko-lisica heads up, I forgot that we already have one reserved variable for software install scripts: $INSTALLER_PATH

More context in Slack here: https://fleetdm.slack.com/archives/C03C41L5YEL/p1714577714118779

Does our latest plan work with this variable? Do we need to make any changes?

@noahtalerman noahtalerman changed the title Variables in macOS configuration profile Add computer name, serial number, and UUID as variables in macOS configuration profiles Jul 9, 2024
@roperzh
Copy link
Member

roperzh commented Jul 10, 2024

@nonpunctual we were talking about that doc the other day, it's truly awesome. For full context for Marko and Noah, AFAIK it only works for certain payloads (SCEP and VPN)

@marko-lisica
Copy link
Member

@noahtalerman $INSTALLER_PATH variable doesn't conflict with configuration profile variables nor GitOps environment variables. See discussion below:

Screenshot 2024-07-10 at 14 42 44

@noahtalerman
Copy link
Member

noahtalerman commented Jul 12, 2024

UPDATE: Let's write a guide for this instead of just testing it (noahtalerman). Guide issue is here: #21294

Closed this story and filed a testing ticket instead (#21294). We discovered that the MDM protocol allows users to set computer name, serial number, and UUID in the SCEP payload:

Screenshot 2024-07-12 at 11 32 51 AM

Goal

User story
As a Client Platform Engineer,
I want to know how to deploying a profile (SCEP payload) in Fleet w/ computer name, serial number, and UUID as variables
so that Fleet, for each host, populates this variable with host specific information. This way, I can install a unique SCEP certificate to enable Okta Verify on my macOS hosts.

@noahtalerman noahtalerman changed the title Add computer name, serial number, and UUID as variables in macOS configuration profiles Testing: Connect macOS host to Okta Verify using Fleet Jul 12, 2024
@noahtalerman noahtalerman changed the title Testing: Connect macOS host to Okta Verify using Fleet Add computer name, serial number, and UUID as variables in macOS configuration profiles Jul 12, 2024
@fleet-release
Copy link
Contributor

Unique certificates,
Like leaves in a cloud city,
Secure, yet distinct.

@noahtalerman
Copy link
Member

Arg! I forgot to file the testing ticket.

Filed a guide ticket instead here: #21294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~apple-mdm-maturity Contributes to maturity in macOS, iOS, or iPadOS MDM product category. ~csa Issue was created by or deemed important by the Customer Solutions Architect. customer-easterwood customer-pingali customer-reedtimmer customer-rosner customer-starchik customer-ufa #g-mdm MDM product group :product Product Design department (shows up on 🦢 Drafting board) prospect-cohen ~sc Request is a requirement in a presales opportunity story A user story defining an entire feature
Development

No branches or pull requests