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 configurable clock skew flag #887

Merged
merged 1 commit into from
Jun 15, 2023

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

@jessepeterson jessepeterson merged commit f0dd6fe into micromdm:main Jun 15, 2023
6 checks passed
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