Role-Based Access Control (RBAC)
RBAC determines who can do what in your organization and projects.How RBAC Works
- Organization level
- OWNER β full access
- ADMIN β full access (except billing)
- VIEWER β read-only
- Members join projects
- Project level (within each project)
- MEMBER β create and edit resources
- VIEWER β read-only access
Access Matrix
Best Practices for Access Control
Least Privilege
Grant only the minimum access needed. Default to VIEWER, grant MEMBER when necessary.
Regular Audits
Periodically review who has access and remove unnecessary members
Segregate Projects
Use different projects for different teams/use cases for better isolation
Admin Reviews
Have OWNER/ADMIN regularly review who has access to sensitive projects
Credentials: Secure Secret Storage
Credentials are securely stored API keys, tokens, passwords, and other secrets that tools and agents need.What Can Be Stored as Credentials
- API Keys - For external services (SendGrid, Stripe, etc.)
- Tokens - OAuth tokens, bearer tokens
- Passwords - Database passwords, service accounts
- Connection Strings - Database URLs, connection info
- Certificates - SSL certificates, authentication certs
Credential Security
PLai Framework keeps credentials safe: β Encryption - All credentials encrypted at restβ Access Control - Only assigned agents can use them
β Audit Logging - Every access logged and tracked
β Rotation - Easily update without recreating tools
β Scope - Credentials scoped to specific projects/agents
Using Credentials
1
Create Credential
Go to Project Settings β Credentials β Add credential
2
Enter Secret
Provide the API key, token, or password
3
Name It
Give it a descriptive name (e.g., βSendGrid API Keyβ)
4
Assign to Tools
When creating a tool, select which credential to use
5
Verify
Test the tool to ensure credential works
Credential Best Practices
- β Use descriptive names (βSendGrid APIβ, not βkey1β)
- β Rotate credentials periodically
- β Use service accounts instead of personal credentials
- β Limit credential scope to only whatβs needed
- β Audit who accessed credentials
Guardrails: Safety Constraints
Guardrails are safety rules that constrain what agents can do.Types of Guardrails
Content Filtering
Content Filtering
Prevent agents from outputting certain types of content:
- No sensitive data (PII, passwords, etc.)
- No hate speech or offensive content
- No instructions for illegal activities
- Custom filters based on keywords
Rate Limiting
Rate Limiting
Control how much an agent can do:
- Max calls per hour/day
- Max processing time per request
- Throttle requests during high load
- Prevent accidental runaway costs
Input Validation
Input Validation
Ensure inputs meet safety requirements:
- Max input length
- Required fields
- Allowed patterns/formats
- Block suspicious inputs
Output Validation
Output Validation
Verify outputs before sending:
- Check response quality
- Validate format
- Ensure no sensitive data leaked
- Scan for malicious content
Capability Restrictions
Capability Restrictions
Limit which tools agents can use:
- Only specific APIs allowed
- No code execution
- No external datasources
- Restricted tool parameters
Answer Filters
Answer Filters are specific guardrails for agent responses.- Agent generates response
- Answer filters apply:
- Check length
- Check tone
- Scan for PII
- Validate accuracy
- Check confidence
- Response sent or blocked
Configuring Guardrails
1
Go to Agent Settings
Open your agent configuration
2
Find Guardrails Section
Look for Safety, Constraints, or Guardrails settings
3
Define Rules
Set specific constraints:
- Max tokens: 2000
- Rate limit: 100/hour
- Disallowed terms: [list]
4
Test
Test agent with guardrails enabled
5
Monitor
Track how often guardrails trigger
Encryption & Data Protection
Data Security at Rest
- π All data encrypted in database (AES-256)
- ποΈ Backups encrypted
- π Credentials double-encrypted
- π Encryption keys rotated regularly
Data Security in Transit
- π All communication via HTTPS/TLS
- π€ Certificate pinning for APIs
- π Secure WebSocket connections
- π‘οΈ DDoS protection
Data Retention
- π Configurable retention policies
- ποΈ Automatic deletion after X days
- π Audit logs retained longer
- π Backups kept for recovery
Activity Audit Logs
Audit logs track everything that happens in your organization and projects.What Gets Logged
Accessing Audit Logs
Audit Log Fields
Compliance Features
Data Governance
- β Data classification (public, internal, confidential)
- β Access controls based on classification
- β Automatic masking of sensitive data
- β Compliance reporting
Privacy
- β No data used for model training (data stays yours)
- β GDPR compliance (right to be forgotten)
- β Data residency options (EU, US, etc.)
- β Privacy-preserving analytics
Monitoring & Alerts
- π¨ Alerts for unusual activity
- π Compliance dashboards
- π Threat detection
- π Regular compliance reports
Security Best Practices
For Organizations
Limit OWNER Role
Keep OWNER role to 2-3 trusted people. Most people should be ADMIN or VIEWER.
MFA
Require multi-factor authentication for OWNER/ADMIN accounts
Regular Reviews
Monthly review of member access and audit logs
Incident Plan
Have a plan for security incidents. Know who to contact.
For Agents & Tools
Minimize Permissions
Only give agents the tools and datasources they actually need
Use Service Accounts
Use service account credentials, not personal credentials
Enable Guardrails
Always enable guardrails, especially for production agents
Rate Limit
Set reasonable rate limits to prevent runaway costs or abuse
For Data
Encrypt Credentials
Always use the Credentials system, never hardcode secrets
Mask PII
Use answer filters to prevent PII leakage
Audit Access
Regularly review audit logs for unauthorized access
Clean Logs
Archive old logs and delete sensitive test data
Troubleshooting Security Issues
Agent getting 'access denied' error
Agent getting 'access denied' error
Solutions:
- Check if agent has permission for the tool
- Verify credential is valid and assigned
- Check rate limits not exceeded
- Ensure guardrails arenβt blocking legitimate requests
Credential not working
Credential not working
Solutions:
- Verify credential value is correct
- Check credential hasnβt expired
- Test credential outside PLai
- Recreate credential if needed
Concerned about data safety
Concerned about data safety
Check:
- Audit logs show who accessed what
- All credentials encrypted
- All communication HTTPS
- Retention policies set appropriately
- Guardrails enabled on production agents
Need to remove someone's access
Need to remove someone's access
Steps:
- Go to Organization or Project Settings
- Find the member
- Click βRemoveβ (OWNER/ADMIN only)
- They lose access immediately
- Check audit log confirms removal
Compliance & Regulations
PLai Framework supports compliance with:- πͺπΊ GDPR - General Data Protection Regulation (EU)
- πͺπΊ EU AI Act - The worldβs first comprehensive legal framework regulating artificial intelligence across the European Union (EU)
- π ISO 27001 - Information security management (certification in prgoress)
Key Takeaways
β RBAC - Control who can access whatβ Credentials - Safely store and manage secrets
β Guardrails - Enforce safety constraints on agents
β Encryption - All data protected in transit and at rest
β Audit Logs - Track everything for accountability
Next Steps
- Organizations & Projects - Learn about roles and invitations
- Monitoring - Track security metrics
- Contact Security Team - For enterprise compliance requirements