marnin
08/02/2023, 5:08 PMFailed to start: validate Apple APNs certificate and key: Apple MDM APNs configuration: parse key pair: tls: failed to find any PEM data in certificate input
My fleet.service file has these environment variables set
Environment="FLEET_MDM_APPLE_APNS_CERT_BYTES=/root/mdm_certs/MDM_ Fleet Device Management Inc_Certificate.pem"
Environment="FLEET_MDM_APPLE_APNS_KEY_BYTES=/root/mdm_certs/fleet-mdm-apple-apns.key"
Environment="FLEET_MDM_APPLE_SCEP_CERT_BYTES=/root/mdm_certs/fleet-mdm-apple-scep.crt"
Environment="FLEET_MDM_APPLE_SCEP_KEY_BYTES=/root/mdm_certs/fleet-mdm-apple-scep.key"Rachel Perkins
08/02/2023, 5:39 PMFLEET_MDM_APPLE_SCEP_CHALLENGE?
https://fleetdm.com/docs/configuration/fleet-server-configuration#mobile-device-management-mdmSarah Gillespie
08/02/2023, 5:46 PM_BYTES from the end of each of the var names.Luke Heath
08/02/2023, 5:59 PM_BYTES expects the file's actual content to be passed in, not a path to the file. If you want to pass a file path, just remove the _BYTES so that it looks like this:
Environment="FLEET_MDM_APPLE_APNS_CERT=/root/mdm_certs/MDM_ Fleet Device Management Inc_Certificate.pem"
Environment="FLEET_MDM_APPLE_APNS_KEY=/root/mdm_certs/fleet-mdm-apple-apns.key"
Environment="FLEET_MDM_APPLE_SCEP_CERT=/root/mdm_certs/fleet-mdm-apple-scep.crt"
Environment="FLEET_MDM_APPLE_SCEP_KEY=/root/mdm_certs/fleet-mdm-apple-scep.key"marnin
08/02/2023, 7:00 PM_BYTES worked! Thank you, I knew it was something obvious. I didn’t see that documented anywhere but maybe I missed it.
@Rachel Perkins I didn’t think I needed FLEET_MDM_APPLE_SCEP_CHALLENGE because it wasn’t listed here but after I fixed the _BYTES syntax and restarted Fleet I got Failed to start: setup mdm apple services: scep: missing SCEP challenge so it is required. Where do I find the secret?marnin
08/02/2023, 7:37 PMRachel Perkins
08/02/2023, 7:59 PMRachel Perkins
08/02/2023, 8:00 PMFLEET_MDM_APPLE_SCEP_CHALLENGE be added to the docs Marnin linked?marnin
08/02/2023, 8:09 PMLuke Heath
08/04/2023, 1:12 AMFLEET_MDM_APPLE_SCEP_CHALLENGE is documented hereLuke Heath
08/04/2023, 1:13 AM_BYTES settingsmarnin
08/04/2023, 1:06 PMFLEET_MDM_APPLE_SCEP_CHALLENGE is but not how you how you get the it or find it. In this case, you don't get it or find it, you create it.
If you look at documentation for mdm.apple_scep_key_bytes , it saids Typically generated via fleetctl generate mdm-apple. That clue, or something similar is missing for FLEET_MDM_APPLE_SCEP_CHALLENGERachel Perkins
08/04/2023, 1:29 PMmarnin
08/04/2023, 1:31 PM_BYTESRachel Perkins
08/04/2023, 1:44 PMmarnin
08/04/2023, 1:51 PMLuke Heath
08/04/2023, 4:59 PM