ClearPass_TechNote _Extensions - Microsoft_Intune Integration_v3.0
ClearPass_TechNote _Extensions - Microsoft_Intune Integration_v3.0
TechNote
ClearPass and
Microsoft Intune
Integration TechNote
Title Line 3
ClearPass TechNote
Change Log
Version Date Modified By Comments
0.1 & 0.2 & 0.3 June 2016 Danny Jump Draft checked by D Wilson, M Adjali and Microsoft
1.0 Oct 2016 Danny Jump Initial Restricted-Access Published Version
1.1 Dec 2016 Danny Jump Initial GA Published Version
1.2 May 2017 Josh Santomieri Updates for new extension version (3.0.0)
2.0 May 2017 Danny Jump Minor updates from TAC/ERT and new TechNote Template
Copyright
© Copyright 2017 Hewlett Packard Enterprise Development LP.
Please specify the product and version for which you are requesting source code. You may also request a
copy of this source code free of charge at [email protected].
Contents
Introduction .....................................................................................................................................................................5
What’s new in this ClearPass Extension V3..................................................................................................................5
Software Requirements .................................................................................................................................................5
Installation and Deployment Guide..............................................................................................................................6
Pictorial view of the Integration ....................................................................................................................................6
Setup of API Client .......................................................................................................................................................9
Generate an Access Token ...................................................................................................................................... 10
Go to the Extension APIs .......................................................................................................................................... 10
Install the extension .................................................................................................................................................. 12
Wait for Extension to Install ...................................................................................................................................... 13
Collecting Information from Microsoft to Configure Intune .................................................................................. 15
Use the Intune Data to Configure the Extension ..................................................................................................... 22
Configure the extension ............................................................................................................................................ 22
Starting the extension ............................................................................................................................................... 24
Verify the extension is running ................................................................................................................................. 25
Troubleshooting the extension ................................................................................................................................. 25
Configuring ClearPass Policy Manager...................................................................................................................... 26
Add HTTP Authorization Source .............................................................................................................................. 26
Using data from INTUNE in a ClearPass Enforcement Policy ................................................................................. 28
Appendix A – Authorization source XML configuration file .................................................................................... 29
Appendix B – Additional diagnostics / support ........................................................................................................ 30
Extension Service ...................................................................................................................................................... 30
Extension Logs/Debugging ....................................................................................................................................... 30
Accessing extension logs using ‘Collect Logs’ ........................................................................................................ 33
Monitoring authorization performance ..................................................................................................................... 34
ClearPass authorization throughput guidelines ....................................................................................................... 34
Installation of the Microsoft Intune ClearPass Extension is performed via the REST API interface.
ClearPass REST APIs were introduced in ClearPass 6.5.0 and have consistently been enhanced,
access to the APIs is through the following URL https://<Your-ClearPass-Server>/api-docs.
Prior to accessing the ClearPass REST APIs, you need to complete some pre-configuration steps,
which is covered in the Installation, Configuration and Setup section below.
Software Requirements
The minimum software version required for ClearPass is 6.6.0. At the time of writing, ClearPass
6.6.2 is the latest available and recommended release. ClearPass runs on a hardware appliance
with pre-installed software or as a Virtual Machine under the following hypervisors.
• VMware ESXi 5.0, 5.1, 5.5, 6.0, or higher
• Microsoft Hyper-V Server 2012 R2
• Hyper-V on Microsoft Windows Server 2012 R2
Hypervisors that run on a client computer such as VMware Player are not supported.
Next go down to ‘Platform’ and change ‘No Access’ to ‘Custom’ and then for the ‘Extension’ options shown
below ensure the configuration matches, then scroll to the bottom of the page and click on save.
The profile created above will be used in the next step as the Operator profile when generating the OAUTH2
API Client.
Click on ‘Create API Client’ to save and create the API Client.
The store ID of the extension d8d419a8-6a1a-4d7e-b564-81d11a75105a is unique to each released version. As the
underlying feature and functions are enhanced, the store ID may change as the version of the extension increments.
This should return the details for the Microsoft Intune Extension, and confirm that your ClearPass
has access to the extension.
Figure 10: Details on the extension
This will return an extension ID (this is different from the store ID). Make a copy of this ID as it will be required later.
Notice in the extension configuration above, it is set to install “stopped” and not to start, below
the state of the extension as “preparing”, this shows it is downloading, installing and deploying.
The details of the extension will be displayed (could be "downloading", etc.). Eventually the state
will change to either "stopped" or "failed". In our case we can see the installation is Created and
stopped.
In order to complete the integration, you need to collect multiple pieces of information from
Intune and the Azure platform that are required to allow us to complete the extension
configuration. The goal is to collect information to complete the highlighted attributes below in
red:
{
"tokenEndpoint": "<tokenEndpoint>",
"tenantId": "<tenantId>",
"clientId": "<clientId>",
"clientSecret": "<clientSecret>",
"resourceUri": "https://api.manage.Microsoft.com/",
"apiVersion": "1.1",
"verifySSLCerts": true,
"logLevel": "INFO"
}
To start, open up your favorite text editor, and copy and paste the above text block into it. You’ll
be editing several lines for this JSON payload.
The first piece of information you need to update is the “tokenEndpoint”. This is the URL that
ClearPass uses to create OAuth2 Tokens that provide access to Azure Active Directory and Graph
services.
To get the “tokenEndpoint” value, first log into the Azure Portal. Point your browser to
https://portal.azure.com. Log in using your Intune Tenant Admin account. We assume here you
have already identified and configured at least one of your Intune accounts with Administrator
rights. You can see below where we’ve logged in with a “onmicrosoft.com” account.
You may have to accept permissions for the account to use the API Explorer features.
Once logged in, open Azure Active Directory and select “App Registrations”.
From the list of endpoints, copy the OAUTH 2.0 TOKEN ENDPOINT value. This is the value you will
use as the “tokenEndpoint” in the configuration.
Paste the copied endpoint URL in your ID string into the tokenEndpoint configuration item.
Next, we need the “tenantId” value. To get this, simply copy out the ID portion of the OAuth 2.0
Endpoint. For example, our token endpoint is,
https://login.windows.net/9b84bb69-c703-4cac-8db3-20414b0bb8bc/oauth2/token
From this URL, the highlighted portion is your Tenant ID. Copy this value into the tenantId
setting of your configuration.
Once your application has created, select it from the “App registration” list to view the
application properties and configure the application. The important areas are highlighted below.
Copy the Application ID: The Application ID is the value required for the clientId configuration in
the extension. You can copy and paste that value to your extension configuration now.
After clicking “select”, you must enable access to “Get device state and compliance
information from Microsoft Intune” then click “Select” followed by “Done”. Your permissions
will now be added.
After setting permissions, navigate back to the Application settings and select “Keys”. In the Keys
settings, enter a key description. Use something appropriate to identify the keys for Intune. Then
select the duration, we recommend “Never Expires” otherwise you will be forced to update the
extension configuration when the key expires.
After entering your desired information, click “Save”. This will save your settings and generate the
clientSecret. Copy the “value” to the clientSecret setting in the Intune Extension configuration.
Remember to save these keys, as the warning above shows, once you exit this screen you are unable to see the keys
again.
The apiVersion above refers to the Microsoft Intune API version, not the ClearPass Extension version.
This is an example of the base config after the extension is insalled. The process just completed
in collecting the TENEANT_ID, CLIENT_ID etc. will be used to set this configuration.
Notice that debugging is currently set to INFO, this should only be changed if you or Aruba TAC
need to DEBUG the extension. In the extension we verify the SSL-certificate presented.
To set the actual configuration under InstanceConfig > PUT /extension/instance/{id}/config,
copy and paste your run-time extension ID and configuration collected in the previous steps to
the PUT method and Click ‘Try it out!’.
If changing the configuration, you should restart the extension via InstanceRestart > POST
/extension/instance/{id}/restart
Below is the Response to the PUT. A successful result is indicated by response code of 204.
It’s important to ensure you format the HTTP body correctly when configuring the Microsoft
Intune ClearPass Extension. Below is an example of the parameters that are needed to complete
the extension configuration. As covered previous ensure you have the correct formatting of the
JSON payload.
Figure 28: Example of JSON formatted extension configuration payload
{
"tokenEndpoint": "https://login.windows.net/47f09275-5bc0-4807-8aae-f35cb0341329/oauth2/token",
"tenantId": "47f09275-5bc0-4807-8aae-f35cb0341329",
"clientId": "ed706345-b83f-4af5-9c96-84622b2799f8",
"clientSecret": "Q92ye91w5EGCe/cHK6fOyLu1pHI0D7ZRTn92MV0w1SI=",
"resourceUri": "https://api.manage.microsoft.com/",
"apiVersion": "1.1”,
"verifySSLCerts": true,
"logLevel": "INFO"
}
The "internal_ip_address" of the extension will be set by the extension service. This will be used for configuring the
authorization source later in Policy Manager.
Click on Next. This will advance to the Primary Tab provide the connection details.
The Base URL IP address is what you captured in Figure31 above.
Its mandated that a Login Username/Password is entered, but is not used, this it can be anything.
Figure 35: Adding HTTP authorization source query string and returned field definitions
Once the HTTP authorization source is defined you can use the returned attributes in your policy
processing. Below we cover options on how to use the results from the authorization query in an
enforcement policy.
Figure 36: Example of an Enforcement Policy utilizing attributes returned from Intune
Different companies will have different enforcement profiles and policies. The key take away here
is that we are using the authorization attributes received from Intune to drive the policy engine
into making and taking different enforcement actions for the device as they authenticate on the
network.
your_IP_ADDRESS_goes_here
USERNAME_can_be_anything_goes_here
PASSWORD_can_be_anything_goes_here
To check on the state and make changes to the service navigate to Administration > Server
Manager > Server Configuration [select your ClearPass node] > Service Control. You can also
start/stop the extension service from here. By default, this service is automatically started.
Figure 37: Checking on extension service and how to start/stop the service
Extension Logs/Debugging
If you have a need to access the logs from inside the extension, you can turn on log collection
from the API Explorer. Referencing the configuration we previously used, adjust the "logLevel" to
"DEBUG". Post this using the API Explorer as shown below.
{
"tokenEndpoint": "https://login.windows-ppe.net/47f09275-5bc0-4807-8aae-f35cb0341329/oauth2/token",
"tenantId": "47f09275-5bc0-4807-8aae-fffffffffffffff"
"clientId": "ed706345-b83f-4af5-9c96-abcabcabc",
"clientSecret": "Q92ye91w5EGCe/cHK6fOyLu1pHI0D7ZRTnkdidy^^%$d",
"resourceUri": "https://api.manage.microsoft.com/",
"apiVersion":"1.1",
"verifySSLCerts": true,
"logLevel": "DEBUG"
}
Once you have configured the extension to capture logs, there are two methods to access them.
The first is directly through the API Explore and the second using the “Collect Logs” function.
Figure 39: Accessing Logs in an extension from API Explorer UI
You can also turn on timestamps by flipping the timestamps option and optionally limit the number of logs returned to
say the last 100 rather than ‘all’ logs but specifying a number in the tail parameter. By default, all logs are returned with
no timestamps.
Figure 40: An example of the logs from the extension in the API Explorer UI
Remember after collecting logs or turning off DEBUG, please ensure you return it back to the INFO level. DEBUG mode
should only be enable under guidance from Aruba TAC.