Setup cloud-based RADIUS for Entra Joined Devices using Cloud PKI

Cloud PKI enables you to deploy SCEP certificates to your devices using Microsoft Intune, completely from the cloud, without the need for complex Enterprise Certification Authorities and NDES servers within your on-premises environment. This is great, but what if I need to utilise Cloud PKI for my WPA2 (or 3) enterprise wireless authentication? Or even wired network authentication? For this, a RADIUS server is required, which Microsoft has no intention of bringing to the cloud, putting a potential blocker on your cloud transformation journey. 

In this post, I solve this problem by getting hands-on with the cloud-based RADIUS service RADIUSaaS, an infrastructure-less solution to providing traditional RADIUS authentication from the cloud. Specifically, I will take you through the process of setting up Cloud PKI and RADIUSaaS with Ubiquiti Wireless and give my honest opinion.

Solution summary

There are a few components to this solution, with the goal being that you can utilise device-based certificate authentication for wireless use using cloud-only infrastructure, with your devices being Entra joined and managed using Microsoft Intune. The following components create this solution:

  • Microsoft Intune (Device management)
  • Microsoft Cloud PKI (Intune PKI add-on)
  • RADIUSaaS (Cloud-based RADIUS service by glueckkanja AG)
  • A wireless product that supports WPA2 or WPA3 Enterprise

The diagram below highlights the solution design: 

RADIUS auth with Cloud PKI and Entra-only device
RADIUS auth with Cloud PKI and Entra-only device

The authentication flow for this solution is summarised in the below steps:

  1. The managed device is configured to trust your Certificate Authorities from Cloud PKI and RADIUSaaS. It also has a Wi-Fi configuration profile from Microsoft Intune assigned to it.
  2. Cloud PKI issues a client auth device certificate to the workstation using the Intune SCEP configuration profile.
  3. The workstation attempts to connect to the RADIUS-enabled Wireless SSID automatically when in range.
  4. An authentication request is then sent to RADIUSaaS.
  5. The device certificate is validated and checked against the public CRL of the Cloud PKI Issuing CA.
  6. RADIUSaaS evaluates any additional rules and processes the final authentication request if valid.

Total cost

One of the most significant challenges on your cloud journey is forecasting the licensing cost of potential solutions while ensuring their feasibility and scalability. To evaluate the cost of this solution, excluding the re-occurring cost of your wireless product, per-user fees can be summarised below:

  • Cloud PKI: $2 per user/per month
  • RADIUSaaS: 1.5 Euros per user/per month (up to 275 users, then it gradually drops the more users you have).

Examples of costs based on user counts:

  • 100 users: Roughly $360 per month
  • 200 users: Roughly $720 per month
  • 1000 users: Roughly $2780 per month ($2000 – Cloud PKI + $780 – RADIUSaaS).

*It is likely that with either solution, if you are over a certain user count you can discuss reduced licence costs or incentives with your account manager.

Setting up Cloud PKI

Thankfully, Microsoft have made configuring Cloud PKI in Microsoft Intune a breeze. All you need to do is create your Root CA and Issuing CA. Then, deploy two trusted certificate configuration profiles to your target devices that contain the public certificate for each CA. This ensures your devices trust the complete certificate chain. A separate SCEP configuration profile configuring the device to request certificates from the Cloud PKI will be configured later in this post.

Without re-inventing the wheel, check out this post: How to Setup Cloud PKI in Microsoft Intune Step by Step, which contains the steps to creating your Root CA, Issuing CA and the trusted certificate profiles. The whole process can also be done with Microsoft Graph PowerShell!

When you get to the point of issuing certificates to your devices, continue with this post.

Download the CA Certificates and CRL addresses

Once your CAs in Cloud PKI have been configured, you can prepare to configure the RADIUSaaS service by downloading the CA certificates and copying the CRL for each CA.

CRL stands for Certificate Revocation List. A CRL is a blacklist for certificates previously issued by a CA (Certificate Authority) but have been revoked and can no longer be used for authentication purposes. 

When a service attempts to validate a certificate, a validation request is sent to the CRL issuer, which will respond to said service with whether the certificate is good or revoked. A certificate could be revoked for a variety of reasons; Suspected compromise, Incorrect configuration, Falsely issued.

To obtain both the CA certificates and CRLs, follow the steps below for both the Root and Issuing CA:

1. Log in to intune.microsoft.com.

2. Select Tenant administration > Cloud PKI.

3. Click into each CA, then click the Download button for the certificate and copy the CRL URL.

CA Crl and Certificate options
CA Crl and Certificate options

Keep this information safe as you will use it in the next step.

Configuring RADIUSaaS

The next step is to configure your RADIUSaaS service. For this blog post, I navigated to radius-as-a-service.com and selected Try RADIUSaaS now from their website homepage.

The trial sign-up was not automatic. However, my trial account was activated the following day, and support from the RADIUSaaS team has been great since. You can also purchase an instance through the Azure marketplace, and the team walks you through that process in this video.

After speaking with their team, behind the scenes, the RADIUSaaS service runs on a redundant Kubernetes cluster that is fully managed and maintained by RADIUSaaS. They can also offer additional and/or custom redundancy options by speaking to them directly.

Create a new proxy

As my wireless access point does not support RadSec, I will use the traditional RADIUS protocol running over UDP for this setup. To do this, I need to set up a proxy within the RADIUSaaS service to accept authentication packets.

RADIUSaaS is primarily a RadSec service. Behind the scenes, any authentication requests are automatically converted to RadSec to support the backend. If a wireless solution does not support RadSec, RADIUSaaS supports using the traditional RADIUS protocol via a proxy.

From within the RADIUSaaS portal, expand Settings, select Proxy Settings and then click Add.

Create a new RADIUS proxy
Create a new RADIUS proxy

When prompted, choose a proxy location based on your geographical region, then click Create.

Create proxy
Create proxy

After a few moments, your proxy should be successfully created. Ensure you document the IP address provided for your proxy.

New RADIUS proxy
New RADIUS proxy

Upload the Cloud PKI certificates to RADIUSaaS

The next step is to ensure that the RADIUSaaS service trusts our Cloud PKI CAs and also knows where to find the certificate revocation list (CRL) for each CA.

To do this, expand Settings and select Trusted Certificates. The click Add.

Add a trusted certificate
Add a trusted certificate

From the drop-down box, select Upload and PEM or DER file.

Upload a PEM or DER file
Upload a PEM or DER file

In the Add Trusted Certificate popout window, select Client authentication, then upload the Root CA certificate you downloaded in the earlier step. 

Then, under Verify, select the CRL verification method.

Cloud PKI currently does not support OCSP verification method.

Lastly, select PEM as the CRL encoding method and enter the CRL URL you copied earlier from the corresponding CA.

Cloud PKI encodes the CRL using PEM encoding to create an X.509 certificate.

Trusted certificate settings for Cloud PKI
Trusted certificate settings for Cloud PKI

Now do the same for your Cloud PKI Issuing CA. Once you are finished, both trusted certificates should be listed on the Trusted Certificates page within your RADIUSaaS portal.

Cloud PKI trusted certificates list
Cloud PKI trusted certificates list

Deploy the RADIUSaaS trusted certificate

As well as the two trusted certificate profiles you should already have deployed to your end user devices through Intune for the Cloud PKI CAs, you will need to deploy a third trusted certificate profile for the auto-created RADIUSaaS CA for your instance. This is required as a TLS tunnel is established between your client devices and RADIUSaaS at the point of authentication to the wireless network.

Without deploying the RADIUSaaS certificate to your end-user devices, they may receive the following error when attempting to connect to the wireless network.

Continue connecting
Continue connecting

While it will not completely prevent access to the wireless network, it will add further confusion and the experience will not be seemless. 

RADIUSaaS does support utilising your own CA certificate for this step, however, as your Cloud PKI certificate chain and private key cannot be exported, Cloud PKI is not supported here.

Download the RADIUSaaS trusted certificate

To download the RADIUSaaS trusted certificate, follow the steps below.

1. Log in to your RADIUSaaS portal and expand Settings, then select Server Settings and click the Download icon next to the Customer-CA provided by RADIUSaaS.

Download the RADIUSaaS certificate
Download the RADIUSaaS certificate

2. In the pop-out window, ensure you download the certificate which is highlighted in green. This contains the full certificate chain and without it, you will experience the same error highlighted above.

Download the RADIUSaas certificate chain
Download the RADIUSaas certificate chain

Deploy the RADIUSaaS trusted certificate

Now you have the correct certificate, it needs to be deployed to the trusted root certificate store on your end-user devices using Intune. Follow the steps below to deploy the certificate:

1. Log in to intune.microsoft.com.

2. Select Devices > Configuration > Create > New policy.

3. On the Create a profile page, select Windows 10 and later, Templates and then select the Trusted certificate template.

4. Provide a name for your policy and click Next.

5. On the Certificate settings page, select your RADIUSaaS certificate and select the Computer certificate store – root.

Deploy to the root certificate store
Deploy to the root certificate store

6. Continue through the policy wizard ensuring your assign the policy to your target devices.

Validating the deployment

Once your device has successfully synced with Microsoft Intune, the RADIUSaaS certificate should now be stored in the computer’s trusted root certificate store. Verify this by following these steps:

1. In your Windows search bar, type certlm.msc and click enter. This will launch the Manage computer certificates console.

2. Expand Trusted Root Certification Authorities and then click Certificates.

RADIUSaaS cert deployed
RADIUSaaS cert deployed

As per the above image, you should see your certificate listed. If you don’t, ensure your computer is assigned to the configuration profile created in the previous step and manually run a sync with Intune.

Configure RADIUS authentication for Ubiquiti Wireless

If you are not using Ubiquiti wireless access points like me, you must ensure that your chosen wireless product supports WPA Enterprise or RADIUS authentication. Currently, I have a single Ubiquity wireless access point connected to the official Unify cloud gateway solution. Follow the steps below to configure RADIUS authentication within your Unify management portal, otherwise review the documentation from your wireless vendor.

Create a new RADIUS profile

The first step is to create a new RADIUS profile. Select the Settings cog in your Unify management portal, then click Profiles > RADIUS > Create new.

Create a new RADIUS profile
Create a new RADIUS profile

Enter the information highlighted in the image below on the RADIUS profile settings page. The accounting server settings are optional, however I recommend you add the accounting server information to ensure addition activity logs from your access points are collected by the RADIUS server.

RADIUS Profile settings
RADIUS Profile settings

The IP address, port and shared secret for the RADIUS authentication and account server can be found in the RADIUSaaS portal under Settings > Server Settings

RADIUSaaS server information
RADIUSaaS server information

Create a new Wireless profile

Now, you can create your Wireless profile with your newly created RADIUS settings. Select the Settings cog in your Unify management portal, then click WiFi > Create new.

Create a new wireless profile
Create a new wireless profile

Define the name of your profile (which will be the name of your SSID) and select the APs which will broadcast this SSID. For Advanced options, set it to manual, then modify the following settings:

  • Security Protocol: WPA3 Enterprise
  • RADIUS Profile: %Your RADIUS profile%
All other settings can be left as default, then click Add WiFi Network.
New wireless SSID
New wireless SSID

At this point, the wireless SSID will be visible to your clients.

Deploy the device-based SCEP certificate profile

The Cloud PKI service in Microsoft Intune supports the Simple Certificate Enrollment Protocol (SCEP) for requesting certificates from the Issuing CA for devices managed with Intune. It does this using the Microsoft Cloud PKI SCEP service, which is part of the Microsoft Cloud PKI service as a whole. Further detail on the process is highlighted in this image below.

Ref: https://learn.microsoft.com/en-us/mem/intune/protect/microsoft-cloud-pki-overview#architecture

To ensure our devices can request certificates from the Cloud PKI SCEP service, we must first deploy an SCEP Profile to our devices through Intune. Follow the steps below to deploy a SCEP certificate profile.

1. Log in to intune.microsoft.com.

2. Select Devices > Configuration > Create > New policy.

3. Select Windows 10 and later > Templates, then select the SCEP certificate template.

Deploy SCEP certificate profile
Deploy SCEP certificate profile

4. Define a name for your SCEP certificate profile, then click Next.

5. On the Configuration settings page, set the following settings:

  • Certificate type: Device
  • Subject name format: CN={{AAD_Device_ID}} – (Default)
  • Certificate validity period: 6 months
  • Key storage provider (KSP): Enroll to Trusted Platform Module (TPM) KSP if present, otherwise Software KSP
  • Key usage: select all
  • Key size (bits): 2048
  • Hash algorithm: SHA-2
  • Root Certificate: The Root CA of your Intune Cloud PKI.
  • Extended key usage: Client Authentication
     
  • Renewal threshold (%): 20% (default)
  • SCEP Server URLs: Copy the SCEP URI from the Issuing CA properties page.

The SCEP URI on the Issuing CA properties page will display the following variable in the address {{CloudPKIFQDN}}. This is fine and should not be changed. The URL will be dynamically updated when the certificate is issued to the device.

You can also check your settings against mine below:

SCEP profile settings
SCEP profile settings

When you a finished on this screen, click Next and ensure you assign the profile to your target group of devices. For simplicity, this will likely be the same group of devices who you have issued your Root and Issuing CAs too.

Validate the certificate deployment

Like the previous steps, you should validate that your device certificate has been successfully deployed to your devices and that there is a complete chain of trust. Without it, your connection to the wireless SSID will be rejected by the RADIUSaaS service.

To do this follow the steps below:

1. In your Windows search bar, type certlm.msc and click enter. This will launch the Manage computer certificates console.

2. Expand Personal > Certificates, then double-click on the issued certificate.

3. On the Certification path tab, ensure the whole chain is visible and the Certificate status is OK.

SCEP certificate deployed
SCEP certificate deployed

If your certificate has not been issued, ensure the SCEP profile is applied to the device, then manually run a sync from the Intune portal and allow it some time.

Deploy the Wireless Profile

The final item to configure is the wireless profile using Microsoft Intune. This will ensure the SSID profile and relevant settings are automatically deployed to the device to ensure a smooth experience for the end user. It will also ensure that as soon as the device is in range of the corporate wireless (and not already connected through a wire), it will automatically connect and provide network access.

Follow the steps below to deploy the RADIUS wireless profile using Intune:

1. Log in to intune.microsoft.com.

2. Select Devices > Configuration > Create > New policy.

3. Choose Windows 10 and later > Templates, then select the Wi-Fi template and click Create.

4. Give your policy a meaningful name that includes your SSID and click Next.

5. On the Configuration settings page, set the Wi-Fi type to Enterprise, then configure the following settings:

  • Wi-Fi name (SSID): Name of your SSID
  • Connection name: Name of your SSID
  • Connect automatically when in range: Yes
  • AuthenticationMode: Machine
  • EAP Type: EAP-TLS
  • Certificate server names: Add the SAN and Subject name of your RADIUS Root CA. This can be obtained from the RADIUS portal, under Server Settings.

If you are using the RADIUSaaS-supplied CA (the only supported method for Cloud PKI), the subject name and SAN will be the same. In this case, only one entry on your wireless profile is needed.

RADIUSaas Cert SAN name
RADIUSaas Cert SAN name
  • Root certificates for server validation: Add the RADIUSaaS certificate profile (not Cloud PKI)
  • Authentication method: SCEP certificate
  • Client certificate for client authentication (Identity certificate): Select the SCEP certificate profile you created

Refer to my settings below for confirmation:

WiFi profile settings for Intune
WiFi profile settings for Intune

6. Lastly, assign the Wi-Fi profile to your target group of devices.

Testing wireless access

Now the configuration is done, it is time to test our wireless connectivity. As you can see from the below screenshot, our certificate-base Office Wireless SSID is successfully connected.

RADIUS wireless connected
RADIUS wireless connected

Further detail on the connectivity methods used for this connection can be viewed using the Netsh WLAN report built into Windows. Simply open PowerShell as a local admin and run the following command:

netsh wlan show wlanreport

A report will be generated and saved at C:\ProgramData\Microsoft\Windows\WlanReport\wlan-report-latest.html. Open the report file and you will see detailed logs on the events of your wireless adapter.

Successful Wireless Authentication
Successful Wireless Authentication

EAP method type 13 is related to the EAP-TLS Authentication Protocol supporting certificate-based authentication, detailed in RFC 5216.

Revoking the certificate and CRL support

Certificates can be easily revoked using the Intune portal to ensure that the device’s network access is quickly blocked when needed. To revoke a certificate using the Intune portal, follow the steps below:

1. Log in to intune.microsoft.com.

2. Select Tenant administration > Cloud PKI.

3. Select your issuing CA and click View all certificates.

View all certificates
View all certificates

4. Select your target certificate and click Revoke.

Revoke the certificate
Revoke the certificate

After around 1 minute since revoking my issued certificate, I could not longer connect to the wireless network.

Unable to connect to this network
Unable to connect to this network

RADIUSaaS Logs

Earlier in this blog, we configured the CRL URL for our Cloud PKI issuing CA in the RADIUSaaS platform. This URL contains a list of all revoked certificates from our Cloud PKI CA. RADIUSaaS will verify the certificate against this CRL and decide whether to authorise the connection based on its validity. In the event the certificate present on the user’s devices has been revoked, RADIUSaaS will capture a rejection log. 

The whole process is fairly instantaneous from the RADIUS service, and any delays will likely be due to the speed of service provided by Microsoft’s Graph API.

To view these logs, select Logs from the Menu in the RADIUSaaS portal, then expand the log relating to your rejection event. The log can then be viewed in table or JSON format.

RADIUSaaS auth rejected
RADIUSaaS auth rejected

Exporting logs to Log Analytics

It wouldn’t be any help, especially for a service provider, if these logs could not be exported and centralised for enhanced visibility. Thankfully, RADIUSaaS includes a Log Exporter function that enables you to export these logs continuously to a Log Analytics Workspace in Azure. This allows teams to ingest logs into the SIEM solution of their choice to monitor events from the following:

  • Authorization System
  • Proxy Service
  • Rules Engine

Rules can then be configured within your SIEM solutions to highlight continuous or malicious log events and to launch an investigatory response.

To start, simply open the Log Exporter from the RADIUSaaS portal, then click Add > Log Analytics.

Log analytics
Log analytics

Define the name of your Log Exporter, then enable the types of logs you wish to export. You should also obtain the Customer ID and Shared Key from your Log Analytics Workspace in the Azure Portal

Export to LAW
Export to LAW

Your Customer ID and Shared Key can be obtained from the Azure Portal. Navigate to your Log Analytics Workspace, select Agents and copy the required values.

Customer ID and Key
Customer ID and Key

Daniel Bradley

Daniel Bradley is a UK-based technical architect and Microsoft MVP in Security. He specialises in Microsoft Entra, Intune, and Microsoft Graph PowerShell and is the author of Microsoft Graph PowerShell for Administrators. He writes and edits Our Cloud Network using experience gained from working with Microsoft cloud environments.

Leave a Reply