Multi-tenant setup: Managing multiple clients/entities on single Metabase instance
Context
We're developing a Moodle plugin that integrates with Metabase to display dashboards and analytics. Currently, we're facing challenges with managing multiple clients (different organizations) on a single Metabase instance while maintaining proper data isolation and security.
Current Setup
- Single Metabase instance serving multiple clients
- Each client should only access their own dashboards and data
- Integration via Metabase API from Moodle plugin
- Dashboard embedding in Moodle blocks using dashboard IDs
Security Concerns
- API Key Management: Currently using a single API key for all clients, which gives access to all data
- Dashboard Access Control: Dashboard IDs are sequential (1,2,3...), making it possible to brute-force access to unauthorized dashboards
- Data Isolation: Need to ensure Client A cannot access Client B's data
Questions
1. Multi-tenant Architecture
- What's the recommended approach for multi-tenant setups in Metabase?
- Should we use separate databases per client or rely on row-level security?
2. API Key Scoping (Pro features?)
- Is it possible to create API keys with limited scope (e.g., per collection, per database, per user group)?
- Do Metabase Pro/Enterprise versions offer more granular API key permissions?
- Can we restrict API keys to specific collections or dashboards?
Ideal Solution
We're looking for a way to:
- Generate client-specific access credentials
- Restrict access to authorized dashboards only
- Maintain a single Metabase instance for operational efficiency
- Ensure complete data isolation between clients
Environment
- Metabase version: v0.54.5.4
- Considering upgrade to Pro if it solves our multi-tenancy needs
- Integration: REST API calls from PHP (Moodle plugin)
Any guidance on best practices or Pro features that could help would be greatly appreciated!