mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-27 12:18:59 +00:00
c328b7f49a
Align paid tier names with Sencho's nautical identity. Internal variant
values ('personal'/'team') remain unchanged in code, database, and
Lemon Squeezy integration — only user-facing display names updated.
- Backend: requireTeamPro → requireAdmiral, TEAM_PRO_REQUIRED → ADMIRAL_REQUIRED
- Frontend: TeamProGate.tsx → AdmiralGate.tsx, TierBadge labels updated
- Website: PricingSection tier names and nautical descriptions
- Docs: all 11 affected pages renamed, nautical footnote added to licensing
102 lines
5.0 KiB
Plaintext
102 lines
5.0 KiB
Plaintext
---
|
|
title: RBAC & User Management
|
|
description: Role-based access control for Sencho - manage admin, viewer, deployer, and node admin accounts with scoped permissions.
|
|
---
|
|
|
|
<Note>
|
|
Multi-user support requires a Sencho Pro license. Community Edition supports a single admin account only. Intermediate roles (Deployer, Node Admin) and scoped permissions require **Admiral**.
|
|
</Note>
|
|
|
|
Sencho supports role-based access control with four distinct roles. The classic **Admin** and **Viewer** roles are available on all Pro tiers, while **Deployer** and **Node Admin** are exclusive to Admiral and support scoped permissions per stack or node.
|
|
|
|
## Roles
|
|
|
|
| Role | Description | Tier |
|
|
|------|-------------|------|
|
|
| **Admin** | Full access to all features — deploy, edit, manage users, configure nodes, and more | Pro |
|
|
| **Viewer** | Read-only access to dashboards, logs, stats, and file contents | Pro |
|
|
| **Deployer** | Can deploy, restart, stop, and start stacks — but cannot edit compose files, delete stacks, or access system settings | Admiral |
|
|
| **Node Admin** | Full stack and node management within their scope — cannot access system settings, users, or license management | Admiral |
|
|
|
|
### Permission matrix
|
|
|
|
| Action | Admin | Node Admin | Deployer | Viewer |
|
|
|--------|-------|------------|----------|--------|
|
|
| View stacks, logs, stats | ✅ | ✅ | ✅ | ✅ |
|
|
| Deploy / restart / stop / start stacks | ✅ | ✅ | ✅ | ❌ |
|
|
| Edit compose and `.env` files | ✅ | ✅ | ❌ | ❌ |
|
|
| Create and delete stacks | ✅ | ✅ | ❌ | ❌ |
|
|
| View nodes | ✅ | ✅ | ✅ | ✅ |
|
|
| Add / edit / delete nodes | ✅ | ✅ | ❌ | ❌ |
|
|
| System settings | ✅ | ❌ | ❌ | ❌ |
|
|
| User management | ✅ | ❌ | ❌ | ❌ |
|
|
| License management | ✅ | ❌ | ❌ | ❌ |
|
|
| Webhooks | ✅ | ❌ | ❌ | ❌ |
|
|
| API tokens | ✅ | ❌ | ❌ | ❌ |
|
|
| Host console | ✅ | ❌ | ❌ | ❌ |
|
|
| Audit log | ✅ | ❌ | ❌ | ❌ |
|
|
|
|
## Scoped permissions
|
|
|
|
<Note>
|
|
Scoped permissions require a **Admiral** license.
|
|
</Note>
|
|
|
|
Roles can be scoped to specific stacks or nodes. This means you can grant a user the **Deployer** role globally, but also give them **Node Admin** access on a specific node — or limit a viewer to deploy access on only certain stacks.
|
|
|
|
Scoped permissions **add to** the user's global role. They never reduce it. A user with a global Viewer role plus a scoped Deployer assignment on "my-app" stack can deploy "my-app" but has read-only access to everything else.
|
|
|
|
### Example scenarios
|
|
|
|
- A **Viewer** with a scoped **Deployer** assignment on the `frontend` stack can deploy, restart, and stop only that stack.
|
|
- A **Deployer** with a scoped **Node Admin** assignment on node "staging-server" can manage stacks and nodes on that server, plus deploy globally.
|
|
- A **Node Admin** without any scoped assignments can manage all stacks and nodes but has no access to system settings.
|
|
|
|
## Managing users
|
|
|
|
<Frame>
|
|
<img src="/images/rbac/role-selector.png" alt="User Management with role-based access control" />
|
|
</Frame>
|
|
|
|
Admins can manage accounts in **Settings → Users**. From there you can:
|
|
|
|
- **Create** a new user with a username, password, and role
|
|
- **Edit** an existing user's password or role
|
|
- **Delete** a user account
|
|
|
|
When creating or editing a user on Admiral, you'll see all four role options in the role selector. On Skipper, only Admin and Viewer are available.
|
|
|
|
<Frame>
|
|
<img src="/images/rbac/role-selector-dropdown.png" alt="Role selector showing all four roles on Admiral" />
|
|
</Frame>
|
|
|
|
## Managing scoped permissions
|
|
|
|
When editing a user on Admiral, a **Scoped Permissions** section appears below the user form. Here you can:
|
|
|
|
1. **View** the user's current scoped assignments
|
|
2. **Add** a new scope by selecting a role, resource type (stack or node), and specific resource
|
|
3. **Remove** an existing scope
|
|
|
|
Each scoped assignment grants the specified role's permissions on the specified resource only.
|
|
|
|
## SSO auto-provisioning
|
|
|
|
With a Admiral license, users can also be created automatically when they log in via SSO (LDAP, Google, GitHub, or Okta). SSO users appear in the Users list alongside local accounts. They are assigned a role based on identity provider group membership or claim mapping.
|
|
|
|
SSO users cannot log in with a password — they must always authenticate through their identity provider. After SSO provisioning, an admin can add scoped permissions to SSO users just like local accounts.
|
|
|
|
To set up identity provider authentication, see [SSO Authentication →](/features/sso).
|
|
|
|
## Migration from single-admin setup
|
|
|
|
When you upgrade to Sencho Pro, your existing single-admin credentials are automatically migrated to the new users table. No manual action is required — your login continues to work as before, and your account is assigned the Admin role.
|
|
|
|
## License tiers
|
|
|
|
| Tier | Admin accounts | Non-admin accounts | Intermediate roles | Scoped permissions |
|
|
|------|---------------|-------------------|-------------------|-------------------|
|
|
| **Community** | 1 | 0 | ❌ | ❌ |
|
|
| **Skipper** | 1 | 3 | ❌ | ❌ |
|
|
| **Admiral** | Unlimited | Unlimited | ✅ | ✅ |
|