-
Notifications
You must be signed in to change notification settings - Fork 67
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
Certificate request not working in 2012R2 as it did in 2016 #180
Comments
Hi @jthompson333 - thanks for raising this. Just to make sure I'm on the right track, are you saying the config works OK on WS 2016, but doesn't work on WS 2012R2? Does the |
Yes, to confirm it did work on WS 2016 but not on WS 2012R2 Let me check on those items and I will get back to you. The domain was built with automation and the CA was setup with the sister powershell dsc library AdcsCertificationAuthority. I'm also on vacation, so I may not get back to responding on this until Tuesday. Sorry, I guess I should have waited a little longer to report. Thanks for the feedback. I won't forget about it... |
If you can get some details on the template you've got setup in your WS2012R2 machine then I can try and replicate it here on my lab. |
Params for both CA's were installed with these options from the ActiveDirectoryCSDsc module.
|
From 2012 R2 DC
From 2016 DC
|
Not sure if thats the info that you were looking for, but, let me know if its not. |
Great info @jthompson333 - can you see who has Enroll permissions on the Security tab on these templates? You need to ensure that the $Credential you're passing to your config has access on the Security tag as an Enroll. Other ways you can check this is log onto the server you're applying the DSC config to using the account specified in $Credential and try issuing the certificate using certreq.exe (or even CertMgr.msc) for the WebServer Template. If you can do this then it probably isn't a security issue as I thought and we can track it down from there. Does that make sense? |
I'll try certreq.exe or the gui and see what happens. |
So the project I'm working on- I was just told not to waste time with 2012 R2. So I suppose you can archive this off, as I won't have anymore time to mess with it. Never got to try certreq.exe... |
I had a similar error when when the "Domain account" I passed in "dsc_credential" wasn't a local administrator on the machine where I requested it created the request from. |
Thanks @wh33ly - I am fairly sure this issue is related to an access issue as you surmise. We probably could do some more work on detecting and reporting likely causes back to the user, which is why I've left this open for now. |
Details of the scenario you tried and the problem that is occurring
Verbose logs showing the problem
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer YTHJK-ES-1 with user sid
S-1-5-21-4238065118-3723846887-562607489-500.
VERBOSE: [YTHJK-ES-1]: LCM: [ Start Set ]
VERBOSE: [YTHJK-ES-1]: LCM: [ Start Resource ] [[CertReq]SSLCert]
VERBOSE: [YTHJK-ES-1]: LCM: [ Start Test ] [[CertReq]SSLCert]
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Test-TargetResource: Testing Certificate with
Subject 'CN=YTHJK-ES-1.bvt.local' issued by YTHJK-DC-1.bvt.local\bvt-YTHUK-DC-1-CA.
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Test-TargetResource: No valid certificate found
with subject 'CN=YTHJK-ES-1.bvt.local' issued by YTHJK-DC-1.bvt.local\bvt-YTHUK-DC-1-CA.
VERBOSE: [YTHJK-ES-1]: LCM: [ End Test ] [[CertReq]SSLCert] in 0.0310 seconds.
VERBOSE: [YTHJK-ES-1]: LCM: [ Start Set ] [[CertReq]SSLCert]
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Starting Certificate request
with Subject 'YTHJK-ES-1.bvt.local' issued by YTHJK-DC-1.bvt.local\bvt-YTHUK-DC-1-CA.
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Creating certificate request
'C:\Windows\TEMP\xCertReq-5578fa69-3dd3-4b99-be3c-d79a0169bab7.req' from
'C:\Windows\TEMP\xCertReq-5578fa69-3dd3-4b99-be3c-d79a0169bab7.inf'.
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Create certificate request
result: Active Directory Enrollment Policy
{AE50C422-1B3C-4F8C-A9EE-5DD749ED747D}
ldap:
CertReq: Request Created
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Submitting certificate request
'C:\Windows\TEMP\xCertReq-5578fa69-3dd3-4b99-be3c-d79a0169bab7.req' returning
'C:\Windows\TEMP\xCertReq-5578fa69-3dd3-4b99-be3c-d79a0169bab7.cer' issued by YTHJK-DC-1.bvt.local\bvt-YTHUK-DC-1-CA.
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Submitting certificate request
using separate process.
VERBOSE: [YTHJK-ES-1]: [[CertReq]SSLCert] Set-TargetResource: Submitting certificate request
result: Certificate Request Processor: The parameter is incorrect. 0x80070057 (WIN32: 87 ERROR_INVALID_PARAMETER)
VERBOSE: [YTHJK-ES-1]: LCM: [ End Set ] [[CertReq]SSLCert] in 5.7660 seconds.
PowerShell DSC resource MSFT_CertReq failed to execute Set-TargetResource functionality with error message:
System.InvalidOperationException: Certificate file 'C:\Windows\TEMP\xCertReq-5578fa69-3dd3-4b99-be3c-d79a0169bab7.cer'
not found.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost
VERBOSE: [YTHJK-ES-1]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 5.97 seconds
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The text was updated successfully, but these errors were encountered: