Skip to content

Add configurable clock skew flag#887

Merged
jessepeterson merged 1 commit intomicromdm:mainfrom
korylprince:pkcs7-skew
Jun 15, 2023
Merged

Add configurable clock skew flag#887
jessepeterson merged 1 commit intomicromdm:mainfrom
korylprince:pkcs7-skew

Conversation

@korylprince
Copy link
Contributor

This PR is just cherry-picked from the work I previously did in #871.

At the time, I was unable to replicate the clock skew issue, and we only had one report. Since then, there's been a couple of issues (NanoMDM #71, #886) reported experiencing the same issue @tgunz first reported on the MacAdmins Slack.

As-is, this adds a flag to configure the clock skew, and it defaults to 0s.

I still think it's worth exploring setting the default to 5 minutes (see here for why that duration). It would mean the issue is fixed transparently for most users instead of issues being raised here or on the MacAdmins slack.

More importantly, I don't see any downsides to this change. In theory, I guess this could possibly open you to easier replay attacks, but the attacker would have to MiTM your client to get the header in the first place, and that would be a much larger issue. Maybe I'm missing something else here, though...

@korylprince
Copy link
Contributor Author

Rebased this back onto main to catch up with other PRs.

Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

What is "error retrieving device certificate: CMS verify MDM Signed Message" and how to fix it?

2 participants