Singdata Lakehouse Permission System Inventory and Optimization Best Practices Guide
Document Information
- Target Audience: System administrators, security administrators, data governance teams
1. Overview
In Singdata Lakehouse, users and roles are important digital assets. As the business grows, the permission system may become complex, leading to issues such as permission redundancy and idle roles. This guide will help you:
- ✅ Understand Singdata Lakehouse's dual-layer permission system
- ✅ Master permission management via the Studio Web interface and SQL
- ✅ Differentiate between workspace-level and instance-level permission inventory perspectives
- ✅ Identify and clean up permission redundancy
- ✅ Establish a continuous permission governance mechanism
2. Understanding the Singdata Lakehouse Permission System
2.1 Dual-Layer Permission Architecture
Singdata Lakehouse employs an Instance-Workspace dual-layer permission system:
Key Understanding:
- Users first exist in the instance-level user pool
- Use the
CREATE USERcommand to add instance users to specific workspaces - Instance-level roles have cross-workspace permissions
- Workspace-level roles are only effective within a specific workspace
2.2 Role Type Classification
| Role Type | Scope | Assignment Location | Examples | Description |
|---|---|---|---|---|
| Instance-Level Roles | Across all Workspaces | Assigned at the instance level | instance_adminsystem_admininstance_sreinstance_datasource_admin | Have cross-workspace management permissions Managed uniformly at the instance level |
| Workspace-Level System Roles | Single Workspace | Assigned within the workspace | workspace_adminworkspace_devworkspace_analystworkspace_sreworkspace_user | System presets; permissions limited to a specific workspace Managed independently per workspace |
| Workspace-Level Custom Roles | Single Workspace | Created and assigned within the workspace | User-defined role names | Created based on business needs Only effective within the workspace where created |
2.3 User Management Flow
Understanding how users flow through Singdata Lakehouse:
2.4 Role Permission Scope Description
3. Key Concept: Two Inventory Perspectives (Must Read)
3.1 Workspace-Level Inventory vs Instance-Level Inventory
| Comparison Dimension | Workspace-Level Inventory | Instance-Level Inventory |
|---|---|---|
| Data Source | information_schema (filtered) | Global metadata (requires special permissions) |
| SQL Filter Condition | WHERE workspace_id = current_workspace_id() | No filter; all data visible |
| Visible Scope | Current workspace only | All workspaces |
| Applicable Scenario | Daily permission management | Global security audits |
| Limitations | ❌ Cannot see other workspaces ❌ May misjudge permission redundancy | ❌ Requires elevated permissions ❌ Higher operational complexity |
3.2 Important Note
5. Permission Inventory Practice Steps
Step 1: Clarify the Inventory Level
Step 2: User Role Distribution Analysis
Step 3: Role Usage Analysis
Step 4: Permission Redundancy Detection
Step 5: Generate Inventory Report
6. Best Practice Recommendations
6.1 Tiered Permission Management Strategy
Workspace-Level Management (Daily Operations)
- Frequency: Monthly
- Scope: Current workspace
- Focus:
- Clean up obvious role redundancy within the workspace
- Handle custom roles that have been unassigned for a long time
- Optimize role combinations for users within the workspace
Instance-Level Management (Periodic Audits)
- Frequency: Quarterly
- Scope: All workspaces
- Focus:
- Audit global assignment of system_admin
- Check cross-workspace permission consistency
- Identify cross-workspace account duplication
6.2 Permission Assignment Decision Tree
6.3 Avoiding Common Pitfalls
| Pitfall | Correct Approach |
|---|---|
| Thinking users only exist in workspaces | Understand that users first exist in the instance user pool, then are added to workspaces |
| Judging instance-level role redundancy based solely on workspace-level view | Need instance-level view to confirm global usage |
| Assuming inheritance relationships definitely exist between roles | Actually test and verify the specific permissions of each role |
| Deleting all unused roles at once | Understand the purpose of roles first; process in batches |
| Confusing the management location of instance-level and workspace-level roles | Instance-level roles managed at the instance level; workspace-level roles managed within the workspace |
| Using deprecated roles in SQL | Use instance_admin instead of the soon-to-be-deprecated system_admin |
6.4 Management Tool Selection Recommendations
| Management Task | Recommended Tool | Reason |
|---|---|---|
| Daily user authorization | Studio Web Interface | Intuitive operations, less error-prone |
| Batch permission changes | SQL Scripts | High efficiency, repeatable execution |
| Permission audit reports | SQL queries + Studio | Best results when combined |
| Instance-level management | Studio Management Console | Visual global view |
| Automated monitoring | API + SQL | Suitable for integration into monitoring systems |
6.5 Monitoring Metric Recommendations
-
Workspace-Level Metrics (directly monitorable)
- Role usage rate = Number of assigned roles / Total roles in workspace
- Average roles per user = Total role assignments / Number of users
- Custom role ratio = Number of custom roles / Total roles
-
Instance-Level Metrics (require global permissions)
- system_admin distribution = Number of system_admin users per workspace
- Cross-workspace user duplication rate = Duplicate users / Total users
- Global role standardization level = Number of workspaces using system roles / Total workspaces
7. Automation and Continuous Improvement
7.1 Create Monitoring View
7.2 Periodic Check Script
8. Summary and Recommendations
8.1 Core Takeaways
- Clarify the inventory level: Always be aware of whether you are performing a workspace-level or instance-level inventory
- Understand limitations: Workspace-level inventories cannot see the global picture; major decisions require an instance-level perspective
- Verify assumptions: Do not assume inheritance relationships between roles; actual verification is needed
- Use the right tools: Prioritize the Studio Web interface for daily management; use SQL for batch operations
- Continuous optimization: Establish a regular audit mechanism and continuously improve permission management
8.2 Action Recommendations
- Immediate Actions:
- Log into Studio to view the current permission distribution
- Use the queries in this guide to perform the first workspace-level inventory
- Short-Term Plans:
- Set up a permission change approval process in Studio
- Establish a monthly permission audit mechanism
- Long-Term Goals:
- Achieve automated permission monitoring and optimization
- Establish a cross-workspace permission standardization system
8.3 Getting Help
If you need to perform an instance-level permission audit or have other questions, please:
- View the help documentation in Studio
- Contact your Singdata Lakehouse administrator
- Consult the official Singdata Lakehouse documentation
- Submit a technical support ticket
Appendix: Quick Reference Card
| Task | Workspace-Level Method | Instance-Level Method |
|---|---|---|
| View all users | Studio -> Workspace -> Users or SELECT * FROM information_schema.users | Studio -> Management -> Security -> Users |
| View all roles | Studio -> Workspace -> Roles or SHOW ROLES | Studio -> Management -> Security -> Roles |
| User authorization | Studio interface operations or GRANT ROLE ... TO USER ... | Studio Management Console |
| Calculate role usage rate | SQL queries in this guide | Studio reporting features |
| Discover permission redundancy | Judgment based on current workspace | Comprehensive cross-workspace analysis |
| Clean up unused roles | Custom roles only | Global standardization possible |
Note: This document is compiled based on the Lakehouse product documentation as of June 2025. It is recommended to periodically check the official documentation for the latest updates. Before using in a production environment, be sure to verify the correctness and performance impact of all operations in a test environment.
