Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dev portal

When one Rustybin is the team's mocking service, testers need to find what is on it without the console or its password. The dev portal at /portal is a read-only site that shows only what the operator published: mock APIs (with their MCP servers), the mock MCP servers, the mock LLM, the A2A agents, the HTTP tools and the mock MCP registry. Testers read the docs, send requests from the page, download collections and copy connection snippets.

For operators

Publish

Every item has a stable id:

IdWhat the portal shows
mock:<name>A mock API: base URL, authentication with the demo credentials it accepts, every operation with Try it and curl, the full API reference, downloads (Postman, Hurl, curl, .http, k6, Bruno, Insomnia), the mock's MCP server with claude mcp add and the mcpServers JSON, and its registry entry when the registry is published
mcp:main, mcp:protected, mcp:apikey, mcp:sse, mcp:weather, mcp:crm, mcp:devtoolsOne of the mock MCP servers: URL, transport, the auth it expects, its tools and their input schemas, connection snippets, a link to the console's inspector
llmThe mock LLM: every provider's base URL and routes, a sample request per provider with Try it, the headers that shape answers
a2a:<agent>An A2A agent: its card, skills, a sample message with Try it
toolsThe echo, status, shaping, streaming, redirect, auth, GraphQL, SOAP, WebSocket and reliability routes of the catalogue, with their examples
registryThe mock MCP registry: its URL, scenario and a sample list call

Publish from the console (a mock's page: Publish to portal; or Management, Portal, one item or several at once), from rustybin.yaml, or with the API:

PUT {{base_url}}/_rustybin/portal/items/mock:inventory
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{
  "title": "Inventory",
  "summary": "Stock levels by SKU. **SKU-0** is always sold out.",
  "tags": ["retail", "demo"],
  "contact": "platform-team@example.com"
}
HTTP 201
[Asserts]
jsonpath "$.published.title" == "Inventory"
jsonpath "$.published.credentials" == true
jsonpath "$.hidden" == null
Field
titleAt most 120 characters; empty uses the item's own (the spec's title, the agent's name)
summaryMarkdown, at most 2000 characters; empty uses the item's own description
tagsAt most 10, shown on the cards and searched
contactWho testers ask about it
orderLower comes first within its kind (-1000 to 1000)
credentialsA mock only: show the demo credentials it accepts (default true). Mocked security keys gate a mock, not anything real; turn this off when testers should ask for one
accessopen (default) or closed: see open and closed items
secureNot stored: with access: closed on a mock that cannot be closed as it is, turn its security on with credentials of its own (random ones in place of the defaults) and deploy it first (needs mocks.write)

A second PUT updates the entry (it keeps its publish time); DELETE removes it. Publishing a mock needs the rights to change it, everything else needs admin. A mock that is not deployed stays hidden until it is (GET /_rustybin/portal says why an item is hidden). On a self-service instance, visitors may publish their own mocks when portal.visitors is on: their entries carry a visitor badge and leave with the visit.

PUT {{base_url}}/_rustybin/portal/items/mcp:main
Authorization: Bearer {{admin_token}}
HTTP 201

PUT {{base_url}}/_rustybin/portal/items/llm
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "summary": "Point your SDK at these base URLs.", "order": 1 }
HTTP 201
DELETE {{base_url}}/_rustybin/portal/items/llm
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.published" == false

In the console, Write with AI in the publish dialog of a mock writes the title, summary and tags from the spec (the summarise_for_portal task of AI assist); you check them before you publish.

Publish from rustybin.yaml

A portal: section in the config file publishes items as code; they reload with the file, and the API refuses to change them (409):

version: 1
mocks:
  - name: orders
    spec: specs/orders.yaml
portal:
  items:
    - id: mock:orders
      title: Orders
      summary: Create and track orders with the API key the portal shows you.
      tags: [commerce]
      access: closed
    - id: mcp:main
    - id: llm

A document pulled from git may close an item but never open a closed one: that entry is reported in problems and the item stays closed. Nor does it change portal.auth or portal.base_url (who reads the portal, and where Try it sends a tester's key): those settings are reported and kept. An entry that closes a mock which cannot be closed (see below) is reported and skipped (give the mock's security credentials of its own in the same document: the mocks section is applied first). A config file (RUSTYBIN_CONFIG_FILE) that closes such a mock is reported at load, in the mocks' load errors, and the mock refuses every call until it is secured.

The branding and access settings below are included under settings in the version 2 instance document, alongside published items.

Turn it on, brand it, lock it

Settings under Management, Portal (or PATCH /_rustybin/settings), seeded by their variables (see configuration):

SettingVariable
portal.enabledRUSTYBIN_PORTALauto (default): on once something is published; on; off (/portal answers 404)
portal.authRUSTYBIN_PORTAL_AUTHopen (default), password, key
portal.base_urlRUSTYBIN_PORTAL_BASE_URLThe URL testers should call when a gateway sits in front of the instance: snippets, collections and Try it use it
portal.title, portal.intro, portal.accent, portal.contactThe header, the home page's introduction (Markdown), the accent colour (rust, blue, green, purple, teal, slate), the footer's contact
portal.visitorsRUSTYBIN_PORTAL_VISITORSVisitors may publish their own mocks

With nothing published the portal is off:

GET {{plan_url}}/portal/api/catalog
HTTP 404
[Asserts]
jsonpath "$.error" == "the portal is off"

Who may read it. portal.auth is the switch for the whole portal; each item's access sits on top of it:

portal.authSigned outA portal reader
open (default)Reads every item; uses the open ones, a closed one is lockedUses everything
passwordThe home page asks to sign in (401); every item counts as closedUses everything
keyAn API key of the key registry reads the open items, which Try it then sends with every call (X-Rustybin-Key); a closed one is locked until the sign-inUses everything

A portal reader is a user holding portal.read signed in to the portal (below), or a request with a bearer control credential that resolves portal.read (the admin token, a control JWT, a console sign-in token), for scripts that download collections. The page itself always loads (it holds no data):

PATCH {{base_url}}/_rustybin/settings
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "values": { "portal.auth": "password" } }
HTTP 200

GET {{base_url}}/portal/api/catalog
HTTP 401
[Asserts]
jsonpath "$.auth" == "password"

GET {{base_url}}/portal/api/catalog
Authorization: Bearer {{admin_token}}
HTTP 200

GET {{base_url}}/portal/
HTTP 200

The full API reference page of a mock (/portal/reference/mock:<name>) is read by everyone in open and key mode, closed item or not: it shows the mock's spec, which is public at /mock/<name>/_rustybin/openapi.json anyway and holds no credential. With portal.auth=password it needs a reader (the page load carries the portal's cookie).

Open and closed items

Each published item is open or closed. A closed item is read by everyone who reaches the portal (its docs, operations, schemas, spec and reference) but used only by a reader: Try it, the demo credentials, the snippets and collections that carry them and the MCP connection details unlock after the sign-in. The calls themselves need the credentials too: a mock closes only when every operation needs a credential of its own that only the portal hands out, so a call from someone who never signed in is refused by the mock:

The mock's mocked securityCloses?
OffNo (security_off)
api_key mode, keys of its ownYes
basic mode, users of its ownYes
api_key with demo-key, basic with demo / demo (the documented defaults)No (default_credentials)
jwt or bearer modeNo (obtainable_credentials): the built-in identity provider's demo client is public, so anyone mints a JWT the mock accepts
spec modeOnly when each alternative of every requirement includes an API key or Basic scheme with values of its own; OAuth 2, OpenID Connect and bearer schemes take a JWT anyone mints, mutualTLS the downloadable demo client certificate (obtainable_credentials)
Every operation public (marked public, or in spec mode without a requirement)No (open_operations)
An event mock (made from an AsyncAPI document)No (open_channels): mocked security guards operations, and a channel answers whoever connects

Operations declared public (marked public in the mock's operation settings, or in spec mode without a security requirement) answer anyone by design, closed or not: a health check stays open while the rest of the API needs the key.

On a shared-mode instance (or with RUSTYBIN_REQUIRE_KEY) every call already needs an API key of the registry, so a mock closes on the keys alone.

# Closed: everyone reads it, only portal readers use it.
PUT {{base_url}}/_rustybin/portal/items/mock:inventory
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "access": "closed" }
HTTP 200
[Asserts]
jsonpath "$.published.access" == "closed"
jsonpath "$.secured" == true

Signed out, the catalogue answers a closed item with locked: true and without the demo credentials (the curl lines show a placeholder such as <api-key>), the collection links and the MCP connection snippets; the collections answer 401; a view is counted for everyone, a Try it only for readers:

GET {{base_url}}/portal/api/catalog
HTTP 200
[Asserts]
jsonpath "$.items[0].id" == "mock:inventory"
jsonpath "$.items[0].access" == "closed"
jsonpath "$.items[0].locked" == true
jsonpath "$.items[0].detail.operations[?(@.id == 'getItem')].curl" contains "x-api-key: <api-key>"
jsonpath "$.items[0].detail.downloads" count == 0
body not contains "docs-inventory-key"

GET {{base_url}}/portal/api/items/mock:inventory/collections/hurl
HTTP 401
[Asserts]
jsonpath "$.reason" == "signin_required"

# The calls need the credentials too.
GET {{base_url}}/mock/inventory/items/SKU-1
HTTP 401
# A script keeps a header: a bearer control credential with portal.read.
GET {{base_url}}/portal/api/catalog
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.portal.reader" == true
jsonpath "$.items[0].locked" == false
body contains "docs-inventory-key"

GET {{base_url}}/portal/api/items/mock:inventory/collections/hurl
Authorization: Bearer {{admin_token}}
HTTP 200

Closing a mock that cannot be closed is refused with 409: reason (above), the error naming why and the fix, and closable_modes (api_key, basic). secure: true (the console's Turn on security and close) turns its security on, replaces every default credential (demo-key, demo / demo, demo-token) with a random one, keeps the mode the spec declares (or basic) when that closes it and uses api_key otherwise, deploys it and closes the entry in one step; a signed-in reader then gets the new credentials on the portal. Everything that could refuse the publish (the metadata, a full portal, the config file) is checked first, so a refused publish changes nothing. It is refused while the mock has a draft that is not deployed (deploying it would put other changes live), and when every operation is public.

While the item is closed the mock keeps such a revision: a deploy, rollback, document (trusted or pulled), file reload or checkpoint restore that would turn its security off or put the default credentials back is refused with 409 (the document's problems say so). A mock deleted and created again under the same name finds its item still closed: until it is secured it answers every call 403 (closed_unsecured), and GET /_rustybin/portal warns about it. Closed items from before this rule (a mock closed behind demo-key) do the same: send secure: true again.

POST {{base_url}}/_rustybin/mocks
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{
  "name": "docs-open-api",
  "deploy": true,
  "spec": {
    "openapi": "3.0.3",
    "info": {"title": "Quotes", "version": "1.0"},
    "paths": {"/quotes": {"get": {"operationId": "listQuotes",
      "responses": {"200": {"description": "Quotes", "content": {"application/json": {"example": [{"id": 1}]}}}}}}}
  }
}
HTTP 201

# No mocked security: closing it is refused, naming the fix.
PUT {{base_url}}/_rustybin/portal/items/mock:docs-open-api
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "access": "closed" }
HTTP 409
[Asserts]
jsonpath "$.reason" == "security_off"

# secure: true turns it on (api_key: the spec declares none) with a random
# key in place of demo-key, deploys it and closes it.
PUT {{base_url}}/_rustybin/portal/items/mock:docs-open-api
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "access": "closed", "secure": true }
HTTP 201
[Asserts]
jsonpath "$.secured_now" == true
jsonpath "$.published.access" == "closed"

GET {{base_url}}/mock/docs-open-api/quotes
HTTP 401

# The documented default key opens nothing.
GET {{base_url}}/mock/docs-open-api/quotes
x-api-key: demo-key
HTTP 401

# The key it has now is what a signed-in reader gets.
GET {{base_url}}/_rustybin/mocks/docs-open-api
Authorization: Bearer {{admin_token}}
HTTP 200
[Captures]
key: jsonpath "$.settings.security.api_key.keys[0]"

GET {{base_url}}/mock/docs-open-api/quotes
x-api-key: {{key}}
HTTP 200

# While the item is closed, its security stays on.
PATCH {{base_url}}/_rustybin/mocks/docs-open-api
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "security": { "enabled": false }, "deploy": true }
HTTP 409
[Asserts]
jsonpath "$.error" contains "closed on the dev portal"
# A token anyone can mint closes nothing: the built-in identity provider's
# demo client is public.
POST {{base_url}}/_rustybin/mocks
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{
  "name": "docs-jwt-api",
  "deploy": true,
  "security": { "enabled": true, "mode": "jwt" },
  "spec": {
    "openapi": "3.0.3",
    "info": {"title": "Tokens", "version": "1.0"},
    "paths": {"/things": {"get": {"operationId": "listThings",
      "responses": {"200": {"description": "Things", "content": {"application/json": {"example": [{"id": 1}]}}}}}}}
  }
}
HTTP 201

PUT {{base_url}}/_rustybin/portal/items/mock:docs-jwt-api
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{ "access": "closed" }
HTTP 409
[Asserts]
jsonpath "$.reason" == "obtainable_credentials"
jsonpath "$.closable_modes" count == 2

The other kinds of item (mcp:*, llm, a2a:*, tools, registry) are built-in endpoints: closing one hides its credentials and connection snippets (and the tools' examples, and any hint at how to get through), but the endpoints stay callable without the portal sign-in, mcp:apikey (any non-empty key unless the operator set one) and mcp:protected (a token from the built-in identity provider) included. The publish answer's note and the publish dialog say so.

Portal logins

A tester gets a login that opens the portal and nothing in the console: invite them with the portal_reader role (Management, Users and roles, Invite a portal reader; rustybin users invite <name> --role portal_reader; the invite_user tool; users: of rustybin.yaml). The invitation links to the portal's join page, /portal/#/join/<token>, where they choose a password and land on the portal signed in. Every built-in role holds portal.read, so any user reads closed items; a portal_reader holds nothing else. See users and roles.

PUT {{password_url}}/_rustybin/portal/items/mock:docs-closed
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "title": "Payments", "access": "closed" }
HTTP 201
[Asserts]
jsonpath "$.published.access" == "closed"
POST {{password_url}}/_rustybin/users
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "name": "docs-tess", "display_name": "Tess Tester", "roles": ["portal_reader"] }
HTTP 201
[Captures]
tess_id: jsonpath "$.user.id"
invitation: jsonpath "$.invitation.token"
[Asserts]
jsonpath "$.invitation.url" contains "/portal/#/join/rbi_"
# The tester opens the link and chooses a password: signed in to the portal.
POST {{password_url}}/_rustybin/join
Content-Type: application/json
{ "token": "{{invitation}}", "password": "tess-secret-k3Qx", "portal": true }
HTTP 200
[Asserts]
jsonpath "$.joined" == true
jsonpath "$.portal_only" == true
jsonpath "$.token" not exists
header "Set-Cookie" contains "rustybin_portal="
header "Set-Cookie" contains "HttpOnly"
header "Set-Cookie" contains "SameSite=Strict"
header "Set-Cookie" contains "Path=/portal"

The Sign in button in the portal's header posts the user name and password to /portal/api/login, which checks them exactly as the console sign-in does (the same throttle, shared with /_rustybin/login: 5 failures per address and user name a minute, 20 at one user name from every address together; a disabled user answered as a wrong password) and sets the rustybin_portal cookie: HttpOnly, SameSite=Strict, Secure behind HTTPS, Path=/portal, 12 hours. It is accepted under /portal only, never by the control plane, the data plane or /_rustybin/mcp. Permissions are resolved at every request, so a role removed or a user disabled loses the closed items on the next one; Sign out (POST /portal/api/logout) ends the session (portal sign-outs are kept in a list of their own, so a loop of portal sign-ins and sign-outs never pushes out a console sign-out), and so do "sign out everywhere" and disabling the user. GET /portal/api/session says who is signed in.

GET {{password_url}}/portal/api/session
HTTP 200
[Asserts]
jsonpath "$.signed_in" == false
jsonpath "$.signin" == true

GET {{password_url}}/portal/api/catalog
HTTP 200
[Asserts]
jsonpath "$.items[0].title" == "Payments"
jsonpath "$.items[0].locked" == true
jsonpath "$.items[0].detail.operations[0].curl" contains "<api-key>"
body not contains "docs-closed-key"
GET {{password_url}}/portal/api/session
HTTP 200
[Asserts]
jsonpath "$.signed_in" == true
jsonpath "$.user" == "docs-tess"
jsonpath "$.display_name" == "Tess Tester"
jsonpath "$.reader" == true

GET {{password_url}}/portal/api/catalog
HTTP 200
[Asserts]
jsonpath "$.items[0].locked" == false
body contains "docs-closed-key"

GET {{password_url}}/portal/api/items/mock:docs-closed/collections/curl
HTTP 200
[Asserts]
body contains "docs-closed-key"

# The cookie opens nothing outside /portal.
GET {{password_url}}/_rustybin/config
HTTP 401
POST {{password_url}}/portal/api/logout
HTTP 200
[Asserts]
jsonpath "$.signed_out" == true
jsonpath "$.ended" == true
header "Set-Cookie" contains "Max-Age=0"

GET {{password_url}}/portal/api/items/mock:docs-closed/collections/curl
HTTP 401
POST {{password_url}}/portal/api/login
Content-Type: application/json
{ "username": "docs-tess", "password": "tess-secret-k3Qx" }
HTTP 200
[Asserts]
jsonpath "$.signed_in" == true
jsonpath "$.reader" == true
header "Set-Cookie" contains "rustybin_portal="

POST {{password_url}}/portal/api/login
Content-Type: application/json
{ "username": "docs-tess", "password": "not-the-password" }
HTTP 401
[Asserts]
jsonpath "$.reason" == "invalid_credentials"

A portal_reader who signs in to the console is told the account opens the API portal and sent there, signed in (/_rustybin/login answers portal_only and sets the portal's cookie; the console does not keep its token):

# The console sign-in of a portal reader says so (the console sends it to the portal).
POST {{password_url}}/_rustybin/login
Content-Type: application/json
{ "username": "docs-tess", "password": "tess-secret-k3Qx" }
HTTP 200
[Asserts]
jsonpath "$.portal_only" == true
jsonpath "$.portal_url" == "/portal/"

Insights

The portal counts, per item, views per day (30 days), downloads by format and Try it calls. No identifier of a visitor is stored: counts only, bounded, saved in <state>/portal.json with the published items (at most every 30 seconds, so a restart may lose the last few counts). Management, Portal shows them next to the items; GET /_rustybin/portal/insights returns them:

GET {{base_url}}/_rustybin/portal/insights
HTTP 200
[Asserts]
jsonpath "$.items[?(@.id == 'mock:inventory')].views_7d" == 1
jsonpath "$.items[?(@.id == 'mock:inventory')].downloads.hurl" == 1

Without RUSTYBIN_STATE_DIR published items and counts live in memory and are lost on a restart; portal.items in rustybin.yaml is the durable way then.

For testers

Open /portal. The home page lists what is published by kind (APIs, event APIs, MCP servers, LLM, agents, tools, registry), with a search box and a "new this week" strip (published or changed in the last seven days). An item's page has everything to start: the base URL, how to authenticate, Try it on every operation or sample (sent from your browser, through the gateway when the operator set one), copyable curl commands and connection snippets, and downloads.

The portal reads one endpoint, GET /portal/api/catalog: only published items, with what their pages show. A rendered catalogue is cached; the instance renders a new one at most 30 times a minute in all (a host name it has not seen, a publish), and past that a cache miss answers 503 with Retry-After while cached catalogues keep being served. It carries an ETag:

GET {{base_url}}/portal/api/catalog
HTTP 200
[Asserts]
header "ETag" exists
jsonpath "$.portal.title" == "API portal"
jsonpath "$.kinds[*].id" contains "api"
jsonpath "$.items" count == 3
jsonpath "$.items[0].id" == "mock:inventory"
jsonpath "$.items[0].detail.base_url" endsWith "/mock/inventory"
jsonpath "$.items[0].detail.security.api_key.header" == "x-api-key"
jsonpath "$.items[0].detail.operations[?(@.id == 'getItem')].curl" contains "x-api-key: docs-inventory-key"
jsonpath "$.items[?(@.id == 'mcp:main')].detail.claude" contains "claude mcp add --transport http rustybin-main"
jsonpath "$.items[?(@.id == 'llm')].detail.providers[0].base_url" endsWith "/ai/openai/v1"
[Captures]
etag: header "ETag"
GET {{base_url}}/portal/api/catalog
If-None-Match: {{etag}}
HTTP 304
GET {{base_url}}/portal/
HTTP 200
[Asserts]
header "Content-Type" startsWith "text/html"
body contains "<meta name=\"rustybin-portal-auth\" content=\"open\">"

Downloads come from /portal/api/items/<id>/collections/<format>, views and Try it calls are reported to /portal/api/events:

GET {{base_url}}/portal/api/items/mock:inventory/collections/hurl
HTTP 200
[Asserts]
header "Content-Disposition" contains "inventory.hurl"
body contains "/mock/inventory"
GET {{base_url}}/portal/reference/mock:inventory
HTTP 200
[Asserts]
header "Content-Type" startsWith "text/html"
header "Content-Security-Policy" == "sandbox allow-scripts allow-popups allow-popups-to-escape-sandbox"
body contains "api-reference"
body contains "integrity=\"sha384-"
body contains "/mock/inventory"
POST {{base_url}}/portal/api/events
Content-Type: application/json
{ "item": "mock:inventory", "event": "view" }
HTTP 204

Event APIs

A mock made from an AsyncAPI document has channels and no operations. Published, it is an event API: its catalogue entry has the kind event (the home page lists it under Event APIs) and its page shows each channel: the address in the document, the URL (/events/<name>/<channel>), what Rustybin publishes on it and on which pattern, what it accepts from a client, an example of every message, and a connection snippet for a WebSocket, for server-sent events and for publishing a message. What is made from operations is not there: no Try it, no collection (/portal/api/items/<id>/collections/<format> answers 404 with the reason event_api, as does /portal/reference/<id>) and no MCP server. An event API has no credential to hand out and cannot be closed unless the instance asks every call for an API key; a closed one keeps its channels, messages and addresses for everyone and its connection snippets for readers.

# On the dev portal an event mock is an event API: its channels, what each
# publishes and accepts, and how to connect.
PUT {{base_url}}/_rustybin/portal/items/mock:order-events
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{
  "summary": "What happens to an order, as events."
}
HTTP 201

GET {{base_url}}/portal/api/catalog
HTTP 200
[Asserts]
jsonpath "$.kinds[?(@.id == 'event')].title" contains "Event APIs"
jsonpath "$.items[?(@.id == 'mock:order-events')].kind" contains "event"
jsonpath "$.items[?(@.id == 'mock:order-events')].detail.asyncapi" contains "3.0.0"
jsonpath "$.items[?(@.id == 'mock:order-events')].detail.channels[0].address" contains "orders/created"
jsonpath "$.items[?(@.id == 'mock:order-events')].detail.channels[0].send[0].name" contains "orderCreated"
jsonpath "$.items[?(@.id == 'mock:order-events')].detail.channels[0].connect.sse" contains "text/event-stream"

Routes

Route
GET /portal, GET /portal/, GET /portal/{*path}The portal (embedded in the binary, no CDN; strict CSP)
GET /portal/api/catalogThe published items
POST /portal/api/events{item, event: "view" | "try"}
GET /portal/api/items/{id}/collections/{format}A published mock as a collection (404 event_api for an event API: it has no operations)
GET /portal/reference/{id}A published mock's spec in the API reference viewer (pinned and sandboxed like /docs, the spec inlined; 404 event_api for an event API)
POST /portal/api/login, POST /portal/api/logout, GET /portal/api/sessionThe portal sign-in: the rustybin_portal cookie
GET /_rustybin/portalThe console's view: settings, every publishable item, why a published one is hidden, its counters
PUT, DELETE /_rustybin/portal/items/{id}Publish or update (with access, and secure to turn a mock's security on to close it), unpublish
GET /_rustybin/portal/insightsThe counters

/portal/* is never captured by the inspector, ignores fault-injection headers, and is exempt from the key layer (the portal checks portal.auth and each item's access itself). GET /_rustybin/portal answers each item's access, whether a mock is secured (it can be closed; else closable says why, and warning when it is closed all the same), a note on the other kinds of item (closing hides, the endpoint stays callable), the number of closed items and the readers (enabled users holding portal.read, and those whose login opens only the portal).

GET {{base_url}}/_rustybin/portal
HTTP 200
[Asserts]
jsonpath "$.mode" == "auto"
jsonpath "$.items[?(@.id == 'mock:inventory')].kind" contains "api"
jsonpath "$.items[?(@.id == 'mcp:main')].state" contains "serving"
jsonpath "$.items[?(@.id == 'a2a:weather')].title" contains "Weather Agent"

On every surface

The same job from the API, the console, the command line, an agent and the configuration document.

SurfaceWhere
APIGET /_rustybin/portal, PUT (with access and secure), DELETE /_rustybin/portal/items/{id}, GET /_rustybin/portal/insights; what testers read: /portal, /portal/api/catalog, /portal/api/items/{id}/collections/{format}, /portal/reference/{id}, the sign-in /portal/api/login, /logout, /session
ConsoleManagement, Portal (status, branding, items with a lock on closed ones, the reader count, insights, Preview), Publish to portal on a mock's page (Open or Closed, Turn on security and close), Management, Users and roles, Invite a portal reader; the portal itself: Sign in, the lock, Sign out, the join page
CLIrustybin portal status | publish <id> [--access open|closed] [--secure] | unpublish <id> | insights | branding | open, rustybin users invite <name> --role portal_reader (reference)
Management MCPlist_portal_items (each item's access), publish_portal_item (access, secure), unpublish_portal_item, set_portal_branding, get_portal_insights, invite_user with the portal_reader role; the prompt publish_portal; the resource rustybin://portal/catalog (agent page)
rustybin.yamlportal.items (the published items with their metadata and access; a pulled document may close, never open), settings: portal.* (the whole instance as code)
EnvironmentRUSTYBIN_PORTAL, RUSTYBIN_PORTAL_AUTH, RUSTYBIN_PORTAL_BASE_URL, RUSTYBIN_PORTAL_VISITORS (configuration)