DCSW: Verify Windows SCEP profiles without validation (#34852)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34249

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
This commit is contained in:
Magnus Jensen 2025-10-30 14:50:03 -03:00 committed by GitHub
parent f0e1b1425f
commit d2d918dd49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 0 deletions

View file

@ -170,6 +170,13 @@ func compareResultsToExpectedProfiles(ctx context.Context, logger kitlog.Logger,
}
err = LoopOverExpectedHostProfiles(ctx, logger, ds, host, func(profile *fleet.ExpectedMDMProfile, ref, locURI, wantData string) {
if strings.HasPrefix(locURI, "./Device/Vendor/MSFT/ClientCertificateInstall/SCEP") {
verified[profile.Name] = struct{}{}
// We delete here if by some accident it was marked as missing before
delete(missing, profile.Name)
return
}
// if we didn't get a status for a LocURI, mark the profile as missing.
gotStatus, ok := profileResults.cmdRefToStatus[ref]
if !ok {

View file

@ -594,6 +594,26 @@ func TestVerifyHostMDMProfilesHappyPaths(t *testing.T) {
toFail: []string{},
toRetry: []string{},
},
{
name: "scep profile instantly verifies",
hostProfiles: []hostProfile{
{"N1", syncml.ForTestWithData([]syncml.TestCommand{
{
Verb: "Replace",
LocURI: "./Device/Vendor/MSFT/ClientCertificateInstall/SCEP/bogus-key-value",
Data: "non related data",
},
}), 0},
},
existingProfiles: []fleet.HostMDMWindowsProfile{
{
ProfileUUID: "uuid-N1",
Name: "N1",
Status: &fleet.MDMDeliveryPending,
},
},
toVerify: []string{"N1"},
},
}
for _, tt := range cases {