Enforcer Service
Advanced permission management and security controls for Kubiya runners
Enforcer Service
The Enforcer service provides advanced permission management capabilities for Kubiya runners, enabling just-in-time access, attribute-based controls, and comprehensive audit logging.
Key Features
- Just-in-Time (JIT) permissions: Grant temporary, scoped access only when needed
- Attribute-Based Access Control (ABAC): Permission decisions based on user context and request attributes
- Policy-as-Code: Define, version, and manage permission policies alongside your infrastructure
- Comprehensive audit trail: Track all access decisions and operations
- Request approval workflows: Configure approval requirements for sensitive operations
Architecture
The Enforcer service integrates with your runners to provide a security layer between your agents and the systems they interact with:
Deployment Models
The Enforcer service can be deployed in multiple ways:
Sidecar Model
In this model, the Enforcer runs as a sidecar container alongside your runner:
Standalone Model
In this model, the Enforcer runs as a separate service that multiple runners can connect to:
Just-in-Time Permissions
The Enforcer service enables temporary, scoped access through just-in-time (JIT) permissions:
- Request: The runner requests temporary credentials or permissions for a specific task
- Validation: Enforcer validates the request against policies and current context
- Issuance: If approved, temporary credentials are issued with appropriate time limits
- Revocation: Credentials are automatically revoked after use or expiration
JIT permissions significantly reduce the security risk by minimizing the duration and scope of elevated access.
Example: AWS Permissions
Attribute-Based Access Control
ABAC policies allow for dynamic permission decisions based on:
- User attributes: Who is requesting through the agent
- Resource attributes: What they're trying to access
- Environmental attributes: Time of day, network location, etc.
- Request context: Purpose of the request, related workflow, etc.
Example ABAC Policy
Approval Workflows
For sensitive operations, the Enforcer can require explicit approval:
- Agent requests permission for sensitive operation
- Enforcer initiates approval workflow based on policy
- Approvers are notified and can approve/deny the request
- On approval, the temporary access is granted
Configuring Approvers
Audit Logging
The Enforcer provides comprehensive audit logs for all permission requests and decisions:
- Who initiated the request (user and agent)
- What was requested
- When it was requested
- Decision outcome (approved/denied)
- Approvers involved (if any)
- Actions performed with the access
Integrating these logs with your existing SIEM system provides end-to-end visibility of all agent activities.
Terraform Configuration
You can configure the Enforcer service using Terraform:
Best Practices
- Start restrictive: Begin with strict policies and loosen as needed
- Regular review: Audit and update policies regularly
- Layered approach: Combine JIT and ABAC for comprehensive protection
- Role separation: Define distinct approver roles separate from users
- Minimize duration: Keep temporary access windows as short as practical