| Table of Contents | ||
|---|---|---|
|
Skip ahead to the Submit the certificate request section for an existing certificate request.
Define the certificate subject and subject alternative names
...
Sign in to a computer then start an administrative PowerShell
...
session
Modify then run the following
...
commands to set the subject
...
and template of the certificate as well as any optional DNS or IP
...
Address subject alternate
...
name values:
Code Block
...
language powershell $Subject =
...
"<subject for the certificate>"
...
$SubjectAlternateNames = @("<certificate SAN #1>","<certificate SAN #2>",...)
...
$CertificateIPAddresses = @("<certificate IP address #1>","<certificate IP address #2>",...)
Create the certificate request
...
Log into a server joined to the Austin Active Directory as a user with permissions to request a certificate from the desired template
...
Start an administrative PowerShell session
...
Run the following commands to define the newline string:
Code Block
...
#example
Set-Location $env:windir\tempIn the same administrative PowerShell prompt, run the following to create the certificate policy file
...
language powershell $NewLine = [System.Environment]::NewLineRun the following commands to create the temporary files:
Code Block language powershell $CertificateTemplateFile = New-TemporaryFile $CertificateRequestFile = New-TemporaryFileRun the following commands to define the certificate template:
Code Block language powershell $CertificateTemplate = @' [Version] Signature=
...
"
...
$Windows
...
NT$" [NewRequest] Subject=
...
"CN=
...
%Subject%" Exportable=TRUE MachineKeySet=TRUE KeyLength=2048 KeySpec=AT_KEYEXCHANGE [Extensions] 2.5.29.17=
...
"{text}
...
" _continue_=
...
"DNS=
...
%Subject%&
...
"
...
'@Run the following commands to update the subject in the certificate template:
Code Block language powershell $CertificateTemplate = $CertificateTemplate.Replace('%Subject%', $Subject)Run the following commands to add any optional DNS subject alternate names to the certificate
...
template:
Code Block language powershell ForEach (
...
$SubjectAlternateName in
...
$SubjectAlternateNames) {
...
$CertificateTemplate = '{0}{1}_continue_=
...
"DNS=
...
{2}&
...
"' -f $CertificateTemplate, $NewLine, $SubjectAlternateName }Run the following commands to add any optional IP Address subject alternate names to the certificate
...
template:
Code Block language powershell ForEach (
...
$CertificateIPAddress in
...
$CertificateIPAddresses) {
...
$CertificateTemplate = '{0}{1}_continue_=
...
"IPAddress=
...
{2}&
...
In the same administrative PowerShell prompt, run the following to create the request:
| Code Block |
|---|
$cert_file_req = ((Get-Location).Path + "\" + $cert_file + ".req")
certreq -new $cert_file_inf $cert_file_req
|
...
In the same administrative PowerShell prompt, run the following to validate the request:
| Code Block |
|---|
Get-Content $cert_file_req |
Submit the certificate request to an Austin CAs
Certificates should only be submitted to the Austin CAs when they require certificate attributes not supported by InCommon such as:
- EKUs other than Digital Signature and Key Encipherment
- Subject Alternate Names that are not in the utexas.edu DNS address space such as IP Address
- Certificates that must have a lifetime longer than 398 days
Complete the following instructions to submit the certificate request to the Austin CAs:
- If submitting a pre-created certificate request, complete the following instructions:
- Log into a server joined to the Austin Active Directory as on a system with permissions to request a certificate from the desired template
- Start an administrative PowerShell session and set the $cert_file_req object to the full path of the certificate request file
In the same administrative PowerShell session, run one of the following to set the certificate template:
For VMware SSL certificates, run the following:
Code Block $cert_template = "VMwareSSL6.5"For long-duration server certificates, run the following:
Code Block $cert_template = "Server-10Year"
In the same administrative PowerShell session, run the following to define where the signed certificate file will be created using the certificate request file
Code Block $cert_file_cer = (Get-Item $cert_file_req).DirectoryName + "\" + (Get-Item $cert_file_req).BaseName + ".cer"In the same administrative PowerShell session, run the following to submit the request to an Austin certificate authority:
Code Block certreq -submit -attrib ("CertificateTemplate:" + $cert_template) $cert_file_req $cert_file_cer
Submit the certificate request to InCommon
Complete the following instructions to submit the certificate request to InCommon:
- Submit the request file or the contents of the request file to the certificate admins with the following information:
- Email address of the ServiceNow ticket queue for the team that manages the service or system
- This address will receive the certificate and notices about certificate expiration
- Do not provide the email address of a distribution list or individual user
- If the certificate includes any Subject Alternate Names (SANs)
- This will instruct the certificate admins in how to process the certificate request
- Certificates submitted without providing this information may be issued without the required SANs
- Email address of the ServiceNow ticket queue for the team that manages the service or system
Accept the certificate request
...
- Ensure the certificate is on or accessible by the system that created the original certificate request
- Log into the system that created the original certificate request
- Start an administrative PowerShell session and set the $cert_file_cer object to the full path of the signed certificate file that will be accepted
In the same administrative PowerShell prompt, run the following to accept the response:
...
"' -f $CertificateTemplate, $NewLine, $CertificateIPAddress }Run the following commands to trim the certificate template:
Code Block language powershell $CertificateTemplate = $CertificateTemplate -replace '&"\s*$', '"'Run the following commands to write the certificate template file:
Code Block language powershell $Content | Out-File -FilePath $CertificateTemplateFile -ForceRun the following commands to review the certificate template file:
Code Block language powershell Get-Content -Path $CertificateTemplateFileRun the following commands to create the certificate request file:
Code Block language powershell certreq -new -f $CertificateTemplateFile $CertificateRequestFileRun the following commands to review the certificate request file:
Code Block language powershell Get-Content -Path $CertificateRequestFileRun the following commands to retrieve the certificate request file name:
Code Block language powershell Get-Item -Path $CertificateRequestFile
Submit the certificate request to a certificate authority
To submit the certificate request to the preferred InCommon certificate authority, review and complete the SSL Request form in ServiceNow
To submit the certificate request to the internal Austin certificate authority, complete the instructions on the following page: Austin Certificates - How-To - Submit custom certificates requests