Runner Permissions
Configure secure permissions for Kubiya runners in your environment
Runner Permissions
Properly configuring permissions for your runners is crucial for securing your environment while allowing agents to perform their intended tasks. This guide explains how to configure the right level of access for different scenarios.
Permission Models
Kubiya runners support multiple permission models to accommodate different security requirements:
Basic Access
The default permissions granted to a runner when first deployed. These permissions allow:
- Running containerized tools within the runner's namespace
- Basic Kubernetes API operations within its own namespace
- Connection to the Kubiya platform
Enhanced Kubernetes Access
For runners that need to manage Kubernetes resources outside their own namespace:
- Ability to create, modify, and delete resources across multiple namespaces
- Access to cluster-wide resources
- Permission to interact with core Kubernetes APIs
Cloud Provider Integration
For runners that manage cloud resources:
- Authentication to cloud provider APIs
- Permission to create, modify, and delete cloud resources
- Access to billing and usage information
Configuring Kubernetes Permissions
Depending on your use case, you'll need to configure different levels of access for your runners:
Namespace-Scoped Access
This is the default permission level, appropriate for most basic deployments:
Cluster-Wide Access
For Kubernetes management use cases, you'll need broader permissions:
Cluster-wide permissions grant significant access to your environment. Use the principle of least privilege when possible by creating custom roles with only the necessary permissions.
For more granular control, create a custom ClusterRole:
Cloud Provider Permissions
AWS Integration
To allow your runner to manage AWS resources:
Create an IAM Role
Create an IAM role with appropriate permissions for your use case.
Associate with Kubernetes Service Account
Configure IRSA (IAM Roles for Service Accounts) to associate the IAM role with your Kubernetes service account:
Configure AWS Auth
For EKS, ensure the IAM role is mapped correctly:
Add the mapping:
GCP Integration
For Google Cloud Platform:
Create a Service Account
Create a GCP service account with appropriate roles.
Create and Download a Key
Generate a key for the service account.
Store as Kubernetes Secret
Mount in Runner Pod
Update your runner deployment to mount the credentials:
Azure Integration
For Microsoft Azure:
Create a Service Principal
Create an Azure service principal with appropriate roles.
Store Credentials
Store the credentials as Kubernetes secrets:
Configure Runner
Update your runner deployment to use these credentials:
Enforcing Least Privilege
To maintain a secure environment, follow these practices:
- Audit permissions regularly: Review the permissions granted to your runners to ensure they align with your security policies
- Use dedicated roles: Create specific roles for each runner based on its intended purpose
- Implement scope limitations: Restrict access to specific namespaces or resource types when possible
- Enable logging: Configure comprehensive logging to track all operations performed by runners
- Implement policy enforcement: Use Kubiya's Enforcer service to add additional access controls
For production environments, consider using the Kubiya Enforcer service to implement attribute-based access control (ABAC) and just-in-time permissions.
Managing Permissions with Enforcer
The Enforcer service provides advanced permission management:
- JIT permissions: Grant temporary access for specific operations
- ABAC policies: Control access based on user attributes and context
- Policy-as-code: Define and version permission policies along with your infrastructure
Next Steps
- Set up a local runner with appropriate permissions
- Configure the Enforcer service for advanced permission management
- Implement security best practices for your Kubiya deployment