Endpoint security and rate limits

Infra > Endpoint security, Infra > Endpoint rate limits and Infra > Endpoint audit are three entries onto one inventory: the operations the gateway reads from a route's OpenAPI spec. Security asks who may call this, rate limits ask how much, audit asks which calls to record (Enterprise, see auditing a route's operations). This page covers the first two.

Before you start

The screen only lists routes that expose an OpenAPI spec. If none does, it says so and points you at Routes: declare the spec on the route's Target section, either published by the service or deposited as a file, then come back.

What you do here

  1. Pick the route in the selector at the top. Its title, format and version appear beside it. Arriving from a route's editor preselects it.
  2. Find the operation. The table lists method, path, tags and description. The method and tag column headers are filters; the path column sorts. The footer counts what is covered: N operations, M secured (or M bounded).
  3. Click the row. The operation opens in a drawer, with its operation id and the section this page is about.
  4. Write the rule. There is no Save button: the footer says Saving... then All changes saved.

On the security page

The drawer carries one switch, Override the route's rule.

Level What it requires
Anyone Nothing: delegated. Everyone through, signed in or not; the service decides
Signed in Any account, including one that belongs to no tenant yet
In a tenant A tenant must be active on the session
In one of these tenants The active tenant must be one of those named
Nobody Refused before the service is called

The route's own rule offers one more level, With capabilities (A route's access rule). It is posed on the whole route, never on one operation.

An operation's drawer, override on: POST /admin/reindex closed to everybody at the level Nobody, with one user always allowed

An operation's drawer once the override is on, here POST /admin/reindex on Orders API: the level Nobody, and one operator under Users always allowed. The same editor as a route's Security section: the level, the roles (any one grants access, held in the active tenant), and the named users. The step-by-step is on Per-endpoint security.

Named users are an exception, not a level: whoever is listed passes whatever the level requires. That is how a service account or a support login gets through a rule written for everyone else.

Whatever you choose, the service still applies its own rules. This screen adds conditions, it never removes any - which is why the open end is called delegated and not public.

On the rate limits page

The rate limits page: the bounds an operation carries, in the first column

The drawer holds the operation's own bounds, on top of the route's, which still apply. A bound is a counter, and you choose what it is keyed on:

Key One budget per
The whole operation everything it carries, whoever is calling
Each user signed-in account (anonymous callers are not covered)
Each API token token, so an integration is bounded without bounding its owner
Each tenant tenant - a quota sold to a customer
Each address client address, the only key an anonymous caller has

A bound is written with Add a limit: Count by (the key above), the number of Requests, and Every, a window picked from a list (second, 10 seconds, minute, 5 minutes, hour, day). For example, on GET /orders: Each user, 300 requests every minute. The list then reads 300/minute - each user in the operation's first column, as in the picture above.

The second half of a rule says to whom it applies, and it is the same access shape as above: a role becomes a pricing tier without a new concept. Several bounds are true at once, and the first one exceeded answers 429.

Write these for the few operations that need one. A bound on every operation of a large inventory is a counter per operation and per caller.

Traps

See also Routes for the route-wide rule, and Roles for the catalogue these rules name.