Skip to content

Fall-back to to using non-filtered certs #145

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

Closed

Conversation

jessepeterson
Copy link
Member

The changes in #136 mean that for those CA certs that do not have KeyEncipherment get excluded. Which if those are the only ones available.. is a problem. :) This PR falls-back to the previous behavior.

@jessepeterson
Copy link
Member Author

In particular all existing MicroMDM CAs do not have a KeyUsageKeyEncipherment key usage set on their CAs and so the SCEP client will fail against them. :(

@omorsi
Copy link
Contributor

omorsi commented Mar 5, 2021

Looking at JSCEP implementation, it looks like it regards a certificate as a valid recipient if it has KeyUsageKeyEncipherment or KeyUsageDataEncipherment or it's max path lenght is 0 (CA certificate). I don't know if there is a specification that this is following or not. But WDYT about this? Will this work with MicroMDM CAs?

@jessepeterson
Copy link
Member Author

jessepeterson commented Mar 5, 2021

I think it's useful to select amongst a group of CAs returned, no doubt. However if none are found having that key I don't think it's a good experience to just fail and be inoperable.

What would you think about an option? Something like scep.WithUseAnyRecipient()? Or the vice versa WithOnlyKeyEnciphermentRecipients()? That said the fall-back behavior covers both cases nicely. Maybe fall-back by default with an option to require only key encipherment check.

@omorsi
Copy link
Contributor

omorsi commented Mar 5, 2021

I want also to suggest another option. I can also implement it in another PR if you want.
WDYT about including all certificates as recipients by default, but also to introduce the WithSelector option. The selector should be a function that filters the certificates. I think this may allow easy customization of how any user want to filter recipients. WDYT?

@jessepeterson
Copy link
Member Author

Yeah that sounds reasonable. Feel free to submit a PR!

I do like the idea of a default selector being provided that checks for keyencipherment as well as falls back. This captures both cases where we "prefer" KE certs but don't require them for maximum compatibility. Ie cover NDES as well as other common SCEP server setups.

@omorsi omorsi mentioned this pull request Mar 5, 2021
@jessepeterson
Copy link
Member Author

Abandoning in favor of #147

@jessepeterson jessepeterson deleted the filtered-certs-fallback branch March 25, 2021 18: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