Skip to content

UDID Cert Auth: warn only option#643

Merged
jessepeterson merged 1 commit intomicromdm:mainfrom
jessepeterson:udid-cert-auth-warn-only
Aug 29, 2020
Merged

UDID Cert Auth: warn only option#643
jessepeterson merged 1 commit intomicromdm:mainfrom
jessepeterson:udid-cert-auth-warn-only

Conversation

@jessepeterson
Copy link
Member

Currently the UDID Cert Auth middleware (#358) rejects connections for mismatched certificates. However, if you have a legitimate reason to allow non-matching certificates (say, you have active enrollments for which end-users renewed their own certificates) you may want to disable the connection rejection while you remediate those enrollments.

I'm not entirely convinced this should even be merged as it actively subverts a security measure. Thoughts welcome.

@groob
Copy link
Member

groob commented Feb 4, 2020

Can you clarify what you mean by "warn"? There's no actual warning being printed/displayed anywhere, at least as far as the diff shows.

@jessepeterson
Copy link
Member Author

@groob I'm using "warn" here loosely. It already unconditionally logs here:

level.Info(mw.logger).Log("msg", "device cert hash not found, saving anyway", "udid", string(udid))
if err := mw.store.SaveUDIDCertHash(udid, certHash); err != nil {
return false, err
}
return true, nil
}
if 1 != subtle.ConstantTimeCompare(certHash, dbCertHash) {
level.Info(mw.logger).Log("msg", "device cert hash mismatch", "udid", string(udid))

This merely stops returning errors if it's switched on.

@jessepeterson jessepeterson force-pushed the udid-cert-auth-warn-only branch 3 times, most recently from 2e0381f to 8969492 Compare August 29, 2020 18:19
@jessepeterson jessepeterson force-pushed the udid-cert-auth-warn-only branch from 8969492 to e302fd6 Compare August 29, 2020 18:19
@jessepeterson jessepeterson changed the base branch from master to main August 29, 2020 18:21
@jessepeterson jessepeterson merged commit c6db60c into micromdm:main Aug 29, 2020
@jessepeterson jessepeterson deleted the udid-cert-auth-warn-only branch April 23, 2021 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants