-
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
xCertReq does not create req file from inf #49
Comments
Hi @gammalost - thank you for submitting this. There are some current issues with xCertReq that have been fixed but not yet released. However, I don't think what you're seeing is caused by these. I have a couple of questions:
If you could take a look at the above two items and let me know any other details based on my suggestions I can try and help further. Thank you! |
@gammalost - |
@dcuomo Thanks for input! Sadly this does not seem to fix it either. The problem I'm having seems to be the creation of the .req file from the .inf. I can see the .inf gets created, but not the other one. As stated I can create the file when manually running certreq.exe without the -q option, but not with it. It might be a credential problem? |
Hi @gammalost - ah - I haven't actually tried this issuing an enterprise cert from a machine not connected to the domain. Have you tried setting the PSDscRunAsCredential parameter (if you're using WMF5+) or the Credential parameter (if WMF4)? I actually suspect this won't work, because this effectively tries to force the certutil.exe commands to run under the context of this user - which probably isn't possible given that you're not in the domain. I think I'll need to do some actual testing to replicate the issue. I should be able to build a non-domain joined server and try it out on my domain CA. I'll try and look at this in the weekend (this week is a bit of a shocker work wise). |
New and uncharted territory 😄 . I've tried setting PSDscRunAsCredential both as local and domain admin for the remote domain. This actually results in no .inf file at all, even with local admin credentials. The Credential parameter does not seem to matter (at least not at this point) as it still results in it failing when running the certreq -new part of the module. I am using a pure W2K16 environment if this is of interest to know. Cool, looking forward to hear the results! Until then I'll continue testing. |
Hi @PlagueHO ! A prerequisite is having a IIS server somewhere as a frontend. The problem with setting up a solution that is able to serve non-domain clients is that the two ADCS services Enrollment Web Service and Enrollment Policy Web Services needs to be installed. To be able to use CertReq with this solution the following additional options needs to be specified in both CertReq -new and -submit:
This demand for such solution is possibly too small(?), but could possibly be worth adding in a later release of the module? 🙂 |
Hi @PlagueHO . |
Hi @gammalost - sorry I missed your previous comment. This sounds like a really useful feature to me and would be great to have! I do think though there would need to be a parameter added to specify that a Standalone CA is being used - the parameter would default to Enterprise CA if the machine is domain joined or Standalone if it wasn't. If Enterprise CA is being used then use the existing process. if Standalone CA is being used then the following things would happen:
would need to be removed from the .INF file because templates aren't applicable in standalone CA's. Does this sound like it would work? |
Also, it might be worth updating xADCSDeployment to enable deploying Enrollment Web Service and Enrollment Policy Web Services. I've been meaning to add these but haven't had the time yet... |
AFAIK about CA's and requesting it looks sound. I'll implement the changes and make a pull request. |
One thing regarding the standalone/enterprise parameter. I don't think it should default to a value in the case of it being in a domain or not. This because both non-domain servers and servers in external domains can still request certificates from an enterprise CA (if the enrollment services is being used). The CA type parameter will in short terms only affect whether or not
will be added to the inf file. |
@gammalost - cool - that sounds like a good idea to me. Just as long as the default is general Enterprise CA (to avoid a breaking change). Thanks for working on this! |
Requesting certificates using enrollment web services. (Issue #49)
Hi @gammalost - I think this one can be closed now - is that correct? |
Yes 🙂 |
When running xCertReq, it throws an error after trying to create the .req file from the .inf file when it tries to use the .req file:
PowerShell DSC resource MSFT_xCertReq failed to execute Set-TargetResource functionality with error message: Certificate Request file 'C:\windows\TEMP\xCertReq-3a43205a-a1b6-40e6-a1c3-40a56
fc7c375.req' not found.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : TB-Test1
I've tried to run certreq.exe manualy on the server with the "-q" option, with the same result. When running it without "-q" it gives a popup about not finding the template and "continue anyway" option, which in turn generates the required .req file.
Is this a known problem, or might there be some PEBCAK in the picture?
These are the parameters specified:
xCertReq RequestCertificate
{
Subject = "$($Node.NodeName)"
CAServerFQDN = 'TB-CA.thebachelorettes.local'
CARootName = 'thebachelorettes-TB-CA-ca'
KeyLength = '2048'
AutoRenew = $true
}
The text was updated successfully, but these errors were encountered: