Connect an Azure AKS Cluster
Connect an Azure AKS Cluster in Tenable One Cloud Exposure to get full visibility and risk assessment for all cloud identities and resources associated with the cluster, including information about permissions, subscription usage, and security configurations.
Until you complete the integration, objects and configurations associated with the cluster will not be analyzed or available for investigation in Tenable. A sync status is displayed for each Kubernetes cluster in the relevant inventory view, indicating whether Tenable can connect to the Kubernetes API, and helping you troubleshoot potential connection issues.
Requirements
For each cluster that you want to monitor, follow the steps described below to:
-
Grant Tenable permissions in one of the following ways, depending on which authentication/authorization method you use to configure your clusters:
- Microsoft Entra ID with Azure RBAC:
- Assign built-in role bindings to the Cloud Exposure App
- Add a custom Tenable role to your cluster/subscription
- Microsoft Entra ID with Kubernetes RBAC:
- Create a ClusterRole and ClusterRoleBinding for Tenable
- Local account authentication. This method is only supported using the Connect Cluster via Helm Chart.
Important: If the Tenable role doesn't have permissions to access the cluster connect the cluster using Helm charts instead. Azure requires identity-based configuration, and in some cases this configuration isn't supported by the traditional cloud-based integration. For example, if you use local authentication in Azure. - Microsoft Entra ID with Azure RBAC:
- Allow Network Access to Tenable.
- If the cluster control plane is not publicly accessible, Connect a Cluster via Helm Chart instead. For example, in the case of a private cluster.
Grant Tenable Permissions to the Cluster: Microsoft Entra ID with Azure RBAC
If you use Azure RBAC for your Kubernetes cluster authorization, you will need to do the following to grant Tenable permissions to the cluster:
-
Assign built-in Kubernetes-related role bindings to Tenable.
These roles are assigned when you Connect an Azure Subscription to Tenable, but, depending on if/when you connected your subscription/s, may not have been assigned yet.
-
The role bindings mentioned in the preceding bullet are limited in scope, and do not provide IAM visibility within Cloud Exposure. To gain full functionality, you will also need to add a custom role, to grant Tenable additional, read-only access permissions to see most objects in your namespace.
Assign Built-in Role Bindings to Tenable
- If you already connected the Azure subscription where the cluster resides to Tenable, and just need to add Kubernetes-related permissions to a cluster, follow the procedure below.
- If you did not yet connect the Azure subscription where the cluster resides, follow the procedure documented in Connect an Azure Subscription.
To assign role bindings:
- In the Azure portal, navigate to the Subscriptions page, and then click on the relevant subscription.
- Click Access control (IAM), and then click Add role assignment.
-
On the Add role assignment page, search for and select one of the following roles, and then click Next:
Note: You can only add one role at a time, so you will need to perform these steps twice, once for each role.- Azure Kubernetes Service Cluster User Role
- Azure Kubernetes Service RBAC Reader
- Under Assign access to, leave the default selection as User, group, or service principal.
- Under Members, click +Select members.
- Search for and select Cloud Exposure Connector App, and then click Select.
- Click Next, review the new role, and then click Review + assign.
- Repeat steps 1 through 7 to add the other role, depending on which role you already chose in step 3.
Add a Custom Tenable Role
If you use Azure RBAC for your Kubernetes cluster authorization, and want to gain IAM visibility within Tenable not provided by the role bindings that you added to the Tenable App, add the following custom role JSON to your subscription. Refer to Azure documentation for more information about custom roles.
To add the Tenable role:
- In the Azure portal, navigate to the Subscriptions page, and then click on the relevant subscription.
- Click Access control (IAM), and then click Add > Add custom role.
- Navigate to the JSON tab and click Edit.
-
Paste the following role to replace the contents of the JSON:
Important: Replace {subscription Id} below with your Azure Subscription ID.CopyJSON
{
"properties": {
"roleName": "Tenable Azure Kubernetes Service Reader",
"description": "Allows read-only access to see most objects in a namespace.",
"assignableScopes": [
"/subscriptions/{subscription Id}"
],
"permissions": [
{
"actions": [
"Microsoft.ContainerService/managedClusters/listClusterUserCredential/action"
],
"notActions": [],
"dataActions": [
"Microsoft.ContainerService/managedClusters/*/read"
],
"notDataActions": []
}
]
}
} - Click Save and then click Review + create.
- Review the new custom role, and then click Create.
- Return to the Access control (IAM) page and then click Add > Add role assignment.
- Search for and select Tenable Azure Kubernetes Service Reader, and then click Next.
- Under Assign access to, leave the default selection as User, group, or service principal.
- Under Members, click +Select members.
- Search for and select Ermetic App, and then click Select.
- Click Next, review the new role assignment, and then click Review + assign.
Grant Tenable Permissions to the Cluster: Microsoft Entra ID with Kubernetes RBAC
If you use Kubernetes RBAC for your Kubernetes cluster authorization, to grant Tenable permissions to the cluster, you will need to create a ClusterRole and ClusterRoleBinding for Tenable. Create the following ClusterRole and ClusterRoleBinding for Tenable, using, for example, the kubectl command-line tool:
YAML
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ermetic-kube-connector-cluster-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
YAML
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ermetic-kube-connector-cluster-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ermetic-kube-connector-cluster-role
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: <ermetic-microsoft-entra-id-application-object-id>
Allow Network Access to Tenable
For Tenable to access the cluster, the cluster endpoint needs to be publicly accessible, and the relevant Tenable IP addresses need to be allowed.
To allow network access:
- In the Azure Portal, navigate to Kubernetes services.
- Click on the relevant Cluster name.
- Under Settings, click on Networking.
-
Under Security, click the checkbox to Set authorized IP ranges.
Note: Although Tenable can access the cluster when this setting is disabled, it does not follow security best practice to do so. Instead, this setting should be enabled, and the authorized network should be restricted to specific IP addresses, including those associated with Tenable. - In the Specify IP ranges field that appears, add all Tenable IP addresses associated with your Tenable region.
- Click Apply.