Policies page
The Policies page is where you bundle guardrails into named policies, decide where each policy applies, and check which guardrails a given request would get. Open it at /ui/policies. It sits under AI Gateway in the left nav as Policies.
The nav item is shown to the session roles Admin and Admin Viewer. An Admin Viewer sees the view-only banner, and the buttons that change policies and attachments are hidden. Org admins, internal users and internal viewers do not see it. The page has no extra guard of its own, so a direct visit loads the page and the backend decides what each request may do. The policy routes accept any signed in key and then go through the proxy's role checks. A view only admin can read but every create, update, delete, validate, simulate and test request is refused, because those are write methods that are not on the Admin Viewer allow list. No license feature is checked on this page. The Attachments tab shows a notice that parts of policy attachments will move to Spanway Enterprise in later releases.
The page has four tabs, Templates, Policies, Attachments and Policy Simulator. Templates is open when the page loads. The Templates and Policies tabs start with a dismissible About Policies box that explains policies and links to the guardrail policies documentation. Dismissing it lasts until you reload the page.
A real-world scenario
A company wants the same three guardrails on every frontier model, plus a prompt injection check, without attaching them to each team by hand. The admin creates a frontier-safety policy that adds the guardrails, limits it to frontier models, attaches it gateway wide, and checks with the policy resolver which guardrails a given request would get.
Steps
-
Open Policies under AI Gateway, or go to
/ui/policies, and select the Policies tab. -
Click + Add New Policy, keep Simple Mode, name it
frontier-safety, pick the guardrails and save. The same with the API:curl -X POST http://localhost:4000/policies \-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \-d '{"policy_name": "frontier-safety", "guardrails_add": ["prompt-injection", "pii-mask"]}' -
Attach it on the Attachments tab.
-
Click Validate policies to check that every policy names existing guardrails and has no inheritance cycle.
Expected result
The policy shows in the table with its production version, the attachment lists where it applies, and validation reports no problem.
Templates tab
This tab lists ready made policy templates. Each template is a set of guardrail definitions plus a policy that uses them.
The proxy fetches the template catalogue from a remote source each time the tab loads and falls back to the copy bundled with the proxy if that fails. Set SPANWAY_LOCAL_POLICY_TEMPLATES=true or SPANWAY_AIRGAPPED=true on the proxy to use only the bundled copy and skip the outbound request.
| Control | Type | What it does |
|---|---|---|
| Use AI to find templates | Button | Opens the AI Policy Suggestion dialog described below. |
| Categories | Checkbox list | One checkbox per template tag, with the number of templates that carry it. Selecting several tags shows only templates that have all of them. The list is hidden when no template has tags. |
| Clear all | Link | Appears once a tag is selected and clears every tag filter. |
While a filter is active the tab shows Showing N of M templates. Each template card shows a complexity badge (Low Complexity, Medium Complexity or High Complexity), the title, the description, its tags, Inherits from when the template's policy inherits from another policy, and the Included Guardrails. The Use Template button starts the template flow.
Using a template
Clicking Use Template walks through up to three steps.
- If the template has parameters, the template parameter dialog opens first.
- The guardrail selection dialog opens and creates the guardrails you pick.
- The Create New Policy form opens on the Policies tab, filled in from the template. Nothing is saved as a policy until you submit that form.
The guardrails created in step 2 are real guardrails on the proxy. They stay even if you cancel the policy form afterwards. Remove them from the Guardrails page if you do not want them.
Template parameter dialog
The dialog is titled with the template name and always shows the description Configure competitor blocking for your brand. It shows one text field per template parameter. A required parameter must be filled before Continue is enabled.
Templates that discover competitor names with a model show extra controls.
| Control | Type | What it does |
|---|---|---|
| Use AI or Enter Manually | Radio | Use AI is selected by default and shows the model picker and the generate button. Enter Manually hides them so you type the names yourself. |
| Your Brand Name | Text | Your own brand. It is required. |
| Select Model | Search select | The model that generates competitor names. The list comes from the model hub. |
| Generate Competitor Names | Button | Disabled until a model and a brand name are set. It streams names from the chosen model into the list below. This is a real model call and costs money. |
| Competitor Names | Chips with text input | The names that the competitor guardrail will block. Type a name and press Enter or a comma to add it, press Backspace in the empty input to remove the last name, or click the remove mark on a chip. Duplicates are ignored regardless of case. After generation a note says how many alternate spellings and variations were generated for matching. |
| Refine List | Text with Send | Shown after a first generation in Use AI mode. Type an instruction such as adding more names and press Enter or Send. This calls the model again. |
Continue applies the parameters and moves to the guardrail selection dialog. For competitor templates it needs at least one competitor name. While the guardrails are being prepared the button reads Creating guardrails.... Cancel closes the dialog and abandons the template.
Guardrail selection dialog
The dialog is titled with the template name. When several templates are queued from the AI suggestion flow it also shows a Template N of M badge. A summary line shows the total number of guardrails, how many are new and how many already exist on the proxy.
| Control | Type | What it does |
|---|---|---|
| Select All New | Button | Selects every guardrail that does not exist yet. Shown only when the template has new guardrails. |
| Deselect All | Button | Clears the selection. |
| Guardrail checkbox | Checkbox | One per new guardrail. New guardrails are selected by default. A guardrail that already exists shows an Already exists badge and has no checkbox, so it is never recreated. |
Each row also shows the guardrail type, its mode, and the number of patterns or categories when the definition has them. If a competitor list was generated, an AI-Discovered Competitors box lists the names that the competitor name guardrail will block.
The confirm button reads Create N Guardrails & Use Template when guardrails are selected, or Use Template when none are. It is disabled when nothing is selected and nothing already exists. Each selected guardrail is created on the proxy one by one. If some fail, a warning lists them and says you may need to create them manually. Cancel closes the dialog and clears any queued templates.
AI Policy Suggestion dialog
This dialog asks a model to pick templates that match what you want to block. Every suggestion, discovery and test run here is a real request and can cost money.
| Control | Type | What it does |
|---|---|---|
| Model | Search select, required | The model that analyses your requirements. The list comes from the model hub. |
| Example attack prompts you want to block | Text areas | Up to four example prompts. + Add another example adds a field until there are four. Each field after the first has a remove button. |
| Description of what you want to block | Text area | A plain description of what to block. |
| Suggest Policies | Button | Disabled until a model is chosen and at least one example or the description is filled. It reads Analyzing... while the model works. |
| Cancel | Button | Closes the dialog and clears what you typed. |
The results view says how many templates matched. Every suggested template is selected by default. Each card shows a checkbox, the complexity, an estimated latency badge such as +12ms latency when the template has one, up to four guardrail names with +N more, and the model's reason. A Why these templates box shows the model's overall explanation. If the request fails the explanation reads Failed to get suggestions. Please try again. If nothing matched you see No matching templates found.
| Control | What it does |
|---|---|
| Back | Returns to the input form and keeps what you typed. |
| Test Suggestions | Opens the Test Guardrails panel next to the suggestions. Shown when at least one template is selected. |
| Use N Selected Templates | Closes the dialog and runs the template flow for each selected template in turn. Disabled when nothing is selected or competitor discovery is still running. |
The Test Guardrails panel lists the selected templates and how many guardrails they contain. When a selected template needs competitor discovery, a box asks for your brand name with a Discover button (Re-discover after a run). Input Text takes the text to test, shows a character count, and submits on Enter (Shift+Enter adds a line). The test button reads Test N guardrails. The results show counts for Blocked, Masked, Passed and Other, then one card per guardrail with its action. A masked result shows the Output Text, a blocked result shows Details, and a passing one says Passed unchanged. If the templates have nothing that can be tested you see No testable guardrails in selected templates. The test runs the template guardrail definitions against your text without creating them.
Policies tab
The tab has a + Add New Policy button, a validation strip and the policy table. Clicking a policy name replaces the table with the policy details view.
Policy validation
The strip says it checks that every enforced policy references existing guardrails and parents, with no inheritance cycles. Validate policies sends the production version of every policy (and every policy from the config file) to the proxy. It is disabled while a check runs (it reads Validating) and when there are no policies. The result shows Enforced policies are valid, or a count of blocking errors with one line per error, plus a separate list of warnings when there are any. If the request fails you see Could not validate policies with the error.
Policy table
The table shows one row per policy name. A policy saved in the database can have several versions, and the row shows the production version, or the highest version number when none is in production. A policy defined in the config file gets its own row. The table sorts by Name ascending by default, paginates in the browser with 25, 50 or 100 rows per page, and shows No policies found when there are none.
| Column | Meaning |
|---|---|
| Name | The policy name. A badge shows N versions when the policy has more than one version, or Config for a policy from the config file. Click the name to open the details view. Config policy names are not clickable. Sortable. |
| Description | The description, truncated. |
| Inherits From | The parent policy, if any. |
| Guardrails (Add) | Up to two guardrails the policy adds, with a +N badge whose tooltip lists the rest. |
| Guardrails (Remove) | Up to two guardrails the policy removes from what it inherits, with a +N badge for the rest. |
| Model Condition | The model name or pattern that limits where the policy runs. A dash means all models. |
| Created At | When the shown version was created. Sortable. |
| Actions | A menu with Edit policy and Delete policy. The column is shown only to a proxy admin, never to an Admin Viewer. Both items are disabled for config policies, with a tooltip that says config policies can only be changed in the config file. |
Edit policy opens the Flow Builder for that policy, whatever mode it was created in.
Delete policy opens a Delete Policy dialog that names the policy and asks you to confirm, with the policy name, ID, description and parent. The dialog says it deletes every version of the policy and gives the number of versions, including the production version, so the gateway stops applying the policy. Click Delete to confirm or Cancel to keep it. The delete removes every version of the name, and a delete cannot be undone.
Create New Policy dialog
+ Add New Policy first asks how you want to build the policy.
| Option | What it means |
|---|---|
| Simple Mode | Pick guardrails from a list, and they all run in parallel. Selected by default. |
| Flow Builder | Marked NEW. Define steps, conditions and error responses. Choosing it shows a note that you will be taken to the Flow Builder. |
The confirm button reads Create Policy for Simple Mode (it opens the form below) or Continue to Builder for the Flow Builder. Cancel closes the dialog.
The Simple Mode form has these fields.
| Field | Type | What it does |
|---|---|---|
| Policy Name | Text, required | The policy name. It may contain only letters, numbers, hyphens and underscores. Placeholder e.g., global-baseline, healthcare-compliance. |
| Description | Text area | Optional description. |
| Inherit From | Search select | An optional parent policy. The child gets every guardrail the parent resolves to. |
| Guardrails to Add | Multi select | Guardrails this policy adds to matching requests. The options are the guardrails on the proxy. |
| Guardrails to Remove | Multi select | Guardrails to take away from what the parent provides. |
| Model Condition Type | Radio | Select Model (default) or Custom Regex Pattern. Switching clears the model field. |
| Model (Optional) or Regex Pattern (Optional) | Search select or text | Limits the policy to one model, or to models whose name matches the pattern, such as gpt-4.* or bedrock/.*. Leave it empty to run the policy on all models. The model list comes from the models you can access. |
Under the guardrail fields a Resolved Guardrails box previews the final set of guardrails after inheritance, additions and removals. Create Policy saves the policy and Cancel discards it. A new policy is saved as version 1 in production, so it takes effect wherever it is attached right away.
Policy details view
The details view opens when you click a policy name. Back to Policies returns to the table. Edit Policy opens the Flow Builder and is shown only to a proxy admin.
| Row | Meaning |
|---|---|
| Policy ID | The ID of the version shown. |
| Description | The description, or No description. |
| Inherits From | The parent policy, or None. |
| Created At and Updated At | Timestamps in your browser's time zone. |
If the policy has a pipeline, a Pipeline Flow section shows the mode and the number of steps, then a read only drawing of each step with its guardrail and its action on pass, on fail and on an API failure. When no API failure action is set, it shows the fail action with the words same as on fail.
Guardrails Configuration shows a Resolved Guardrails box with the final guardrails after inheritance, then Guardrails to Add and Guardrails to Remove. Conditions shows the Model Condition, or No model condition (applies to all models).
For database policies a Versions section has a Compare versions button. It loads every version of the policy name. With only one version you see This policy has only one version. Otherwise pick a version in From and in To (each labelled with its number and status, for example v2 (draft)) and click Compare, which is disabled while both sides are the same version. The result is a table of the changed fields with their From and To values, or These versions have the same content. Load and compare failures show Could not load versions or Could not compare versions.
If the policy cannot be loaded the view shows Policy not found and a Go Back button.
Flow Builder
The Flow Builder is a full screen editor. It opens from Continue to Builder, from Edit policy in the table, and from Edit Policy in the details view.
| Control | What it does |
|---|---|
| Back arrow | Leaves the builder without saving. |
| Policy name | Text field after Policies /. Required. It is locked when you edit an existing policy. |
| Cancel | Leaves the builder without saving. |
| Test Pipeline | Opens the test panel on the right. The button then reads Hide Test. |
| Save Policy, Update Policy or Save as New Draft | Saves a new policy, or updates the draft you are editing. When the version you opened is published or in production the button reads Save as New Draft, and saving creates a new draft version with your changes while the current version keeps running. |
| Description | Optional text field under the header. |
The canvas starts with a TRIGGER card (Incoming LLM Request) and ends with an END card (Continue to LLM). In between are the steps. A round plus button between cards (Insert step) adds a step at that point. A new policy starts with one empty step. An existing policy without a pipeline opens with one step per guardrail it adds.
Each step card has these controls.
| Control | Type | What it does |
|---|---|---|
| Delete step | Icon button | The three dot button at the top right, with the tooltip Delete step, removes the step. It is disabled when the policy has only one step. |
| Guardrail | Search select | The guardrail this step runs. Shows No guardrails found when the proxy has none. |
| ON PASS action | Select | What happens when the guardrail passes. Defaults to Next Step. |
| ON FAIL action | Select | What happens when the guardrail flags the request. Defaults to Block. |
| ON API FAILURE action | Select | What happens when the guardrail itself errors, for example a provider outage. Defaults to Same as ON FAIL. |
| Custom Response Message | Text | Shown when an action is Custom Response. One message is shared by every action of the step. |
The actions are Next Step, Allow, Block and Custom Response.
Saving needs a policy name and a guardrail on every step, otherwise you see Please enter a policy name or Please select a guardrail for all steps. In the current build the save request carries only the policy name and the step guardrails, which are stored as the policy's guardrails to add, and it clears the guardrails to remove. The step actions, custom response messages, pipeline mode and the description field are not sent, so they are not stored. Use the test panel to try step actions before you rely on them.
The proxy accepts updates only to draft versions. Every new policy is created in production, so editing it saves a new draft instead, and the message says the current version keeps running until you promote the draft to production.
Versions sidebar
When you edit an existing database policy, a sidebar on the left lists its versions. The help text says production is the version used when anyone calls the policy by name.
| Control | What it does |
|---|---|
| + New Version | Creates a draft that copies the current production version and opens it. |
| Version list | One entry per version with its number and a draft, published or production badge. Click one to edit it. |
| Publish | Shown when the open version is a draft. Moves it to published. A published version can be picked by name in the Playground policy dropdown for testing. |
| Promote to production | Shown when the open version is published. Makes it the production version, and the previous production version becomes published. |
A Silent Mirroring section is marked COMING SOON and has no controls.
Test Pipeline panel
The panel runs the pipeline exactly as it is on screen, including the step actions, without saving it. It calls the real guardrails, so a guardrail that uses a paid service is billed.
| Control | Type | What it does |
|---|---|---|
| Test with | Select | Quick chat (custom message) (default), one entry per bundled compliance dataset, or All compliance datasets. |
| Message | Text area | Shown for quick chat. Defaults to Hello, can you help me?. |
| Run Test | Button | Runs the test. Every step must have a guardrail first, otherwise the panel shows All steps must have a guardrail selected. |
| Close | Button | The x in the panel header closes it. |
A quick chat run lists each step with its guardrail, a PASS, FAIL or ERROR badge, the action taken, the time in milliseconds and any error detail. A Result box shows the final action (allow, block or Custom Response), plus the error or custom response text. A dataset run sends each prompt in the dataset one after another and reports N / M matched expected, with one line per prompt showing the expected and actual outcome. A prompt that is expected to pass counts as matched when the result is allow or a custom response, and a prompt expected to fail counts as matched when it is blocked.
Attachments tab
A policy does nothing until it is attached. The tab starts with a dismissible About Policy Attachments box that explains the scopes and links to the attachments documentation, and an Enterprise Feature Notice box.
+ Add New Attachment opens the attachment form. It is disabled until at least one policy exists.
Attachment table
The table sorts by Created At newest first, paginates with 25, 50 or 100 rows per page, and shows No attachments found when there are none. Attachments from the config file appear here too.
| Column | Meaning |
|---|---|
| Attachment ID | The attachment ID. |
| Policy | The attached policy. Sortable. |
| Scope | Global (*) for an attachment that applies to all requests, otherwise the stored scope. |
| Teams, Keys, Models, Tags | Up to two values each, with a +N badge for the rest. A dash means that dimension is not used. |
| Priority | The priority number. Lower runs first. Sortable. |
| Default | A Default badge for a fallback attachment, which applies only when no non default attachment matches. Sortable. |
| Mode | Enforce for an attachment that blocks and redacts, or Audit only for one whose guardrails only record what they would have done. See audit mode. |
| Created At | When it was created. Sortable. |
| Actions | An eye button and a menu, described below. |
The eye button (View blast radius) opens a Blast Radius popover the first time you open it. It shows how many keys and teams the attachment affects with sample names, says that a global scope affects all keys and teams, or shows No keys or teams currently affected. If the estimate fails it shows Click to load.
The menu has Copy attachment ID for everyone, and for a proxy admin Switch to audit only or Switch to enforce and Delete attachment. Switching takes effect for the next request, shows a confirmation toast and writes an audit row with the old and new mode. Hover over the item to see what the switch does: Switch to enforce means the policy's guardrails block or redact matching requests from the next request on, and Switch to audit only means they only record what they would have done. Both are disabled for config attachments, which set their mode in the config file. Delete It opens a Delete Attachment dialog with the attachment ID, policy and scope. Delete removes the attachment and cannot be undone. The policy itself is kept.
Create Policy Attachment dialog
| Field | Type | What it does |
|---|---|---|
| Policies | Multi select, required | The policies to attach. One attachment is created per policy, all with the same scope. |
| Scope Type | Radio | Specific (teams, keys, models, or tags) or Global (applies to all requests). Global is selected by default. |
| Teams | Chips | Shown for Specific. Pick team aliases or type your own, separated by commas. A value ending in * is a prefix wildcard. Any other value must be an existing team alias, otherwise saving fails with a message that names the missing teams. |
| Keys | Chips | Shown for Specific. Key aliases or patterns such as dev-*. The suggestions are the aliases of the first 100 keys. |
| Models | Chips | Shown for Specific. Model names or patterns such as gpt-4*. Empty means all models. |
| Tags | Chips | Shown for Specific. Tags matched against key and team metadata.tags or tags sent in the request body. Separate them with Enter, a comma or a space. A trailing * is a suffix wildcard. |
| Priority | Number | Optional whole number between -2147483648 and 2147483647. Lower runs first, and attachments with a priority run before those without. Leave it blank to keep the default order of global, then teams, keys, tags and models. |
| Default (fallback) | Switch | Makes the attachment apply only when no non default attachment matches the request. Off by default. |
| Audit only (shadow mode) | Switch | Lets you try a new policy on live traffic without risk. On: the attachment is created in audit mode, so the policy's guardrails run on matching requests and record their verdicts in Logs, but nothing is blocked or changed. Off, the default: the attachment enforces from the next request and blocks or redacts what the policy matches. Check the verdicts, then use Switch to enforce in the row menu. |
Estimate Impact is shown for the Specific scope. It estimates the keys and teams the first selected policy's attachment would affect and shows an Impact Preview box with counts and up to five sample names of each. For a default attachment the counts read as an upper bound. Create Attachment saves, and if only some policies attach you see how many succeeded and how many failed. Cancel closes the dialog without saving.
Policy Simulator tab
The simulator shows which policies and guardrails would apply to a request with a given context, without sending a request.
| Field | Type | What it does |
|---|---|---|
| Team Alias | Combobox | A team alias from the team list. Typing filters the list. |
| Key Alias | Combobox | A key alias from the first 100 keys. |
| Model | Combobox | A model you can access. |
| Tags | Chips | Request tags. Separate them with Enter, a comma or a space. |
| Simulate | Button | Resolves the context against every attachment. All fields are optional. |
| Reset | Button | Clears the fields and the result. |
Before a run the tab shows No simulation run yet. A run shows Effective Guardrails, the final list of guardrails, and a Matched Policies table with each Policy, what it Matched Via, and the Guardrails Added. When nothing matches you see No policies matched this context.
Full dry run
A proxy admin sees two buttons above the simulator, Policy match and Full dry run, next to a How the request inspector works link. Policy match is the simulator described above, which only resolves attachments. Full dry run runs one request through everything the gateway would do for a chosen key, the way the request inspector does, without calling a model, spending anything or moving a counter. Other roles do not see the switch and only get Policy match.
Use it to answer questions such as "why is the support team's key blocked" without holding that key. Pick the key, type what its request would say, and the page shows which policy or guardrail would stop it.
| Field | Type | What it does |
|---|---|---|
| Key | Searchable select | The key to dry run as. Type part of the key alias or the full key id. The list asks the gateway for matching keys as you type, so every key can be found. |
| Model | Combobox | The model the request names. Pick one or type a name. |
| System message (optional) | Text area | A system prompt for the request. |
| User message | Text area | The user message to check. |
| Tags (optional) | Chips | Request tags. Separate them with Enter, a comma or a space. |
| Max output tokens (optional) | Number | The output size used to estimate the cost. |
| Run dry run | Button | Runs the dry run. Disabled until a key, a model and a user message are set. |
| Reset | Button | Clears the fields and the result. |
A run shows a summary with the Resolved model, Model allowed, the Cache status and the Estimated cost with the prompt and output token counts. When the key may not call the model, a line under the summary gives the reason. Below it are Routing preset when a preset applies, Deployments with the skip reason of each deployment, Matched Policies with how each matched and whether it enforces or only audits, Guardrail verdicts, and Budgets and limits for the key, its team and its user, with Would exceed when the estimate is more than what is left. Each dry run is written to the audit log with your name and the key, never the messages.
A failure shows Could not run the dry run with the error from the gateway. A 403 (Only proxy admins may inspect as another key) means your session lost the proxy admin role. A 429 (Inspect rate limit reached) means you used up your own 60 dry runs per minute (the INSPECT_RPM_LIMIT setting), which also covers dry runs as other keys, so wait for the time in the Retry-After header. See request inspector errors for the rest.
Replay recent traffic
A proxy admin also sees a Replay recent traffic section under the simulator. It runs a policy over the newest stored requests of one team or one key and counts what each guardrail would have done. Nothing is blocked and no model is called.
| Field | Type | What it does |
|---|---|---|
| Policy | Select | The policy to replay. Stored versions are listed one by one with their number and status, for example pii-strict (v2, draft), so you can replay a draft before you promote it. Config file policies show their name only. |
| Traffic of | Select | Team ID or Key hash, the owner of the traffic to replay. |
| Team ID or Key hash | Text | The team id, or the Key ID column of the key on the Virtual Keys page, which is the hashed key. |
| Last hours | Number | How far back to look, from 1 to 168. 24 by default. |
| Replay traffic | Button | Runs the replay. Disabled until a policy and an owner are set. |
A run shows how many requests were replayed and how many would have been blocked, and a table with Blocked, Redacted, Passed and Errors per guardrail. Guardrails that only run on responses are listed under the table with the reason they were not replayed. A failure shows Could not replay traffic with the error from the proxy. See replay recent traffic for what the counts mean.
Empty, error and disabled states
| Where | What you see | What to do |
|---|---|---|
| Policy list fails to load | A Failed to fetch policies toast and an empty table. | Check that the proxy has a database connected and that your role can read policies. |
| Attachment list fails to load | A Failed to fetch attachments toast. | Same as above. |
| Templates fail to load | A Failed to fetch policy templates toast. The template area then says No templates match the selected filters. even though no filter is set. | Check the proxy logs. Set SPANWAY_LOCAL_POLICY_TEMPLATES=true if outbound requests are blocked. |
| Template guardrails fail to load | Failed to load guardrails. Please try again. | Retry, or check the Guardrails page. |
| Template setup fails | Failed to configure template. Please try again. or Failed to create guardrails. Please try again. | Retry. Check that the chosen model works. |
| + Add New Attachment disabled | No policies exist yet. | Create a policy first. |
| Validate policies disabled | No policies exist, or a check is running. | Create a policy, or wait. |
| Edit policy and Delete policy disabled | The policy comes from the config file. | Change it in the config file. |
| Simulator fails | Failed to resolve policies. Check the proxy logs. | Check the proxy logs. |
| Save fails | Failed to save policy with the error from the proxy, for example a duplicate name. | Fix the field the message names. |
Differences by role and license
| Who | What changes |
|---|---|
| Admin (proxy admin) | Sees every tab and every control, and every action works. |
| Admin Viewer | Sees the lists, the details view and version comparison with the view-only banner. Edit policy, Delete policy, Delete attachment and the other buttons that change policies are hidden, and the proxy refuses every create, update, delete, validation, simulation, impact estimate and test for this role. |
| Org admin, internal user, internal viewer | The nav item is hidden. The policy routes are not on these roles' allow lists, so a direct visit cannot load policies. |
No license feature gates this page. Attaching a policy to a key or a team through its metadata on other pages needs a license that includes the guardrails feature.
Errors
| What you see | What it means | Fix |
|---|---|---|
| Validation names a missing guardrail | The policy refers to a guardrail that does not exist. | Create the guardrail or remove it from the policy. |
| Validation reports an inheritance cycle | Two policies inherit from each other. | Remove one of the parents. |
403 naming guardrails when attaching to keys or teams | The license lacks guardrails. | Add the feature. |
| A request fails with a policy's error response | A step of a flow policy stopped the request. | Read the request on Logs for the step that fired. |
Audit and logs
Every change on this page writes an audit row with who made it and the value before and after: creating, editing and deleting a policy, opening a new version, publishing and promoting a version (with a second row for the production version it replaced), deleting every version, and creating, deleting or switching the mode of an attachment. The rows are on Spanway_PolicyTable and Spanway_PolicyAttachmentTable, see audit logs. The gateway log lines, such as Error creating policy and Circular inheritance detected for policy, are listed on guardrail policies.