| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
mikeTWC1984 We should export the cmdlets on Unix-s: Also please review tests https://github.com/PowerShell/PowerShell/tree/master/test/powershell/Modules/Microsoft.PowerShell.Security
|
Sorry, something went wrong.
|
I added WIP until the PR is ready to review. |
Sorry, something went wrong.
|
OK. It's pretty much ready for review, but somehow Powershell-CI pester test is failing. I ran 3 tests today, all failed for linux, 2 for Mac and 1 for Windows. I also tried Start-PSPester locally for my branch and Powershell's master and got ~30 errors. A the moment it's not quite clear what's wrong. . Probably some temp issue, will keep experimenting. The build itself goes through, CMS commands seem to work, but I haven't done thorough testing yet. |
Sorry, something went wrong.
|
mikeTWC1984 You should enable the cmdlets in DefaultCommands.Tests.ps1 too (See link above). |
Sorry, something went wrong.
|
This PR does not appear to conflict with #11590 |
Sorry, something went wrong.
|
OK, tests finally pass on Mac. Turns out certs got added to the store automatically during creation (X509Store.add actually doesn't work ) . I'll work on the Doc today or tomorrow. |
Sorry, something went wrong.
|
Ok, applied all the latest changes. I was back and forth between using CertificateCollection.Find and foreach loop to match SubjectName, and I'm finally sticking with foreach, so it's the same approach as original version had. I realized find will always do "contains" match, but I guess mostly user would need exact match. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
We still need to do a security review, but the code changes look good.
Sorry, something went wrong.
| if (subjectNamePattern.IsMatch(cert.Subject)) | ||
| { | ||
| certificatesToProcess.Add(cert); | ||
| } |
There was a problem hiding this comment.
mikeTWC1984 If you ask about this IsMatch() it is ok to preserve the old behavior until we get a negative feedback.
Sorry, something went wrong.
There was a problem hiding this comment.
This one is OK. It's bit counterintuitive to use wildcard (and directory) when expecting single item, but helps when typing those names manually. After going back and forth with this, I realized omitting CN= prefix in subject name would be very useful, so I added one extra IsMatch for simple name too
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with two minor comments.
Sorry, something went wrong.
|
Travis Plunk (@TravisEz13) I think this is ready for security review. I also filed Documentation issue. |
Sorry, something went wrong.
|
mikeTWC1984 Yes, I've already schedule the review. The reviews are Confidential and we have to decide how to communicate the results after the review. |
Sorry, something went wrong.
|
mikeTWC1984 Security review summary: we don't think the security footing of the cmdlet has changed. |
Sorry, something went wrong.
|
mikeTWC1984 Thanks for your contribution! |
Sorry, something went wrong.
|
Cool, thanks all. There are few enhancements we can add to those commands, I'll probably submit an issue or PR sometime soon. I guess it's also the time to update documentation, will work on that. |
Sorry, something went wrong.
|
mikeTWC1984 Open new issue(s) if there is a field for discussion. |
Sorry, something went wrong.
|
🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
This PR replaces cert provider (windows only) with X509Store class to resolve certificate by name/thumbprint on CmsUtils.
PR Work items:
PR Checklist