Enabling Secure Sockets Layer (SSL) for the Network Device Enrollment Service (NDES)

In the default configuration, the Network Device Enrollment Service (NDES) only accepts unencrypted connections via HTTP. It is recommended that at least the NDES administration web page be configured for HTTP over TLS (HTTPS) to make capturing the network traffic more difficult. Instructions are provided below.

For a closer look at the need to use SSL, see the article "Should HTTPS be used for the Network Device Enrollment Service (NDES)? ".

The Network Device Enrollment Service (NDES) provides a way for devices that do not have an identity in Active Directory (for example, network devices such as routers, switches, printers, thin clients, or smartphones and tablets) to request certificates from a certification authority. For a more detailed description, see the article "Basics: Network Device Enrollment Service (NDES) ".

Requesting an SSL certificate

Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.

First, a web server certificate must be requested for the NDES server.

"Certificate Installation Results": certificate "ADCS Labor Web Server" from the Active Directory Enrollment Policy, STATUS: Succeeded

Certificate dialog, "General" tab: issued to ndes01.intra.adcslabor.de by "ADCS Labor Issuing CA 2", valid from 23.03.2020 to 23.03.2022

Binding the SSL certificate to the NDES server

After an SSL certificate has been requested for the NDES server, it must now be bound to the web server. To do this, the Internet Information Services (IIS) Manager is called up via the administrative tools.

Administrative Tools in the Control Panel: "Internet Information Services (IIS) Manager" selected

NDES is installed in the Default Web Site of the web server. Accordingly, the bindings must be edited here.

IIS Manager: context menu of "Default Web Site" with "Edit Bindings..."

If there is no SSL binding yet, a new one must be created.

Dialog "Site Bindings": existing binding http, port 80, "Add..." button marked yellow

The Default Web Site should answer all requests not defined otherwise, so the default setting regarding IP addresses and host names can be kept. Only the SSL certificate must be selected.

Dialog "Add Site Binding": type https, port 443, "SSL certificate" list with ndes01.intra.adcslabor.de (marked yellow)

Enforcing the use of SSL

Now the web server supports requests via HTTPS, but for NDES these are not enforced, i.e., requests can still be submitted via HTTP. If you want to enforce SSL specifically for NDES, go to the Default Web Site and click "View Applications" on the right side.

IIS Manager, "Default Web Site Home": the "View Applications" action marked yellow

NDES is split into two applications:

  • The interface for requesting the one-time passwords (mscep_admin)
  • The interface for requesting the certificates (mscep)

It is recommended to enforce HTTPS at least for the mscep_admin application to prevent the credentials from being captured. The mscep application can optionally also be configured to enforce HTTPS, but this is not absolutely necessary since encryption already takes place at the protocol level (see article "Should HTTPS be used for the Network Device Enrollment Service (NDES)? "). The procedure is identical and is therefore described only once for the mscep_admin application.

IIS Manager, "Applications": the applications /CertSrv/mscep and /CertSrv/mscep_admin

After double-clicking the application, select "SSL Settings".

IIS Manager, "/CertSrv/mscep_admin Home": the "SSL Settings" icon marked yellow

Here you enable the "Require SSL" checkbox.

IIS Manager, "SSL Settings": checkbox "Require SSL" selected (marked yellow)

Then click "Apply" on the right-hand side.

IIS Manager, "SSL Settings": "Require SSL" selected, the "Apply" action marked yellow

Now, if desired, the mscep application can be configured in the same way. First click once on a node outside the Default Web Site and then on the Default Web Site again, so that the applications are available for selection again.

NDES should now refuse to accept connections via HTTP without TLS.

Internet Explorer: "403 - Forbidden: Access is denied." when opening http://ndes01.intra.adcslabor.de/certsrv/mscep

Internet Explorer: https page /certsrv/mscep_admin/ of NDES with the "Website Identification" dialog: "This connection to the server is encrypted."