Skip to content
Menu

Deployment locks

View .md

Most Beacon settings are stored in the database and an Admin can change them in the UI. That is a risk when an auditor needs a guarantee: “read-only enforcement is always on” is only true while every Admin leaves it on.

A deployment lock moves the decision out of the database and into the host’s configuration (appsettings.json, environment variables, or code). Whoever deploys Beacon sets the lock. An Admin cannot lift it, because it is not a stored setting. Read this page when you need to pin a behaviour, when an Admin reports a disabled switch or a 409 on save, or when you prepare a configuration for the regulated profile.

There are two kinds of protection:

  • A lock pins a value. The setting is on or off whatever is stored.
  • A ceiling bounds a number. A stored value above the ceiling resolves to the ceiling.
KeyTypeDefaultWhat it pinsAdmin seesRecorded
Beacon:Mcp:ForceReadOnlybooltrueEnforceReadOnly on, globally and per projectSwitch disabled; write answers 409A refused attempt saves nothing, so nothing is recorded
Beacon:Mcp:ForcePiiDetectionbooltrueEnablePiiDetection onSameSame
Beacon:Mcp:ForceNoContentRetentionboolfalseRetainQueryContent offSameSame
Beacon:Mcp:Audit:RequireContentboolfalseRetainQueryContent on (lock name Audit:RequireContent)SameSame
Beacon:Mcp:ForbidRowDataToLlmboolfalseEnableSampleValueCollection, EnableValueGrounding, EnableEvalJudge offSameSame
Beacon:Mcp:Audit:RequiredboolfalseA tool result is withheld when its audit row cannot be writtenNo UI switchWarning at startup while off
Beacon:Mcp:Ceilings:*numbersnoneUpper bounds, see CeilingsStored value kept, effective value lowerChanges are in the history
Beacon:Migrations:EnabledboolfalseThe only write pathFeature hidden, routes unmappeddata_sources.migration_writes_changed when a target is marked
Beacon:Embed:EnabledboolfalseThe anonymous embed surfaceRoutes unmappedEmbed audit actions
Beacon:RowSecurity:EnabledboolfalseRow-level securityCannot be turned onStartup failure
Beacon:UserManagement:LocalLogin:EnabledbooltruePassword sign-in on the login formNo password formauth.break_glass_signed_in for a break-glass sign-in; auth.password_sign_in_refused (reason local_login_off) for any other account
Beacon:Retention:LockedboolfalseNo retention window may keep data foreverWindows not editable at runtimeStartup failure
Beacon:Authorization:RequireProjectMembershipboolfalseEvery project is members-onlyOpen projects not reachableNothing is recorded; startup fails when no project membership can exist

The first five rows are the MCP setting locks. They share one code path (McpLockPolicy), so they behave the same way, described next.

When a lock is on:

  1. Resolution. Whatever is stored, the effective value is the pinned one. This applies to the global setting and to every project override.
  2. Writes. A write that changes a pinned field is refused. Nothing is saved.
  3. Stored values are kept. A write never stores the pinned field while the lock is on. When you lift the lock, the value that was stored before takes effect again.

A write to a pinned field returns 409 Conflict with a problem+json body, to an Admin too. The message names the field and the lock:

HTTP/1.1 409 Conflict
Content-Type: application/problem+json
{"type":"/errors/setting-locked","title":"Setting 'EnforceReadOnly' is pinned by the deployment lock 'ForceReadOnly' and cannot be changed here.","status":409}

For Beacon:Mcp:ForbidRowDataToLlm, the title names the field that was in the request, for example Setting 'EnableValueGrounding' is pinned by the deployment lock 'ForbidRowDataToLlm' and cannot be changed here. The first pinned field the request contradicts is the one named.

On a global write, only a value that contradicts the lock is refused. On a project write, any non-null override of a pinned field is refused, even one that matches the lock today, because it would silently take effect the day the lock is lifted. A null override (inherit) is always allowed.

A refused write saves nothing, so it writes no history row. See Settings history for what is recorded for accepted writes.

  • On the global settings page a pinned switch is disabled, with a lock and a note naming the key.
  • In a project’s scope, pinned fields are not offered and a banner names them.
  • GET /beacon/api/mcp/settings/locks lists every active lock (readable by an Auditor or a SecurityAdmin):
{
"lockedFields": ["EnforceReadOnly", "EnablePiiDetection"],
"locks": [
{ "fieldName": "EnablePiiDetection", "lockName": "ForcePiiDetection" },
{ "fieldName": "EnforceReadOnly", "lockName": "ForceReadOnly" }
]
}

If settings were stored before you turned a lock on, resolution replaces them silently. To make that visible, a background check at startup logs one Warning:

Stored MCP settings contradict the deployment locks <lock names> (Beacon:Mcp) and are overridden: global settings rows <row ids>, overrides of projects <project ids>. They take effect again only if the host lifts the lock

The message carries ids and lock names only. It is logged once per start.

Pins EnforceReadOnly = true, and makes the execution gate enforce read-only whatever a caller asks for. It is on without configuration. Setting it to false lets an Admin turn read-only enforcement off at runtime, and Beacon logs a Warning at startup:

Beacon:Mcp:ForceReadOnly is off: an Admin can turn MCP read-only enforcement off at runtime, globally or per project

When the lock turned enforcement on over stored settings that had it off, and a statement is refused only because of read-only enforcement, the refusal says the lock is the cause. The settings page then shows read-only off in storage, and the lock is what to look at. See Query safety for the gate itself.

{ "Beacon": { "Mcp": { "ForceReadOnly": true } } }
Terminal window
Beacon__Mcp__ForceReadOnly=true

Beacon:Mcp:ForcePiiDetection (default true)

Section titled “Beacon:Mcp:ForcePiiDetection (default true)”

Pins EnablePiiDetection = true. Also on by default, and a false value logs a similar Warning at startup (... MCP PII detection off at runtime, globally or per project).

Beacon:Mcp:ForceNoContentRetention (default false)

Section titled “Beacon:Mcp:ForceNoContentRetention (default false)”

Pins RetainQueryContent = false. The MCP audit then keeps no question or SQL text, and retention clears stored result snapshots whatever their age. See Data retention and content lock.

{ "Beacon": { "Mcp": { "ForceNoContentRetention": true } } }

Beacon:Mcp:Audit:RequireContent (default false)

Section titled “Beacon:Mcp:Audit:RequireContent (default false)”

The opposite of the lock above: pins RetainQueryContent = true, so no Admin can switch audit content off unseen. The MCP audit keeps the question and SQL of every call, and the statements it ran, until its retention purges them. In refusals, the locks list and warnings the lock is named Audit:RequireContent.

{ "Beacon": { "Mcp": { "Audit": { "RequireContent": true, "RetentionDays": 365 } } } }

Beacon:Mcp:ForbidRowDataToLlm (default false)

Section titled “Beacon:Mcp:ForbidRowDataToLlm (default false)”

One lock, three fields. It pins EnableSampleValueCollection, EnableValueGrounding and EnableEvalJudge to false, so no value read from a data source goes to the LLM provider: no sample values are collected or shown, no value is probed for grounding, documentation discovers no column values, and no eval judge sees result rows. See LLM and prompt safety.

The regulated profile fills it with true when it is unset.

{ "Beacon": { "Mcp": { "ForbidRowDataToLlm": true } } }

Conflicts the validator refuses at startup

Section titled “Conflicts the validator refuses at startup”

RequireContent and ForceNoContentRetention pin the same field in opposite directions, so no stored value could satisfy both. With both on, the host fails to start:

Beacon:Mcp:Audit:RequireContent and Beacon:Mcp:ForceNoContentRetention cannot both be on: one pins query content retention on, the other off.

Fix: turn one of them off. The other deployment-lock validations are in Troubleshooting.

Fail closed. A successful tools/call whose audit row cannot be written is withheld: the caller gets an error and no result. With the lock off, the call still runs and the failure is only logged. The regulated profile fills it with true. Audit retention for the MCP audit is Beacon:Mcp:Audit:RetentionDays (see Data retention). Details of what is recorded are in Observability and audit.

A ceiling bounds a numeric setting. It does not stop an Admin from saving a higher number. The write is stored as sent, and the effective value is lowered to the ceiling when settings are resolved. So the page edits what is stored and Beacon reports which fields were lowered. If you raise the ceiling later, the stored value applies again.

The same ceilings apply to the global settings and to every project override.

KeyTypeDefaultRangeWhat it bounds
Beacon:Mcp:Ceilings:MaxRowLimitintnonegreater than 0Rows an MCP tool returns.
Beacon:Mcp:Ceilings:StatementTimeoutSecondsintnonegreater than 0Statement timeout in seconds.
Beacon:Mcp:Ceilings:MaxResultBytesintnonegreater than 0Result size in bytes.
Beacon:Mcp:Ceilings:MaxExplainCostdecimalnonegreater than 0Estimated query cost. A stored “no limit” resolves to the ceiling.
Beacon:Mcp:Ceilings:MaxConcurrentQueriesPerKeyintnonegreater than 0Concurrent queries per caller.
Beacon:Mcp:Ceilings:LearningSignalRetentionDaysintnonegreater than 0Longest learning-signal retention. Under Beacon:Retention:Locked, at most Beacon:Retention:Days.
Beacon:Mcp:Ceilings:MaxSqlCharsint100000 (always applies)greater than 0Longest SQL text the execution gate evaluates.
Beacon:Mcp:Ceilings:MaxQuestionCharsint4000 (always applies)greater than 0Longest question ask accepts.
Beacon:Mcp:Ceilings:AskTimeoutSecondsint120 (always applies)1 to 3600Wall-clock time of one ask call.
Beacon:Mcp:Ceilings:AskMaxLlmCallsint12 (always applies)at least 2LLM calls one ask call may make: the intent classification and the first SQL generation need two.
Beacon:Mcp:Ceilings:AskSchemaContextCharsint120000 (always applies)at least 10000Schema context one ask sends to the LLM.

A ceiling left unset means no ceiling, except the always-applying ones, which fall back to the default shown. A value outside its range fails startup, for example:

Beacon:Mcp:Ceilings:AskTimeoutSeconds must be between 1 and 3600 when set.
Beacon:Mcp:Ceilings:MaxRowLimit must be greater than zero when set.

An accepted and a lowered value, with MaxRowLimit ceiling 1000:

{ "Beacon": { "Mcp": { "Ceilings": { "MaxRowLimit": 1000, "StatementTimeoutSeconds": 30 } } } }
An Admin savesStoredEffectiveReported as lowered
MaxRowLimit: 500500500no
MaxRowLimit: 500050001000yes (clampedFields on the settings GET)

Without the profile, there are no ceilings beyond the always-applying ones. The profile fills the first four of the table (MaxRowLimit 1000, StatementTimeoutSeconds 30, MaxResultBytes 262144, MaxConcurrentQueriesPerKey 4) when they are unset, which makes them hold as ceilings an Admin cannot exceed.

Beacon reads data sources. Data migration is the one feature that writes to a connected database, so it has its own switch.

KeyTypeDefaultRangeWhat it does
Beacon:Migrations:EnabledboolfalseMaps the migration endpoints and allows runs.
Beacon:Migrations:MaxRowsint1000001 to 10000000Rows one run may read and write. A larger source fails the run before anything is written.

While Enabled is off, whoever asks, an Admin included:

  • the migration endpoints are not mapped (they answer 404) and the shell hides the feature;
  • no job can be created or run (the policy answers with Data migration is turned off for this deployment (Beacon:Migrations:Enabled).);
  • no data source can be marked as a write target: the mark is refused with a 409 carrying the same message.

When it is on, an Admin marks a specific data source as a write target (PUT on the data source’s migration-writes setting). That mark is stored, history-recorded (a key per data source) and audited as data_sources.migration_writes_changed. Beacon never reads from a write target. At startup, an enabled lock logs Beacon:Migrations:Enabled is on: migrations write to the data sources an Admin marks as migration write targets, which Beacon never reads. See Data migration.

{ "Beacon": { "Migrations": { "Enabled": true, "MaxRows": 100000 } } }

Embed: Beacon:Embed:Enabled (default false)

Section titled “Embed: Beacon:Embed:Enabled (default false)”

Off, no embed route is mapped. On, Beacon:Embed:SigningKey is required and checked at startup, and the profile reports it under event 9132. Never on in gateway mode. See Authorization.

Row-level security: Beacon:RowSecurity:Enabled (default false)

Section titled “Row-level security: Beacon:RowSecurity:Enabled (default false)”

The lock cannot be turned on in this release. Turning it on fails startup, so no deployment believes its rows are filtered when they are not:

Beacon:RowSecurity:Enabled cannot be turned on: row-level security is not available in this release.

Local login: Beacon:UserManagement:LocalLogin:Enabled (default true)

Section titled “Local login: Beacon:UserManagement:LocalLogin:Enabled (default true)”

Off, the login page shows no password form and only the accounts in BreakGlassUserNames (at most 3, matched exactly with the stored user name) may sign in with a password. Each such sign-in is logged at Warning. See User management.

{ "Beacon": { "UserManagement": { "LocalLogin": { "Enabled": false, "BreakGlassUserNames": [ "REPLACE_ME" ] } } } }

Retention: Beacon:Retention:Locked (default false)

Section titled “Retention: Beacon:Retention:Locked (default false)”

No retention window may keep data forever. See Data retention and content lock.

Project membership: Beacon:Authorization:RequireProjectMembership (default false)

Section titled “Project membership: Beacon:Authorization:RequireProjectMembership (default false)”

Restricts every project, whatever its own setting: only members and Admins reach a project, and data sources no project links are Admin-only. It needs project memberships, so the host fails to start when none can exist:

Beacon:Authorization:RequireProjectMembership requires project memberships: enable Beacon user management or register an IProjectMembershipSource.

See Authorization.

Every change to the MCP settings, global or per project, is recorded in the settings history (AppSettingHistory, the app_setting_history table). One row is written per changed setting:

ColumnContent
SettingKeyMcp.{Setting} for the global settings, Mcp.Project.{projectId}.{Setting} for a project
OldValue, NewValueThe value before and after, in invariant format. A long text is cut to 2000 characters
ChangedAtUTC time
ChangedByUserIdThe caller’s log id

Only the settings in the MCP settings field list are recorded, so a secret is never written by default. The history is sealed and append-only (it is never purged; see Audit trail).

The same save also writes one security audit event: settings.mcp_settings_changed for global settings, settings.mcp_project_settings_changed for a project. It names the keys that changed and the history rows that hold the values, plus a keyed digest of each value before and after. A line in the application log notes the change by setting name and ids only:

MCP settings changed by <actor> for <the global settings | project <id>>: <setting keys, for example Mcp.MaxRowLimit>

To read the history, use GET /beacon/api/admin-settings, which returns the latest 200 rows to an Auditor, a SecurityAdmin or an Admin. See Admin settings.

SettingDevelopmentProductionRegulated
Beacon:Mcp:ForceReadOnlytruetruetrue (required)
Beacon:Mcp:ForcePiiDetectiontruetruetrue (required)
Beacon:Mcp:ForceNoContentRetentionfalseby decisionby decision
Beacon:Mcp:Audit:RequireContentfalseby decisionby decision
Beacon:Mcp:ForbidRowDataToLlmfalseby decisiontrue (filled when unset)
Beacon:Mcp:Audit:Requiredfalsetruetrue (filled when unset)
Beacon:Mcp:Ceilings:* (the four numeric ones)unsetsetset (filled with built-in defaults when unset)
Beacon:Migrations:Enabledtrue when testingfalse unless usedby decision (reported as event 9132)
Beacon:Embed:Enabledfalsefalse unless usedby decision (reported as event 9132)
Beacon:UserManagement:LocalLogin:Enabledtruefalse with SSOfalse (required)
Beacon:Retention:Lockedfalseby decisiontrue (filled when unset)
Beacon:Authorization:RequireProjectMembershipfalsetruetrue (required)

RequireContent and ForceNoContentRetention are alternatives. Choose by what your audit needs: provable content for investigations, or no stored content.

SymptomCauseFix
Admin gets 409 with ... is pinned by the deployment lock '...'The write contradicts an active lock.Change the key in the host configuration, or leave the field out of the request.
A project save returns 409 although the value equals the lockA non-null override of a pinned field is refused, so it cannot start applying when the lock is lifted.Send null for the field.
A switch on the settings page is disabledIts lock is on.Read the lock list at GET /beacon/api/mcp/settings/locks.
An older stored value no longer takes effectA lock now overrides it.See the startup Warning Stored MCP settings contradict the deployment locks .... Lift the lock to restore it.
Startup fails with RequireContent and ForceNoContentRetention cannot both be onTwo locks pin the same field in opposite ways.Keep one.
Startup fails with Beacon:RowSecurity:Enabled cannot be turned onThe lock cannot be on in this release.Remove the key.
Startup fails with Beacon:Mcp:Ceilings:... must be greater than zero when setA ceiling is zero or negative.Use a positive value or remove the key.
Migration routes answer 404Beacon:Migrations:Enabled is off.Turn it on and restart.
An Admin’s save succeeded but the effective value is lowerA ceiling lowered it.Read clampedFields on the settings GET. Raise the ceiling or lower the setting.