Authentication¶
AG2Trust uses two authentication methods depending on how you're accessing the platform.
Dashboard Authentication¶
The AG2Trust Dashboard uses Firebase Authentication for secure user login.
Supported Login Methods¶
- Email/Password: Traditional email and password login
- Google Sign-In: OAuth 2.0 authentication via Google
Signing In¶
- Go to app.ag2trust.com
- Click Sign In
- Choose your authentication method
- Complete the login flow
Multi-Factor Authentication (Coming Soon)¶
Enhanced security with MFA will be available in a future release.
API Authentication¶
The Customer API uses API keys for authentication. All API requests must include a valid API key.
API Key Format¶
API keys follow this format:
- Prefix:
cust_ - Length: 32+ characters
- Character set: URL-safe base64
Generating API Keys¶
- Log in to the Dashboard
- Navigate to Settings > API Keys
- Click Generate API Key
- Give your key a descriptive name (e.g., "Production", "Development")
- Copy and securely store the key
One-Time Display
API keys are displayed only once at creation. We store only a secure hash - we cannot recover your key if lost. Generate a new key if needed.
Using API Keys¶
Include your API key in the X-API-Key header:
Managing API Keys¶
Multiple Keys¶
You can create multiple API keys for different purposes:
| Key Name | Use Case |
|---|---|
Production | Live application traffic |
Development | Local development and testing |
CI/CD | Automated testing pipelines |
Revoking Keys¶
To revoke an API key:
- Navigate to Settings > API Keys
- Find the key to revoke
- Click the Revoke button
- Confirm the action
Immediate Effect
Revoked keys stop working immediately. Ensure you've updated any systems using the key before revoking.
Security Best Practices¶
- Never expose keys in client-side code - API keys should only be used server-side
- Use environment variables - Don't hardcode keys in source code
- Rotate keys regularly - Generate new keys periodically
- Use separate keys per environment - Different keys for dev/staging/production
- Monitor usage - Review API usage in the Dashboard for anomalies
# Good: Environment variable
export AG2TRUST_API_KEY="cust_your_api_key_here"
# In code
import os
api_key = os.environ["AG2TRUST_API_KEY"]
User Roles & Permissions¶
AG2Trust uses role-based access control (RBAC) within organizations.
Roles¶
| Role | Description | Key Permissions |
|---|---|---|
| Owner | Organization owner | Full access, billing, delete org |
| Admin | Organization administrator | Full access except billing |
| Member | Team member | CRUD agents/teams/workflows |
| Viewer | Read-only access | View only, no modifications |
Permission Matrix¶
| Action | Owner | Admin | Member | Viewer |
|---|---|---|---|---|
| View agents/teams | ||||
| Create/edit agents | ||||
| Manage users | ||||
| Manage API keys | ||||
| Billing & subscription | ||||
| Delete organization |
Inviting Users¶
- Navigate to Users in the sidebar
- Click Invite User
- Enter their email address
- Select a role
- Click Send Invitation
The invited user will receive an email with instructions to join your organization.
API Endpoints¶
| Endpoint | Auth Method | Description |
|---|---|---|
app.ag2trust.com/* | Firebase JWT | Dashboard UI |
agents.ag2trust.com/api/v1/* | API Key | Customer API |