@superglue/cli 1.1.26 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +12 -0
- package/dist/cli.js +231 -615
- package/dist/skills/superglue/SKILL.md +78 -23
- package/dist/skills/superglue/references/access-rules.md +69 -105
- package/dist/skills/superglue/references/superglue-info.md +1 -2
- package/package.json +1 -1
- package/skills/superglue/SKILL.md +78 -23
- package/skills/superglue/references/access-rules.md +69 -105
- package/skills/superglue/references/superglue-info.md +1 -2
|
@@ -1,147 +1,111 @@
|
|
|
1
1
|
# Access Rules (RBAC)
|
|
2
2
|
|
|
3
|
-
On superglue, roles define
|
|
3
|
+
On superglue, roles define active resource grants for tools and systems. Users can have multiple roles. Roles and access rules are only available on enterprise organizations.
|
|
4
4
|
|
|
5
5
|
## Data Model
|
|
6
6
|
|
|
7
|
-
### Role
|
|
8
|
-
|
|
9
7
|
```typescript
|
|
10
|
-
interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
interface ResourceGrant {
|
|
9
|
+
roleId: string;
|
|
10
|
+
resourceRef: "tool:<encodedId>" | "system:<encodedId>" | "tool:*" | "system:*";
|
|
11
|
+
permissions: Array<"viewer" | "editor">;
|
|
12
|
+
source: "access_rule" | "ownership" | "share";
|
|
13
|
+
grantedByUserId?: string;
|
|
14
|
+
revokedAt?: Date;
|
|
15
|
+
revokedByUserId?: string;
|
|
17
16
|
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### SystemPermission
|
|
21
|
-
|
|
22
|
-
Each system entry is either a predefined access level or a custom rule:
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
type SystemPermission = SystemAccessLevel | { rules: CustomRule[] };
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
| Type | Meaning |
|
|
29
|
-
| ------------------ | ------------------------------------------------ |
|
|
30
|
-
| `"read-write"` | All HTTP methods allowed |
|
|
31
|
-
| `"read-only"` | Only GET and HEAD; POST/PUT/PATCH/DELETE blocked |
|
|
32
|
-
| `{ rules: [...] }` | Custom JS expressions that gate access |
|
|
33
|
-
|
|
34
|
-
Systems not listed in the role's `systems` map are DENIED, unless the system access is set to `"ALL"`.
|
|
35
|
-
|
|
36
|
-
### CustomRule
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
interface CustomRule {
|
|
18
|
+
interface Role {
|
|
40
19
|
id: string;
|
|
41
20
|
name: string;
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
description?: string;
|
|
22
|
+
resourceGrants: ResourceGrant[];
|
|
23
|
+
isBaseRole?: boolean;
|
|
44
24
|
}
|
|
45
25
|
```
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Tool Permissions
|
|
50
|
-
|
|
51
|
-
- `tools: "ALL"` — every tool is allowed, including tools created in the future
|
|
52
|
-
- `tools: ["tool-id-1", "tool-id-2"]` — only these specific tools are allowed; new tools are NOT auto-included (but see Auto-Append below)
|
|
53
|
-
|
|
54
|
-
## System Permissions
|
|
27
|
+
Only active grants where `revokedAt` is empty contribute to access. `editor` implies `viewer`.
|
|
55
28
|
|
|
56
|
-
|
|
57
|
-
- `systems: { "gmail": "read-write", "stripe": "read-only" }` — SPECIFIC mode: per-system access levels; unlisted systems are denied.
|
|
58
|
-
- `systems: { "gmail": { rules: [{ name: "block-deletes", expression: "stepConfig.method !== 'DELETE'", isActive: true }] } }` — custom rule on a specific system
|
|
29
|
+
## Resource Refs
|
|
59
30
|
|
|
60
|
-
|
|
31
|
+
- `tool:<encodedToolId>` — one specific tool.
|
|
32
|
+
- `system:<encodedSystemId>` — one specific system.
|
|
33
|
+
- `tool:*` — every current and future tool.
|
|
34
|
+
- `system:*` — every current and future system.
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
Resource ids are URL-encoded inside `resourceRef`; use shared helpers rather than hand-building refs.
|
|
63
37
|
|
|
64
|
-
|
|
65
|
-
- **Postgres** — SQL statements starting with or containing INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, TRUNCATE, etc. are mutating; everything else (SELECT) is read-only
|
|
66
|
-
- **FTP / SMB** — operations other than `list`, `get`, `exists`, `stat` are mutating
|
|
67
|
-
- **Redis** — commands not in the read-only set (GET, MGET, EXISTS, KEYS, SCAN, TTL, TYPE, HGET, HGETALL, LRANGE, SMEMBERS, SCARD, etc.) are mutating
|
|
68
|
-
- **Transform** — never mutating (pure data transformation, no external system)
|
|
38
|
+
## Permissions
|
|
69
39
|
|
|
70
|
-
|
|
40
|
+
- `viewer` — can see and execute/use the resource.
|
|
41
|
+
- `editor` — can mutate/delete/share the resource and includes `viewer`.
|
|
71
42
|
|
|
72
|
-
|
|
43
|
+
Current configured role access and ownership grants are generally stored as `editor`.
|
|
73
44
|
|
|
74
|
-
|
|
45
|
+
## Grant Sources
|
|
75
46
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
interface StepConfig {
|
|
80
|
-
url: string;
|
|
81
|
-
method: string;
|
|
82
|
-
headers: Record<string, string>;
|
|
83
|
-
queryParams: Record<string, string>;
|
|
84
|
-
body: unknown;
|
|
85
|
-
systemId: string;
|
|
86
|
-
}
|
|
87
|
-
```
|
|
47
|
+
- `access_rule` — explicit admin/Access Rules edit.
|
|
48
|
+
- `ownership` — authorization projection from the resource creator.
|
|
49
|
+
- `share` — explicit user-to-user sharing through the app/agent sharing flow.
|
|
88
50
|
|
|
89
|
-
|
|
51
|
+
Ownership source of truth remains the tool/system row. Ownership grants are a permission projection and should be preserved by ordinary role edits.
|
|
90
52
|
|
|
91
|
-
|
|
92
|
-
// Block all POST requests to a specific endpoint
|
|
93
|
-
stepConfig.method !== "POST" || !stepConfig.url.includes("/admin");
|
|
53
|
+
## Visibility and Execution Surfaces
|
|
94
54
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
!(typeof stepConfig.body === "object" && stepConfig.body?.datasource?.id === "blocked-id");
|
|
103
|
-
```
|
|
55
|
+
- **Tools** — list/detail, agent views, VFS, REST detail, and tool history use tool `viewer`.
|
|
56
|
+
- **Systems** — list/detail, agent views, VFS, docs, credentials, and `sg system call` use system `viewer`.
|
|
57
|
+
- **Execution** — running a tool requires tool `viewer` plus system `viewer` for every referenced system.
|
|
58
|
+
- **Editing** — updating tools/systems requires `editor`.
|
|
59
|
+
- **Runs** — visible only when the user has tool `viewer` and system `viewer` for every captured system.
|
|
60
|
+
- **Schedules** — visibility follows current tool behavior; editing requires tool `editor`.
|
|
61
|
+
- **MCP** — config shows configured tools; runtime registration uses tool `viewer`, and execution still checks referenced systems.
|
|
104
62
|
|
|
105
63
|
## Multi-Role Semantics
|
|
106
64
|
|
|
107
|
-
Users can have multiple roles. Resolution is
|
|
108
|
-
|
|
109
|
-
| Layer | Semantics | Example |
|
|
110
|
-
| ------------ | ------------------------------ | --------------------------------------------------------------------------- |
|
|
111
|
-
| Tools | Union (most permissive wins) | If role A allows tool X and role B doesn't, tool X is allowed |
|
|
112
|
-
| Systems | Union (most permissive wins) | If role A gives READ_ONLY and role B gives READ_WRITE, result is READ_WRITE |
|
|
113
|
-
| Custom rules | Per-role union (any role wins) | If any role's complete rule set allows the request, it goes through |
|
|
65
|
+
Users can have multiple roles. Resolution is union:
|
|
114
66
|
|
|
115
|
-
|
|
67
|
+
| Layer | Semantics |
|
|
68
|
+
| ------- | -------------------------------------------------------------------------- |
|
|
69
|
+
| Tools | If any active grant targets a tool, that grant's permission is effective |
|
|
70
|
+
| Systems | If any active grant targets a system, that grant's permission is effective |
|
|
116
71
|
|
|
117
|
-
|
|
118
|
-
- **Across roles**, evaluation is per-role: if any role fully allows the request (all its rules pass, or it has no custom rule for that system), the request is allowed (OR logic)
|
|
72
|
+
Assigned roles can add access but cannot remove access granted by another role.
|
|
119
73
|
|
|
120
74
|
## Base Roles
|
|
121
75
|
|
|
122
|
-
Every user has exactly
|
|
76
|
+
Every user has exactly one base role:
|
|
123
77
|
|
|
124
|
-
- **`admin`** —
|
|
125
|
-
- **`member`** —
|
|
126
|
-
- **`enduser`** — Default for end users with Credentials-only access. Starts with `tools: []`, `systems: {}` (no access). Tool and system allowlists must be explicitly populated to grant access. Name and description cannot be changed. Cannot be deleted.
|
|
78
|
+
- **`admin`** — full access to everything. The admin role is immutable and has wildcard `editor` grants.
|
|
79
|
+
- **`member`** — default for org team members. New organizations seed it with wildcard `editor` grants for tools and systems. Access-rule grants can be narrowed. Name and description cannot be changed. Cannot be deleted.
|
|
127
80
|
|
|
128
|
-
|
|
81
|
+
Users can also have additional custom roles on top of their base role. Custom roles are fully editable and can be created/deleted.
|
|
129
82
|
|
|
130
83
|
## Personal Roles
|
|
131
84
|
|
|
132
|
-
|
|
85
|
+
Personal roles are per-user containers for ownership, share, and explicit access-rule grants.
|
|
86
|
+
|
|
87
|
+
- Each user can have at most one personal role.
|
|
88
|
+
- Ownership grants are added automatically when a user creates a tool or system.
|
|
89
|
+
- Personal role grants are unioned with the user's other roles.
|
|
90
|
+
- Managed via the Personal Roles tab in Access Rules and backend role APIs.
|
|
91
|
+
|
|
92
|
+
## Sharing Semantics
|
|
93
|
+
|
|
94
|
+
V1 sharing targets organization users only. It does not share directly to base roles or custom roles.
|
|
133
95
|
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
96
|
+
- Sharing writes `source: "share"` grants into the target user's personal role.
|
|
97
|
+
- A user can grant only permissions up to their own effective access: viewer can grant viewer, editor can grant viewer or editor.
|
|
98
|
+
- If the target already has the requested permission or stronger from any active grant, sharing is redundant and should be blocked.
|
|
99
|
+
- If the target has viewer access and the acting user can grant editor, sharing can promote the user to editor through the personal `source: "share"` grant.
|
|
100
|
+
- Sharing a tool also grants viewer access to required systems when the recipient lacks system access.
|
|
101
|
+
- Tool sharing is atomic. If any selected user or required system grant cannot be applied, nothing is shared.
|
|
102
|
+
- Normal users cannot unshare in V1. Admin cleanup should use Access Rules/admin grant management.
|
|
139
103
|
|
|
140
|
-
|
|
104
|
+
## Auto-Grant On Resource Creation
|
|
141
105
|
|
|
142
|
-
When a user creates a new tool or system, the backend automatically
|
|
106
|
+
When a user creates a new tool or system, the backend automatically grants ownership access to the creator's personal role:
|
|
143
107
|
|
|
144
|
-
- New tool created
|
|
145
|
-
- New system created
|
|
108
|
+
- New tool created -> `ownership` grant on `tool:<toolId>` with `editor`.
|
|
109
|
+
- New system created -> `ownership` grant on `system:<systemId>` with `editor`.
|
|
146
110
|
|
|
147
|
-
This only affects the creator's personal role, not base roles or additional custom roles.
|
|
111
|
+
This only affects the creator's personal role, not base roles or additional custom roles.
|
|
@@ -54,7 +54,7 @@ The persistent left sidebar contains these top-level items:
|
|
|
54
54
|
- **Landscape** (`/landscape`) — graph overview of tools, systems, and their connections.
|
|
55
55
|
- **Tools** (`/tools`, detail at `/tools/{toolId}`) — saved tools; opens the tool playground for editing, testing, and running.
|
|
56
56
|
- **Systems** (`/systems`, detail at `/systems/{systemId}`) — connected external systems with credentials and documentation.
|
|
57
|
-
- **My Credentials** (`/credentials`) — credential management. The **My Credentials** section is for personal user-owned system credentials; the **superglue API keys** section is for API keys. Admins and members open it inside the normal app shell from the sidebar
|
|
57
|
+
- **My Credentials** (`/credentials`) — credential management. The **My Credentials** section is for personal user-owned system credentials; the **superglue API keys** section is for API keys. Admins and members open it inside the normal app shell from the sidebar.
|
|
58
58
|
- **Runs** (`/runs`, detail at `/runs/{runId}`) — execution history for full, draft, and single-step tool runs. Runs is a top-level sidebar item, not a Control Panel sub-item.
|
|
59
59
|
- **Control Panel** (`/admin`) — expandable group for organization and account administration:
|
|
60
60
|
- **Overview** (`/admin`) — dashboard summary, including failed-run and schedule summaries.
|
|
@@ -81,7 +81,6 @@ Below the navigation, the sidebar shows the organization switcher and Sign Out.
|
|
|
81
81
|
e. Wrap result: `{ currentItem, data, success }`
|
|
82
82
|
f. On failure: abort if `failureBehavior !== "continue"`
|
|
83
83
|
3. **Output transform** (if present): run JS function, validate against outputSchema
|
|
84
|
-
4. **Response filters** (if present): remove/mask/fail on pattern matches
|
|
85
84
|
|
|
86
85
|
### Strategy Routing
|
|
87
86
|
|