Microsoft Entra Permissions Management (CloudKnox) Executor¶
Category: Identity and Access
Script: cloudknox.py
Integration: REST API (Microsoft Graph, OAuth2)
Faraday Plugin: Raw JSON
Website: https://learn.microsoft.com/en-us/entra/permissions-management/
Description¶
Imports cloud authorization systems (AWS accounts, Azure subscriptions and GCP projects) and their permission risk findings from Microsoft Entra Permissions Management (formerly CloudKnox) into Faraday.
Prerequisites¶
- A Microsoft Entra Permissions Management tenant
- An Azure AD app registration (service principal) with the
PermissionsManagement.Read.Allapplication permission and admin consent - The tenant ID, client ID and client secret of that app registration
- Python
requestsmodule available to the agent
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
AZURE_TENANT_ID |
Yes | Azure AD tenant (directory) ID |
AZURE_CLIENT_ID |
Yes | Application (client) ID of the app registration |
AZURE_CLIENT_SECRET |
Yes | Client secret of the app registration |
CK_PAGES |
No | Maximum number of pages to read from each list (default: 5, maximum: 50) |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
CK_AUTHSYSTEM_ID |
string | No | ID of a single authorization system (AWS account, Azure subscription or GCP project) to import. Leave blank to import all of them. |
CK_RISK_LEVEL |
string | No | Only import findings with exactly this risk level: low, medium, high or critical. Leave blank for all levels. Unrecognized values are ignored. |
YAML Configuration Example¶
executors:
cloudknox:
repo_executor: cloudknox.py
max_size: 65536
varenvs:
AZURE_TENANT_ID: "<tenant_id>"
AZURE_CLIENT_ID: "<client_id>"
AZURE_CLIENT_SECRET: "<client_secret>"
params:
CK_AUTHSYSTEM_ID:
mandatory: false
type: string
base: string
CK_RISK_LEVEL:
mandatory: false
type: string
base: string
How It Works¶
- Requests a token from
https://login.microsoftonline.com/{AZURE_TENANT_ID}/oauth2/v2.0/tokenusing the client credentials flow with the Microsoft Graph scope - Reads authorization systems from
GET https://graph.microsoft.com/beta/permissionManagement/authorizationSystems, following@odata.nextLink - Reads findings from
.../permissionManagement/findings(or from.../authorizationSystems/{id}/findingswhenCK_AUTHSYSTEM_IDis set), filtered byCK_RISK_LEVEL - Creates a host and an
[IDENTITY]inventory vulnerability (severityinfo) for each authorization system - Creates a host and a vulnerability for each finding, with severity taken from its
riskLevel(low,medium,high,critical)
Notes¶
- Authorization systems and findings are not tied to IP addresses, so every host uses IP
0.0.0.0. - The run stops if the credentials are missing or the token request fails.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.