Generating an SSO certificate
For the SSO to the desktop feature, a certificate must be generated. For more information on SSO to the desktop, review the article on configuring identity management settings.
To generate an SSO certificate, follow the steps below.
- Create a server in your environment. If you already have a certificate authority (CA) in your domain, you can skip this step and go to step 2.
- Add the Active Directory Certificate Services – Certification Authority role.
- Configure it as enterprise root CA.
- Create a certificate template for the enrollment agent.
- Create a certificate template for enrollment.
- Open the Certificate Templates MMC.
- Right-click on the “Smartcard Logon” template, and duplicate the template. Configure as on the screenshots below.
- Compatibility
- General
- Request handling
- Cryptography
- Extensions – application policies
- Extensions – key usage
- Issuance requirements
- Subject name
- Compatibility
- Create a certificate template for the Web application.
- Open the Certificate Templates MMC.
- Right-click on the “Web Server” template, and duplicate the template. Configure as on the screenshots below.
- General
- Compatibility
- Request handling
- Cryptography
- Server
- Subject name
- Issuance requirements
- General
- Add the server where you are going to run RDPSSOCertGenSvc service.
- Select the templates.
- Open the Certification Authority MMC.
- Go to Certificate Templates, and right-click to select New – Certificate Template to Issue.
- Select all templates created above, and click OK.
- Create the ce_agent user in AD for certificate enrollment purposes. Add this user to the LocalAdmins AD group.
- Install the RDPSSOCertGenSvc service application.
- Login with the ce_agent user on the VM where you installed the RDPSSOCertGenSvc service and enroll Certificate request agent certificate.
- Open the MMC, add the Snap-In, add Certificates, and select My user account.
- Go to Certificates – Current User – Personal – Certificates.
- Right-click on this folder – All Tasks – Request new certificate.
- Leave defaults until Request Certificates. Select feitian-enroll-agent template and click Enroll.
- Open this certificate, go to the Details tab, and copy the Thumbprint field value.
- Open the MMC console on the VM you installed RDPSSOCertGenSvc service (any user, it can be ce_agent) and enroll the Web certificate.
- Open the MMC on the VM where you installed RDPSSOCertGenSvc service (any user, it can be ce_agent).
- Add the Snap-In.
- Add Certificates.
- Select Computer account.
- Go to Certificates – Personal – Certificates.
- Right-click on this folder – All Tasks – Request new certificate.
- Leave defaults until Request Certificates. Select Apporto-Web template and click Details-Properties.
- Fill the labels as on the screenshot below. Enter the FQDN of the server you are logged into in the “Value” field.
- Click Ok then click Enroll.
- Select the certificate you enrolled, and export it to PFX format with a private key. You will need it in the next step for the
PFX_FILE
andPFX_PASSPHRASE
parameters.
- Open C:\Program Files\Apporto\RDP SSO Certificate Generation Service\.env and replace the following:
ENABLE_HTTP
: true if HTTP service should be enabled, default false if not setPORT
: Port number of the HTTP service, default 3000 if not set.ENABLE_HTTPS
: true if HTTPS service should be enabled, default true if not setHTTPS_PORT
: port number of the HTTPS service, default 3443 if not setPFX_FILE
: path to the domain root certificate in PFX formatPFX_PASSPHRASE
: password for the certificateCERTIFICATE_DIR_PATH
: the path of temporary directory where the certificates will be generatedCERTIFICATE_THUMBPRINT
: the thumbprint of Enrollment Agent certificate requested in the previous stepCERTIFICATE_TEMPLATE_NAME
: the template name of the certificate created in step 3
Example .ENV settings (info can vary based on setup)
- Open the Service manager and find the RDPSSOCertGenSvc service.
- Go to Log On and switch the start account for this service to ce_agent as created in AD above.
- Restart the service.
- Check C:\Program Files (x86)\rdp-sso-cert-gen-svc\service-error.log if you have any issues.
Group policy object (GPO)
- Your root CA should be delivered on all the VMs in the domain.
- Open the Certification Authority MMC. Right-click on the root CA Name – Properties.
- In Properties, open the General tab and go to Certificate #0 (this is your root CA) – View Certificate.
- Open the Details tab, and click on Copy to File…
- Next – DER encoded library, and save the certificate on your drive.
- Move the certificate file to your Domain Controller and Open Group Policy Management Console.
- Select the Group Policy you want to apply and go to – Computer Configuration-Policies-Windows Settings-Security Settings-Public Key Policies-Trusted Root Certification Authorities to import certificate you exported above.
- Computer Configuration-Policies-Windows Settings-Security Settings-Local Policies/Security Options
- Computer Configuration-Policies-Administrative Templates
Note: If you have few root CA in your domain (you can check it by opening pkiview.msc – Manage AD Containers), you should check which CA you are going to use. When you are requesting a certificate, open the details of your certificate template and click on Properties, then go to the Certification Authority tab where you can select the necessary CA.