Skip to main content
← Back to list
01Issue
FeatureShippedSwamp Club
Assigneesstack72

Relationships

#1485 Document --restricted-model-types flag for swamp serve

Opened by stack72 · 7/30/2026· Shipped 7/31/2026

Problem

Server operators need a way to lock down specific model types (e.g. command/shell) so that only admins can create or run them. The existing grant system has no user:* wildcard subject, so there is no way to write a single "deny all non-admins" grant for a model type — you would need a deny grant per user, which is unmanageable.

Solution

PR #2025 adds --restricted-model-types <types> to swamp serve (and swamp serve daemon enable). It accepts a comma-separated list of model types that require admin on access:* to create or run — the same authorization path used for the built-in access model types (swamp/grant, swamp/group, swamp/server-token).

Usage

swamp serve --auth-mode token --admins 'user:admin-id' --restricted-model-types 'command/shell'

Behavior

  • Non-admin users with run on model:* are denied both [HOST-1] and model.create for restricted types with: Access denied: <principal> does not have 'admin' on access:*
  • Admin users (those with admin on access:*) can create and run restricted types normally
  • Model types are normalized on parse, so denormalized variants (Command::Shell, COMMAND.SHELL, command.shell) are all caught
  • Non-restricted model types are unaffected — non-admin users can still run them per their grants
  • Multiple types can be restricted: --restricted-model-types 'command/shell,custom/dangerous'

Documentation needed

  • Add --restricted-model-types to the serve reference documentation
  • Add an example in the access control / authorization section showing how to lock down command/shell
  • Update the swamp serve --help examples to include a restricted model types example
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/31/2026, 5:04:19 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/31/2026, 3:53:35 PM

Sign in to post a ripple.