This guide walks you through setting up Okta OAuth 2.0 for the Agentic EKS Platform's secure mode deployment.
📖 For deployment instructions, see the main README.md
The platform supports two deployment modes:
| Mode | Authentication | Use Case |
|---|---|---|
| 🎭 Demo Mode | None (bypass OAuth) | Development, testing, demos |
| 🔒 Secure Mode | Okta OAuth 2.0 | Secure environments |
This guide covers secure mode setup with Okta integration.
graph TB
User --> UI[Streamlit UI]
UI --> Okta[Okta Authorization Server]
UI --> Admin[Admin Agent]
Admin --> |OAuth Token| HR[HR Agent]
Admin --> |OAuth Token| Finance[Finance Agent]
subgraph "OAuth Apps"
UIApp[Agent-UI-App<br/>Authorization Code Flow]
A2AApp[All-Agents-App<br/>Client Credentials Flow]
end
UI -.-> UIApp
Admin -.-> A2AApp
Two OAuth Applications Required:
- 🖥️ Agent-UI-App: User authentication (Authorization Code Flow)
- 🤖 All-Agents-App: Agent-to-agent communication (Client Credentials Flow)
Before starting, ensure you have:
- ✅ Okta Developer Account (free at developer.okta.com)
- ✅ Administrative access to your Okta organization
- ✅ EKS cluster with the platform deployed in demo mode first (for testing)
💡 Tip: Set up Okta while your platform runs in demo mode, then switch to secure mode
- Sign up at developer.okta.com
- Create organization (e.g.,
trial-xxxxxxx.okta.com) - Verify email and access the Admin Console
- Note your domain:
your-domain.okta.com(needed for deployment)
- Navigate: Security → API → Authorization Servers
- Add Authorization Server:
- Name:
A2A-AuthServer - Description:
Authorization server for agent-to-agent communication - Audience:
api://a2a-agents - Issuer: Use default value
- Name:
- Save and note the Server ID (needed for deployment)
- Select your authorization server
- Go to Scopes tab → Add Scope
- Create scope:
- Name:
agent.access - Description:
Access to agent APIs for A2A communication - Default scope: ✅ Checked
- Name:
- Save
- Go to Access Policies tab → Add Policy
- Policy details:
- Name:
A2A-Machine-to-Machine - Description:
Policy for agent-to-agent authentication - Assign to: All clients
- Name:
- Create Policy → Add Rule:
- Rule Name:
Client Credentials Rule - Grant type: ✅ Client Credentials
- Scopes: ✅
agent.access - Token Lifetime: 1 hour (recommended)
- Rule Name:
- Create Rule
Purpose: Handles user login to the Streamlit UI
- Navigate: Applications → Create App Integration
- Select: OIDC - OpenID Connect → Web Application
- App Settings:
- Name:
Agent-UI-App - Grant types: ✅ Authorization Code, ✅ Refresh Token
- Client authentication: ✅ Client secret
- Name:
Add these redirect URIs based on your access method:
# For local port-forward testing
http://localhost:8501
# For LoadBalancer/Ingress (production)
https://your-domain.com
- 📋 Copy Client ID:
0oaxxxxxxxxx(save for deployment) - 📋 Copy Client Secret:
xxxxxxxxxxxxx(save for deployment)
Purpose: Handles authentication between backend agents
- Navigate: Applications → Create App Integration
- Select: API Services → Machine-to-Machine
- App Settings:
- Name:
All-Agents-App - Grant types: ✅ Client Credentials only
- Client authentication: ✅ Client secret
- Name:
- Go to Okta API Scopes tab
- Grant access to
agent.accessscope - Verify the scope appears in granted scopes list
- 📋 Copy Client ID:
0oaxxxxxxxxx(save for deployment) - 📋 Copy Client Secret:
xxxxxxxxxxxxx(save for deployment)
After creating both Okta applications, you'll need these environment variables for secure mode deployment:
# AWS Configuration
export ACCOUNT_ID=your-aws-account-id
# Okta Domain & Auth Server
export OKTA_DOMAIN=your-domain.okta.com
export OKTA_AUTH_SERVER_ID=your-auth-server-id
# All-Agents-App Credentials (for Admin Agent)
export OKTA_ADMIN_CLIENT_ID=0oaxxxxxxxxx
export OKTA_ADMIN_CLIENT_SECRET=xxxxxxxxxxxxx
# Agent-UI-App Credentials (for UI)
export OKTA_UI_CLIENT_ID=0oaxxxxxxxxx
export OKTA_UI_CLIENT_SECRET=xxxxxxxxxxxxx
# Optional: Custom redirect URI
export OKTA_REDIRECT_URI=http://localhost:8501🔗 Next Step: Deploy in secure mode using these instructions
# Set all environment variables above, then:
./deploy-helm.sh -m secure# Port-forward the UI service
kubectl port-forward svc/agents-ui-app-service 8501:80
# Access the UI
open http://localhost:8501Expected Flow:
- 🌐 Browser redirects to Okta login
- 🔐 Enter your Okta credentials
- ✅ Successful redirect back to UI
- 💬 Chat interface becomes available
- 👤 User info displayed in sidebar
Try these queries to verify OAuth between agents:
💬 "What is the name of employee EMP0002?"
# → Should route to HR Agent with OAuth token
💬 "What is the annual salary of employee EMP0003?"
# → Should route to Finance Agent with OAuth tokenCheck logs for successful OAuth token validation:
kubectl logs -l app.kubernetes.io/instance=agents | grep -i oauth- ✅ Use Kubernetes Secrets: Store credentials in encrypted secrets, not environment variables
- ✅ Rotate Credentials: Regularly rotate client secrets and tokens
- ✅ Limit Scope Access: Only grant necessary scopes to applications
- ✅ Monitor Token Usage: Set up alerts for failed authentication attempts
- ✅ Use HTTPS: Always use TLS for production redirect URIs
- ✅ Network Policies: Restrict network access between pods
- 🔐 AWS Secrets Manager: Store sensitive credentials
- 🌐 Ingress & TLS: Use proper domain with HTTPS
- 🎯 Fine-grained Scopes: Implement specific agent permissions
- ✅ Input Validation: Sanitize all user inputs
- 🛡️ Bedrock Guardrails: If using AWS Bedrock for model access, make sure. to implement AWS Bedrock security guardrails.
- 📊 Monitoring: Implement logging and observability
- 🔄 Token Refresh: Implement token refresh for long-running sessions
- 🏠 Project Documentation - Platform overview and deployment
- 🔗 Okta Developer Docs - Official Okta documentation
- 🔧 A2A Protocol Specification - Agent-to-Agent protocol details
⚡ Quick Links:
- 🎭 Demo Mode Deployment - Test without OAuth
- 🔒 Secure Mode Deployment - Production with OAuth
- 🧪 Testing Guide - Query examples and workflows