Semaphor

Security Definitions

Create and manage reusable security policy templates

Security definitions are reusable policy templates that describe what security rules to apply to a connection. Each definition can include any combination of:

  • Connection-level security (CLS) -- route users to different databases or file paths
  • Schema-level security (SLS) -- restrict which schemas a user can query
  • Row-level security (RLS) -- inject WHERE-clause filters so users only see authorized rows

Once created, a definition can be assigned to one or more actors (tenants, tenant users, or organization users) with concrete parameter values.

Endpoints

MethodEndpointDescription
GETList definitionsList all definitions in a project
POSTCreate a definitionCreate a new definition for a connection
GETGet a definitionRetrieve a single definition
PATCHUpdate a definitionUpdate a definition's name or configuration
DELETEDelete a definitionDelete a definition (must have no assignments)

On this page