Enable HTTPS Support for Microsoft Connected Cache for Enterprise – Part 2

With the GA of the Microsoft Connected Cache for Enterprise it now also supports HTTPS Content, which allows it to also support Teams and future Intune Content which will move from HTTP to HTTPs. In this part, I will show you how you can enable HTTPS support for your Connected Cache Nodes. It is not enabled by default since it requires you to provide a TLS certificate for your nodes.

Generate CSR on our Linux Node

Let’s start with creating the CSR on our Linux Node, to do that, we need to move into our scripts folder and first mark the script generateCsr.sh as executable:

To generate our CSR, we just need to call this script with our required parameters. Since the exact options will vary depending on your environment, I highly suggest to check out the official docs for available options: mcc-ent-https-linux
For my environment, I go with FQDN and IP Address, since I still have a few places where I call the MCC via IP only (e.g. DHCP Option 235 in my case)

The CSR file will be written to your cache location into a folder certs, you can copy it from there and get it signed by your CA.

Generate CSR on our Windows Node

Let’s do the same for our Windows Node. We will start with navigating to the scripts folder by using that command:

cd (deliveryoptimization-cli mcc-get-scripts-path)

For the exact parameters required for the CSR generation, I again highly suggest to check out the official docs: mcc-ent-https-windows
I will go with this settings for my environment:

Sign the CSR

Now that we have the CSRs ready, we can let them sign from our CA. In my case, I will use my Enterprise PKI for that:

Import Certificate to Linux Node

Now that we have our signed certificate, we can import it to our node. To do that we need to copy our signed certificate next to the csr:

Next, we move back to our scripts folder and mark the importCsr.sh shell script as executable:

And start the actual import process:

Import Certificate to Windows Node

First thing on the Windows Node, is to copy the signed certificate to the folder where you found the csr before:

Next, we go back to our elevated PowerShell windows, and move to the scripts folder:

And run the importCert.ps1 script:

Next, we need to configure the port forwarding and firewall to allow access to port 443 on the Windows Node:

$ipFilePath = Join-Path ([System.Environment]::GetEnvironmentVariable("MCC_INSTALLATION_FOLDER", "Machine")) "wslIp.txt"
$ipAddress = (Get-Content $ipFilePath | Select-Object -First 1).Trim()
netsh interface portproxy add v4tov4 listenport=443 listenaddress=0.0.0.0 connectport=443 connectaddress=$ipAddress

[void](New-NetFirewallRule -DisplayName "WSL2 Port Bridge (HTTPS)" -Direction Inbound -Action Allow -Protocol TCP -LocalPort "443")
[void](New-NetFirewallRule -DisplayName "WSL2 Port Bridge (HTTPS)" -Direction Outbound -Action Allow -Protocol TCP -LocalPort "443")

Test HTTPS Connection from a client

Now that we have our cache nodes ready, we should test if it actually works. We can do that using curl from any of our clients:

curl.exe -v -o NUL "https://[insert-connection-option]/ee344de8-d177-4720-86c1-a076581766f9/070a8fd4-79a7-42c8-b7c8-9883253bb01a/c7b1b825-88b2-4e66-9b15-ff5fe0374bc6.appxbundle.bin" --include -H "host:swda01-mscdn.manage.microsoft.com"

If everything worked, we can see the file successfully downloaded:

If it didn’t work, it could look something like this:

Conclusion

Having HTTPS support for the Microsoft Connected Cache is a nice and long awaited feature to make sure it will work for all current and future requirements, especially since teams already switched to HTTPS and Intune is currently working on the transition to HTTPS CDN downloads.


Posted

in

by

Tags:

Comments

2 responses to “Enable HTTPS Support for Microsoft Connected Cache for Enterprise – Part 2”

  1. Jason Berry

    Hi Mike. On your Linux node, could you kindly list the file permissions and ownership of /nginx/cache1/certs using the following commands.

    Enter the container from the host:
    $ sudo docker exec -it MCC /bin/bash

    Then list files/folders recursively:
    $ ls -la -R /nginx/cache1/certs/

    I’m attempting to use Posh-ACME to automate a Let’s Encrypt wildcard for an mcc subdomain, but running into permission issues during the cert import.

    Thanks!

    1. Hi, sure I got this output on my MCC Node:

      mcc@857e6a017179:/$ ls -la -R /nginx/cache1/certs
      /nginx/cache1/certs:
      total 152
      drwxrwxrwx 4 mcc mcc 4096 Jul 24 20:01 .
      drwxrwxrwx 8 root root 139264 Jul 24 22:00 ..
      drwxrwxrwx 2 mcc mcc 4096 Aug 6 08:11 certs
      drwxr-xr-x 2 mcc mcc 4096 Aug 6 08:12 logs

      /nginx/cache1/certs/certs:
      total 16
      drwxrwxrwx 2 mcc mcc 4096 Aug 6 08:11 .
      drwxrwxrwx 4 mcc mcc 4096 Jul 24 20:01 ..
      -rw-r–r– 1 10915315 users 2812 Aug 6 08:03 TRR-01068.crt
      -rw-r–r– 1 mcc mcc 1793 Aug 5 20:09 TRR-01068_20250805_220927.csr

      /nginx/cache1/certs/logs:
      total 204
      drwxr-xr-x 2 mcc mcc 4096 Aug 6 08:12 .
      drwxrwxrwx 4 mcc mcc 4096 Jul 24 20:01 ..
      -rwxr-xr-x 1 mcc mcc 11116 Nov 29 14:38 CertificateManager.log
      -rwxr-xr-x 1 mcc mcc 19073 Aug 5 20:09 GenerateCsr.log
      -rwxrwxrwx 1 root root 11520 Jul 24 20:01 GenerateCsr_20250724_220103.log
      -rwxrwxrwx 1 root root 11737 Aug 5 20:09 GenerateCsr_20250805_220927.log
      -rw-r–r– 1 mcc mcc 106519 Nov 29 14:38 ImportCert.log
      -rw-r–r– 1 10915315 users 3550 Aug 6 08:11 ImportCert_20250806_101107.log
      -rw-r–r– 1 root root 4230 Aug 6 08:12 ImportCert_20250806_101140.log
      -rw-r–r– 1 10915315 users 305 Aug 6 08:11 ImportCert_temp.log
      -rw-r–r– 1 mcc mcc 0 Aug 6 08:11 TlsVerification.log
      -rwxr-xr-x 1 mcc mcc 241 Aug 5 20:09 csr_response.txt
      -rw-r–r– 1 mcc mcc 243 Aug 6 08:12 response.txt
      -rw-r–r– 1 mcc mcc 29 Nov 29 14:38 verification_success_TRR-01068_TRR-01068_20250805_220927
      mcc@857e6a017179:/$

Leave a Reply

Your email address will not be published. Required fields are marked *