Overview
The Agent Triage Protocol implements a comprehensive security model with multiple authentication mechanisms to ensure secure communication between all components of the system.Three-Tier Authentication System
ATP uses a three-tier authentication system that provides appropriate access controls for different system actors while maintaining security boundaries between components.1. Administrative Authentication
Administrative tokens control service registration and system configuration. These long-lived tokens must be carefully protected and should only be used by system administrators during initial setup and service onboarding. Key characteristics:- Used only for service registration and system configuration
- Highest privilege level in the system
- Should be protected with strong security measures
- Should be rotated periodically
- Access should be tightly controlled and audited
2. Service Authentication
Each registered AI service receives a unique API key during the registration process. This key must be included as a Bearer token in theAuthorization
header for all service-initiated requests.
Key characteristics:
- Unique to each registered service
- Used for sending notifications and receiving responses
- Medium privilege level
- Can only access operations related to the specific service
- Compromised keys affect only a single service
- Usage can be tracked per service for billing or analytics
- Keys can be rotated independently without affecting other services
3. User Authentication
End users authenticate with the ATP system through their client applications using OAuth 2.0 or similar protocols. User tokens authorize notification delivery and response submission. Key characteristics:- Associated with individual end users
- Used for receiving notifications and submitting responses
- Lowest privilege level
- Can only access notifications intended for the specific user
Webhook Security
The ATP server authenticates callbacks to AI services using HMAC signatures. During service registration, the service provides a webhook secret. When delivering user responses, the ATP server includes anX-ATP-Signature
header computed as:
t
is the timestamp when the signature was generatedv1
indicates the signature algorithm version- The value after
v1=
is the hexadecimal representation of the HMAC signature
Signature Verification Example (Node.js)
Token Management
Token Expiration
To minimize security risks, the ATP protocol supports token expiration:- Administrative tokens: Typically valid for 30 days
- Service API keys: Long-lived but can be manually revoked
- User tokens: Should follow OAuth 2.0 best practices with refresh tokens
Token Rotation
The protocol supports secure token rotation:- Administrative tokens: Should be rotated manually on a regular schedule
- Service API keys: Can be rotated through the administrative API
- User tokens: Managed through the OAuth 2.0 refresh flow
Token Storage
All tokens should be securely stored:- Never store tokens in client-side code or public repositories
- Use environment variables or secure key management systems
- Encrypt tokens at rest in databases or configuration files
Transport Security
All ATP communication must use TLS 1.2 or higher to ensure data confidentiality and integrity during transit. The protocol does not support unencrypted HTTP connections in production environments. Additional transport security recommendations:- Enable HTTP Strict Transport Security (HSTS)
- Implement certificate pinning for critical endpoints
- Use strong cipher suites and disable outdated protocols
- Validate server certificates on client side
Security Best Practices
When implementing the ATP protocol, follow these security best practices:- Principle of Least Privilege: Grant only the minimum necessary permissions to each component
- Defense in Depth: Implement multiple layers of security controls
- Regular Auditing: Monitor authentication logs for suspicious activity
- Secure Defaults: Start with the most secure configuration by default
- Keep Dependencies Updated: Regularly update all libraries and dependencies
- Input Validation: Validate all inputs to prevent injection attacks
- Rate Limiting: Implement rate limiting to prevent brute force attacks
- Security Headers: Use appropriate security headers in HTTP responses