Altan
HomeDiscordStatus
HomeDiscordStatus
  1. Databases
  • What is Altan?
  • Support Options
  • Projects
    • Create Your First Project
    • App Navigation & Settings
    • Building Tips
    • The Art of Prompting
    • Publishing Your App
    • Rollback and Checkpoints
    • Instantly Resolve Errors
  • Databases
    • Introduction
    • Security
    • Technical Overview
  • AI Agents
    • What is an AI Agent?
    • Create your first AI Agent
    • Tools
    • Interacting with Your AI Agent
    • Technical Overview
    • Altan Frontend SDK
      • Altan Frontend SDK
  • Flows
    • Create your first Flow
    • Automation basics
    • Adding modules
    • Types of modules
    • Passing data
    • Filters
    • Debugging
    • Retrigger events
    • Version History
    • Overwrite connection
    • Task credits
  • Integration
    • Magic Link
    • Altan Integrator
    • Create your integration
  • Authentication
    • Authentication
  • Payments
    • Checkout Session
    • Object Storage
  • Media
    • Media
  • Partner Program
    • Who are our Partners?
    • Partner Program Benefits
    • How to import projects into Altan
    • How to export projects from Altan
    • Work collaboratively
    • How to start on Altan
    • Become an Altan Partner
  • API Reference
    • account
      • Create Account
      • Get Account Gq
      • Get Account Public
      • Get Account Usage
      • Patch Account
      • Delete Account
      • Get Account Users
      • Create Custom Webhook
      • Create Media
      • Create Media From Url
      • Create Multiple Media
      • Create Token
      • Create Agent
      • Upsert Flow
      • Fetch User Account Notifications
      • Create Altaner
      • Get Selected Template Version
      • Get Latest Template Version
      • Get Template Version
      • Invite User
      • Create Interface
      • Get Members
      • Get Account Connections
      • Get Apikey
      • Delete Apikey
    • project
      • Get Altaner
      • Create Project V2
      • Update Altaner
      • Delete Altaner
      • Get Altaner Flows
      • Clone Altaner
      • Update Altaner Positions
      • Create Altaner Component
      • Update Altaner Component
      • Get Altaner Component
      • Atomic Update Altaner Component
      • Delete Altaner Component
      • Duplicate Altaner
      • Create Idea
    • interface
      • Start Dev Server
      • Get Dev Status
      • Send Dev Error To Agent
      • Revise Interface
      • Get Dev Errors
      • Log Error
      • Create Or Overwrite File
      • Update File
      • Create Multiple Files
      • Read File
      • Read Multiple Files
      • Delete File
      • Rename File
      • Update Files Pattern
      • Search In Files
      • Search And Replace
      • Preview Updates
      • Install Libraries
      • List Tree
      • List Tree Json
      • Get Repo Status
      • List Branches
      • Create Branch
      • Delete Branch
      • Switch Branch
      • Clone Repo
      • Merge Branch
      • Commit Changes
      • Get Diff Changes
      • Accept Changes
      • Discard Changes
      • Push Changes
      • Pull Changes
      • Reset Repo
      • Get Repo Log
      • Restore Main
      • Get Public Interface
      • Get Interface By Name
      • Get Interface
      • Update Interface
      • Delete Interface
      • Get Interface Screenshot
      • Update Interface With Ai
      • Publish Interface
      • Vercel Webhook
      • Get Deployment Status
      • Add Collaborator
      • Get Deployment Logs
      • Fix Deployment With Ai
      • Add Domain
      • Get Domains
      • Remove Domain
      • Verify Domain
      • Add Env Variables
      • Get Env Variables
      • Delete Env Variable
      • Sync Env Variables
      • Rollback Deployment
      • Get Commit Details
      • Restore To Commit
    • flows
      • modules
        • Fetch Module
        • Update Flow Module
        • Delete Module
        • Fetch Graph Module
        • Rename Module
        • Update Position In Canvas
        • Update In Edge Filter
        • Update Route Condition Filter
        • Add Condition
        • Get Available Variables For Mappings
      • hooks
        • Get Webhook
        • Update Hook
      • executions
        • Get File Signed Url
        • Stream Execution
      • Fetch Flow Execution
      • Fetch Flow
      • Update Flow
      • Delete Flow
      • Get Latest Execution
      • Fetch Flow Schema
      • Get Flow From Hook
      • Get Flow Hook
      • Fetch Flow Executions
      • Fetch Flow Executions
      • Upsert Flow Module
      • Add Flow Module
      • Create Flow Duplicate
      • Clone Flow Modules
      • Paste Flow Modules
      • Delete Modules
      • Update Edge
    • media
      • Get Media Url
      • Delete Media
      • Get Multiple Media
      • Get 3D Media
      • Delete Model
      • Create 3D Model
    • agents
      • tools
        • Patch Tool
        • Patch Tool
      • authorizaiton requests
        • Create Authorization Request
        • List Authorization Requests
        • Get Authorization Request
        • Delete Authorization Request
        • Reject Authorization Request
      • Get Altan Agents
      • List Voices
      • Get Agent
      • Update Agent
      • Delete Agent
      • Get Agent
      • Create And Add Tool To Agent
      • Remove Tool And Space
      • Get User Agent Dm Room
      • Get Agent Gate
      • Get Agent Member Usage
  1. Databases

Security

🔐 Understanding Row-Level Security (RLS) in Altan Databases#

Altan uses Row-Level Security (RLS) as a core mechanism to keep your data private, secure, and accessible only to the right users. In this post, we’ll explain what RLS is, how it works in Altan, and why it’s the right choice for a multi-tenant AI automation platform.

✅ What is RLS?#

Row-Level Security (RLS) is a database feature that restricts access to individual rows in a table based on the identity of the user making the request.
Instead of giving or denying access to an entire table, RLS allows fine-grained control: users can only see the rows they are allowed to see — even when they're querying the same table as others.

🔐 Why Altan Uses RLS#

Altan is designed for multi-tenant applications, meaning:
Multiple companies or workspaces share the same underlying infrastructure.
Each tenant (your business or workspace) should only see its own data.
RLS enforces data isolation at the database level, making it extremely hard to leak data across tenants — even if there’s a bug in your logic or API layer.

🧠 How It Works in Altan#

Every Altan database:
Is a PostgreSQL schema (one per workspace or client).
Uses RLS policies on every table that restrict access based on the current user or API token.
Whenever a request is made:
1.
The authenticated user’s identity is extracted from a signed JWT token.
2.
That identity (e.g. account_id, user_id, or role) is automatically injected into the database session.
3.
RLS policies on each table use this session information to allow or deny access row-by-row.
For example:
With this in place, even if someone tries to query SELECT * FROM tasks, they’ll only see their own rows.

🧰 Developer Benefits#

Zero-trust by default: If no RLS policy exists, PostgreSQL denies all access to rows.
Backend-agnostic security: RLS works at the DB level, not just the API level — even if you connect via Supabase or PostgREST.
Simplified permissions: Policies can include logic for roles, visibility levels, ownership, etc.

🛡️ Why It’s Secure#

Enforced at the lowest level: No matter how data is queried (via APIs, agents, or even direct SQL), RLS rules apply.
Immutable access control: Even if someone gets access to your endpoint, they cannot access other tenants’ data.
Integrated with JWT auth: RLS in Altan is tightly coupled with the identity system — sessions cannot be spoofed or escalated.

✨ Real Use Cases in Altan#

AI agents querying only their own workspace’s leads.
Forms submitting rows into tables while hiding previous responses.
Workflows iterating over filtered datasets that respect tenant isolation.

🔍 FAQs#

Q: Can admins bypass RLS?
Yes, but only explicitly. Admin users or internal system agents may bypass RLS in some contexts with elevated roles, always logged and auditable.
Q: Can I write custom RLS policies?
Not yet. For security and simplicity, Altan generates and manages RLS policies behind the scenes. Advanced configuration may be supported in the future.

🧠 Summary#

Row-Level Security is one of the core reasons Altan is safe by default. You never have to worry about leaking data between clients or agents — the database enforces access boundaries at the row level, automatically and reliably.
If you're building serious automation, this is the kind of safety net you want under the hood.
Modified at 2025-07-29 18:32:31
Previous
Introduction
Next
Technical Overview
Built with