Column-Level Permissions
Control data access at the column level. Hide sensitive information from specific agents while maintaining usability.
🔒 What Are Column Permissions?
Column permissions let you:
- Hide PII: Protect personally identifiable information
- Secure sensitive data: Hide salary, financial, or medical data
- Compliance: Meet GDPR, HIPAA, or other regulatory requirements
- Role-based access: Different users see different columns
🎯 Use Cases
Customer Data
Show name and company, hide SSN and credit cards
Employee Records
Show job title and department, hide salary and reviews
Financial Data
Show aggregates, hide individual account details
Healthcare Records
Show demographics, hide diagnoses and treatments
⚙️ How It Works
Agent-Level Permissions
Column permissions are configured per agent:
- Agent is created with access to specific tables
- For each table, admin selects visible columns
- AI cannot see or query hidden columns
- Hidden columns are excluded from schema context
The AI receives only the schema for visible columns. It has no knowledge that hidden columns exist, ensuring they can't be accidentally queried or exposed.
📝 Configuring Column Permissions
During Agent Creation
- Navigate to Agents → New Agent
- Select data source and tables
- For each table, click "Configure Columns"
- Select which columns to show
- Save agent
Example: customers Table
✅ Visible Columns:
- customer_id
- customer_name
- company_name
- industry
- region
- created_at
❌ Hidden Columns:
- ssn
- credit_card_number
- bank_account
- internal_notes
- credit_score
Editing Existing Agent
- Navigate to Agents
- Click on the agent
- Click "Edit"
- Go to "Table & Column Permissions"
- Modify column selections
- Save changes
🔍 Query Behavior
User Query:
"Show me all customer information for ID 12345"
Generated SQL (with permissions):
SELECT
customer_id,
customer_name,
company_name,
industry,
region,
created_at
FROM customers
WHERE customer_id = 12345;
Sensitive columns (ssn, credit_card_number, etc.) are automatically excluded. The AI doesn't know they exist.
🎓 Common Patterns
1. Sales Agent (Limited PII)
Table: customers
Visible:
✅ customer_id, name, company, industry
✅ email, phone
✅ sales_rep_id, account_status
Hidden:
❌ ssn, credit_card, bank_account
❌ internal_notes, credit_score
2. Finance Agent (No PII)
Table: orders
Visible:
✅ order_id, customer_id, order_date
✅ total_amount, payment_method
✅ order_status
Hidden:
❌ customer_name, email, phone
❌ shipping_address
❌ credit_card_last4
3. Analytics Agent (Aggregates Only)
Table: employees
Visible:
✅ employee_id, department, job_title
✅ hire_date, employment_status
Hidden:
❌ first_name, last_name, email
❌ ssn, salary, bonus
❌ performance_rating, manager_notes
4. Executive Dashboard (High-Level Only)
Table: revenue
Visible:
✅ date, region, product_category
✅ total_revenue, order_count
Hidden:
❌ customer_id, sales_rep_id
❌ individual_order_details
❌ cost_of_goods_sold, profit_margin
🔐 Security Best Practices
✅ Default Deny
Start with no columns, explicitly add what's needed
✅ Least Privilege
Only show columns necessary for the agent's purpose
✅ PII Protection
Always hide SSN, credit cards, account numbers
✅ Regular Audits
Review permissions quarterly
✅ Document Decisions
Note why columns are hidden/visible
✅ Test Queries
Verify sensitive data isn't exposed
🌐 Compliance Support
GDPR
- Right to privacy: Hide personal data from analytics
- Data minimization: Only expose necessary columns
- Purpose limitation: Different agents for different purposes
HIPAA
- PHI protection: Hide protected health information
- Minimum necessary: Only show data needed for job function
- Access controls: Role-based column access
PCI DSS
- Cardholder data: Never expose full credit card numbers
- Sensitive authentication data: Hide CVV, PINs
- Tokenization: Use customer_id instead of payment details
⚡ Advanced Features
Dynamic Masking
Show partial data instead of hiding completely:
credit_card_number → ****-****-****-1234
ssn → ***-**-1234
email → j***@example.com
Dynamic masking is currently in beta. Contact support to enable for your organization.
Conditional Permissions
Show/hide columns based on conditions:
- Time-based: Hide salary until fiscal year end
- User-based: Managers see more than analysts
- Data-based: Hide columns for specific customer segments
🔍 Auditing & Monitoring
Access Logs
Track which users query which columns:
- User ID and timestamp
- Agent used
- Tables and columns accessed
- Query text and results
Permission Changes
Audit trail for permission modifications:
- Who made the change
- When it was made
- What changed (before/after)
- Reason for change
Compliance Reports
Generate reports for auditors:
- Column access summary
- Sensitive data exposure
- Permission changes over time
- Users with access to PII
🎯 Implementation Checklist
Initial Setup
- ✅ Identify sensitive columns in all tables
- ✅ Document column classification (public, internal, confidential, restricted)
- ✅ Create agents with appropriate permissions
- ✅ Test queries to verify hidden columns are inaccessible
- ✅ Train users on data access policies
Ongoing Maintenance
- ✅ Review permissions quarterly
- ✅ Update as schema changes
- ✅ Audit access logs monthly
- ✅ Revoke unnecessary access
- ✅ Document all permission changes
⚠️ Common Mistakes
- Default allow: Showing all columns by default
- Forgetting new columns: Not reviewing permissions when schema changes
- Too permissive: "They might need it someday"
- No documentation: Not recording why columns are hidden
- No audits: Set and forget without periodic review
🔧 Troubleshooting
Query Returns Unexpected Results
Cause: Hidden columns affecting joins or filters
Solution: Review which columns the agent can see. Add necessary columns for proper query execution.
User Can't Access Needed Data
Cause: Column hidden from their agent
Solution: Create new agent with broader permissions or assign different agent.
Sensitive Data Still Showing
Cause: User switched to different agent with more permissions
Solution: Review agent assignments and ensure proper column hiding.
📊 Example Configurations
Retail Company
Agents:
1. Sales Agent
- See: customer contact info, order history
- Hide: payment info, internal notes
2. Marketing Agent
- See: demographics, purchase patterns
- Hide: PII, payment info
3. Finance Agent
- See: order amounts, payment status
- Hide: customer names, contact info
4. Executive Agent
- See: high-level metrics only
- Hide: all individual customer data
Healthcare Provider
Agents:
1. Operations Agent
- See: appointment times, facility usage
- Hide: patient names, diagnoses
2. Billing Agent
- See: patient ID, billing codes, amounts
- Hide: medical details, doctor notes
3. Research Agent
- See: de-identified medical data
- Hide: all PII (names, addresses, DOB)
4. Admin Agent
- See: all data (restricted to compliance team)