Introspection for AI Requests
Token introspection allows your MCP servers and AI agents to validate Guardhouse access tokens in real-time without requiring JWT signature validation. This is essential for real-time security and access control.
What is Token Introspection?
Token introspection is an OAuth 2.0 extension (RFC 7662) that provides a standardized endpoint for validating tokens and retrieving metadata. Instead of validating JWT signatures locally, you make a request to Guardhouse to ask "Is this token still valid?"
When to Use Introspection
Use token introspection when:
- ✅ Real-time Security - Check if tokens are revoked immediately
- ✅ Access Control - Enforce dynamic permissions changes
- ✅ Multi-tenant Isolation - Validate tokens across tenants
- ✅ Debugging - Inspect token metadata and scopes
- ✅ Compliance - Meet security audit requirements
When NOT to Use Introspection
Use JWT signature validation instead when:
- ✅ High-performance API - No network overhead for each request
- ✅ Offline Validation - Works without network connectivity
- ✅ Simpler Clients - Don't need introspection client credentials
- ✅ Public Key Caching - JWKS caching works locally
Introspection vs JWT Signature Validation
| Aspect | JWT Signature | Introspection |
|---|---|---|
| Speed | Fast (local crypto) | Slower (network call) |
| Network Dependency | None | Required |
| Client Complexity | Simple | Moderate |
| Real-time Revocation | No | Yes |
| Resource Usage | Minimal | Higher |
| Debugging | Harder | Easier |
| Multi-tenant | Simple | Complex |
| Best Use Case | Public APIs | MCP/AI Agents |
How It Works
Introspection Flow
┌──────────────────────────────────────────┐
│ Your Application │
│ (Client, Service, Agent) │
│ │
└────────────┬───────────────────────┘
│
▼