Configuration
This is the reference for everything you can configure in Beacon. It applies whether you run the Beacon.SampleProject host or embed the Beacon.* packages in your own ASP.NET Core application; Host wiring shows the registration calls in context.
How configuration is read
Section titled “How configuration is read”Beacon has two kinds of settings:
- Configuration keys, read from
IConfiguration:appsettings*.json, environment variables, user secrets or a secrets provider. Everything under Core and database through Telemetry below. - Code-only options, set in the
AddBeaconServices(configuration, options => …)lambda. They are not read from configuration. See Code-only options.
Rules that apply throughout:
- Validated at startup. Most sections are validated when the host starts; a bad value stops the host with a message that names the key (never a secret’s value). Sections marked “validated at first use” are checked when the feature first reads them.
- Secrets never go in
appsettings.json. SupplyBeacon:EncryptionKey, connection strings, the OIDC client secret and LLM keys through environment variables or a secrets provider. .NET configuration does not expand${...}placeholders: the text itself would become the value (forBeacon:EncryptionKeyandBeacon:Mcp:CallerHashKeystartup refuses it). - The sample host.
src/Beacon.SampleProject/appsettings.jsonholds onlyLogging; the sample’s Beacon settings are inappsettings.Development.json, which loads only withASPNETCORE_ENVIRONMENT=Development. Outside Development, supply every value yourself.
Environment-variable form
Section titled “Environment-variable form”Replace each : with a double underscore. List items take an index; dictionary keys are path segments.
export ConnectionStrings__BeaconContext="Host=db;Database=beacon;Username=beacon;Password=…"export Beacon__EncryptionKey="<base64 of 32 random bytes>"export Beacon__PreviousEncryptionKeys__0="<the key used until now>"export Beacon__UserManagement__LocalLogin__BreakGlassUserNames__0="superadmin"export Beacon__Query__MaxExecutionRows=50000export Beacon__Mcp__ForceReadOnly=trueAn Azure Key Vault secret named Beacon--EncryptionKey maps to Beacon:EncryptionKey the same way.
Host setup in Program.cs
Section titled “Host setup in Program.cs”A condensed version of the sample host’s wiring. The SPA is served at /beacon, so cookie authentication, the login and setup endpoints and the middlewares take that base path.
using Beacon.AI;using Beacon.Api;using Beacon.Api.Authentication;using Beacon.Api.Endpoints;using Beacon.Core;using Beacon.Core.PostgreSql;using Beacon.MCP;using Beacon.MCP.Discovery;using Beacon.UI;
builder.Services.AddBeaconHostInfrastructure<MyClaimsTransformation>();
builder.Services.AddBeaconServices(builder.Configuration, options => { options.AddBeaconScheduler<BeaconScheduler>(); // required: your IBeaconScheduler options.BaseUrl = builder.Configuration["Beacon:BaseUrl"]; options.UseAI = true; options.AddEmailAdapter<MyEmailAdapter>(); options.Authorization.Enabled = true; options.Authentication.EnableLoginForm = true; options.AddAuthenticationProvider<DatabaseAuthenticationProvider>(); options.EnableUserManagement(); }) .AddPostgreSqlConnector() .AddSqlServerConnector() // … other connectors … .UsePostgreSql(); // ConnectionStrings:BeaconContext, schema "beacon"
builder.Services.AddBeaconCookieAuthentication(BeaconUiEndpointRouteBuilderExtensions.BasePath); // "/beacon"builder.Services.AddBeaconDataProtection(builder.Configuration, builder.Environment);builder.Services.AddBeaconOidcAuthentication(builder.Configuration); // optional SSObuilder.Services.AddBeaconAI(builder.Configuration);builder.Services.AddBeaconMcp();builder.Services.AddOpenApi();builder.Services.AddAntiforgery(x =>{ x.HeaderName = "X-XSRF-TOKEN"; x.Cookie.Name = ".Beacon.Antiforgery";});builder.Services.AddBeaconApiAuthorization();builder.Services.AddBeaconApiServices();
var app = builder.Build();var beaconConfiguration = app.Services.GetRequiredService<BeaconConfiguration>();
app.UseStaticFiles();app.UseMcpResourceMetadataChallenge();app.UseBeaconAuthentication(); // API key → bearer JWT → UseAuthentication → Beacon.Auth cookieapp.UseAuthorization();app.UseMiddleware<LoginFormAuthMiddleware>(beaconConfiguration, BeaconUiEndpointRouteBuilderExtensions.BasePath); // with the login formapp.UseMiddleware<FirstRunSetupMiddleware>(beaconConfiguration, BeaconUiEndpointRouteBuilderExtensions.BasePath); // with user managementapp.UseAntiforgery();
app.MapBeaconOpenApi(); // /openapi/v1.jsonapp.MapBeaconApi(); // /beacon/api/* and the hub /beacon/api/hubapp.MapLoginEndpoints("/beacon", beaconConfiguration); // /beacon/api/auth/login, logout, ssoapp.MapSetupEndpoints("/beacon"); // /beacon/api/setup/* (with user management)app.MapBeaconMcp(); // /beacon/mcp, Execute-scope policyapp.MapMcpDiscovery(); // /.well-known/* (anonymous)app.MapBeaconUi(); // the React SPA at /beaconThe middleware order is load-bearing; keep it. UseBeaconAuthentication() takes the place of UseAuthentication() and wires Beacon’s half of it; the Beacon middlewares act on /beacon and Beacon:Authentication:AdditionalPaths only. Beacon does not create or migrate its own schema when the host starts: apply its migrations as described in Metadata database.
| Path | What |
|---|---|
/beacon | the React UI (/beacon/login, /beacon/setup, …) |
/beacon/api/* | REST API; /beacon/api/health is anonymous |
/beacon/api/hub | SignalR hub |
/beacon/mcp | MCP server |
/.well-known/oauth-protected-resource, /.well-known/mcp/server-card.json | MCP discovery (anonymous) |
/openapi/v1.json | OpenAPI document (open in Development; signed-in callers only elsewhere unless Beacon:OpenApi:Anonymous is true) |
/warp | Warp dashboard (sample host, Admin only; listed in Beacon:Authentication:AdditionalPaths) |
Code-only options
Section titled “Code-only options”Set in the AddBeaconServices lambda. None of these are read from configuration, except the two noted.
| Option | Default | What it does |
|---|---|---|
AddBeaconScheduler<T>() | none, required | Your IBeaconScheduler; startup fails without one (see Scheduling) |
AddEmailAdapter<T>() | none | Your IEmailAdapter; Beacon ships no email implementation (see Email adapter) |
BaseUrl | null | The address put in notification links: {BaseUrl}/notifications/{id}. Include the /beacon path (https://beacon.example.com/beacon). Not read from configuration by Beacon; the sample host reads Beacon:BaseUrl into it. Admin settings can replace it at runtime (see Base URL) |
UseAI | false | Turns on the AI features; with false they are registered as stand-ins that report AI as unavailable |
Authorization.Enabled | false | Enforces global roles on /beacon/api (see Authorization) |
AddAuthorizationProvider<T>() | DefaultAuthorizationProvider (allows all); DatabaseAuthorizationProvider with user management | The global-permission provider |
Authentication.EnableLoginForm | false | The login form and the login redirect |
AddAuthenticationProvider<T>() | none | How a login-form password is checked (DatabaseAuthenticationProvider, JwtExternalApiAuthenticationProvider, HybridAuthenticationProvider or your own) |
Authentication.LoginRedirectPath | /beacon/home | Where a sign-in lands (a full browser path) |
Authentication.LoginPath | /login | The login page, under the base path |
Authentication.CookieExpirationHours | 24 | Requested session-cookie lifetime; capped by Beacon:Authentication:Session:AbsoluteLifetimeHours (default 12) |
Authentication.RememberMeExpirationDays | 30 | Requested “remember me” lifetime; capped the same way |
UserManagement.Enabled (EnableUserManagement()) | false | Beacon’s user store, Users page and first-run setup |
UserManagement.AllowInternalUsers | true | Allow password users |
UserManagement.MinimumPasswordLength | 8 | Shortest password. Beacon:UserManagement:MinimumPasswordLength (1–128, unset by default) raises it from configuration; a lower configured value leaves the code value |
UserManagement.RequirePasswordComplexity | true | Upper case, lower case, digit and another character required |
UserManagement.SetupToken | unset | Also bound from Beacon:UserManagement:SetupToken (see User management) |
UserManagement.LocalLogin | on | Also bound from Beacon:UserManagement:LocalLogin |
ApprovalWorkflow.* (EnableApprovalWorkflow(…)) | off | The four-eyes workflow (see Approval workflow) |
SavedQueryTools.NamedToolLimit | 25 | Up to this many saved-query MCP tools per caller are listed as their own q_<name> tools; above it, callers get search_saved_queries and run_saved_query. Must not be negative |
Bearer-token and external-login settings are code-only too, through builder.Services.AddBeaconJwtAuthentication(jwt => …) (see JWT bearer).
builder.Services.AddBeaconServices(builder.Configuration, options =>{ options.AddBeaconScheduler<BeaconScheduler>(); // required options.AddEmailAdapter<MyEmailAdapter>(); options.BaseUrl = "https://beacon.example.com/beacon"; options.UseAI = true; options.Authorization.Enabled = true; options.Authentication.EnableLoginForm = true; options.Authentication.CookieExpirationHours = 8; options.Authentication.RememberMeExpirationDays = 14; options.UserManagement.MinimumPasswordLength = 14; options.SavedQueryTools.NamedToolLimit = 10;});Core and database
Section titled “Core and database”| Key | Type | Default | What it does |
|---|---|---|---|
ConnectionStrings:BeaconContext | string | required | Beacon’s own database (PostgreSQL or SQL Server), read by .UsePostgreSql() / .UseSqlServer() without arguments. Missing: startup fails |
ConnectionStrings:WarpContext | string | falls back to BeaconContext | Sample host: the Moberg.Warp job store, PostgreSQL only, warp schema. When Beacon runs on SQL Server, point it at a PostgreSQL database |
ConnectionStrings:{Name} | string | none | The connection of a host-managed data source, which stores only the name and reads the string at call time |
Beacon:Schema | string | beacon | Not configurable. Any value other than beacon stops the host (see below). Leave it out |
Beacon:BaseUrl | string | none (the sample host falls back to https://localhost:7187) | Read by the sample host into options.BaseUrl |
Beacon:PublicBaseUrl | string (origin) | derived from the request | The origin advertised in the MCP discovery documents and the WWW-Authenticate challenge. Unset, it follows the request’s Host header, which the client controls, the documents are sent with Cache-Control: no-store, and startup logs a Warning. Set it behind any proxy |
Beacon:OpenApi:Anonymous | bool | false | Publishes the OpenAPI document (MapBeaconOpenApi()) to anonymous callers outside Development. Off, it needs a signed-in Beacon caller; list /openapi in Beacon:Authentication:AdditionalPaths so the Beacon session reaches it. |
Beacon:ForwardedHeaders:Enabled | bool | false | Sample host: apply X-Forwarded-For and X-Forwarded-Proto from known proxies |
Beacon:ForwardedHeaders:KnownProxies | string[] | empty | Sample host: proxy IP addresses to trust; entries that are not IP addresses are skipped, and an empty list trusts none |
AllowedHosts | string | None | Standard ASP.NET Core host filtering |
Logging:* | n/a | n/a | Standard logging. For JSON console logs with trace ids: Logging:Console:FormatterName=json, Logging:Console:FormatterOptions:IncludeScopes=true |
{ "ConnectionStrings": { "BeaconContext": "Host=db.example.com;Database=beacon;Username=beacon_app;Password=REPLACE_ME;SSL Mode=VerifyFull", "WarpContext": "Host=db.example.com;Database=beacon_warp;Username=warp_app;Password=REPLACE_ME;SSL Mode=VerifyFull" }, "AllowedHosts": "beacon.example.com", "Beacon": { "PublicBaseUrl": "https://beacon.example.com", "BaseUrl": "https://beacon.example.com/beacon", "OpenApi": { "Anonymous": false }, "ForwardedHeaders": { "Enabled": true, "KnownProxies": [ "10.0.0.5" ] } }}The environment-variable form of the connection string, which keeps the password out of the file:
ConnectionStrings__BeaconContext="Host=db.example.com;Database=beacon;Username=beacon_app;Password=REPLACE_ME;SSL Mode=VerifyFull"Schema configuration
Section titled “Schema configuration”Beacon runs in the beacon schema and only that schema. Its migration snapshots bake the schema in, so any other schema would make Database.Migrate() fail with PendingModelChangesWarning; Beacon refuses the setting up front:
Beacon only supports the 'beacon' schema, but 'tenant_a' was configured.Remove Beacon:Schema (or set it to 'beacon') and move any existing Beacon tables into 'beacon'.The obsolete overloads .UsePostgreSql(connectionString, schema) and .UseSqlServer(connectionString, schema) (removed in 6.0) accept a schema argument for the same reason only as beacon, and otherwise ignore it. On PostgreSQL the search path is beacon,public, so a pgvector extension installed in public resolves. Startup logs a Warning when every role can create objects in public (the default before PostgreSQL 15); run REVOKE CREATE ON SCHEMA public FROM PUBLIC unless every role that can connect is trusted.
Forwarded headers
Section titled “Forwarded headers”The forwarded-headers keys are read by the sample host only. A host embedding the packages calls UseForwardedHeaders itself. Behind a proxy this matters: the login and setup throttles key on the client address, and SameAsRequest cookie security keys on the scheme. Without forwarded headers the cookie is issued without the Secure flag behind a TLS-terminating proxy: honour the forwarded scheme, or set Beacon:Authentication:Cookie:SecureAlways to true (default false; the cookie is then never sent over plain HTTP, so sign-in needs HTTPS end to end or a proxy that terminates it). Outside Development, Beacon logs a Warning at startup when the server listens on a plain HTTP address and the option is off. Add HTTPS redirection and HSTS in the host.
{ "Beacon": { "ForwardedHeaders": { "Enabled": true, "KnownProxies": [ "10.0.0.5" ] } }}Base URL configuration
Section titled “Base URL configuration”BaseUrl is the address of the Beacon UI in outgoing links (Teams, Slack, webhooks: {BaseUrl}/notifications/{id}). The UI lives under /beacon, so include it:
{ "Beacon": { "BaseUrl": "https://beacon.example.com/beacon" } }At startup the base URL is what the host’s code sets (options.BaseUrl). Saving Base URL in Admin settings replaces it in the running process at once; after a restart the startup value applies again until the settings are saved. Keep the two in step.
Encryption key configuration (required)
Section titled “Encryption key configuration (required)”| Key | Type | Default | What it does |
|---|---|---|---|
Beacon:EncryptionKey | string (base64) | required | Encrypts data-source connection data, repository tokens, sensitive settings and recipient destinations at rest (AES-256-GCM, per-value nonce; the AES key is the SHA-256 of the key text). Checked in every environment |
Beacon:PreviousEncryptionKeys | string[] | empty | Older keys, used only to decrypt |
Beacon:Mcp:CallerHashKey | string | derived from the encryption key | Secret behind the MCP caller hashes in the audit; keeps them stable across a key change |
Generate a key with:
openssl rand -base64 32The key must be base64 that decodes to at least 32 random bytes: a passphrase, a short value, base64 of text (every decoded byte printable) or of a repeated pattern (fewer than 16 distinct byte values) is refused. A published sample value and a value containing ${ are refused too. The message never contains the key.
# Developmentdotnet user-secrets --project src/Beacon.SampleProject set "Beacon:EncryptionKey" "$(openssl rand -base64 32)"# Elsewhereexport Beacon__EncryptionKey="<the generated value>"API keys are not encrypted: they are SHA-256-hashed, and the raw key is shown once.
For the full guide with worked examples, see Secrets and keys.
Replacing the key
Section titled “Replacing the key”Values are always written with Beacon:EncryptionKey. To replace a key, set the new one and list the old one in Beacon:PreviousEncryptionKeys (as a list: Beacon__PreviousEncryptionKeys__0; a single value is read as one key, with a startup Warning). Previous keys only decrypt and are not strength-checked, since their purpose is to retire a weak key.
export Beacon__EncryptionKey="<the new value>"export Beacon__PreviousEncryptionKeys__0="<the key configured until now>"IStoredValueReEncryptionService re-encrypts every stored value only a previous key decrypts (conditional writes, so a concurrent save wins). It also rewrites, in the current AES-GCM format, every value still in the legacy format written before it (unauthenticated AES-CBC), under whichever configured key. The sample host enqueues it as ReEncryptStoredValuesJob at every start; a host with its own jobs does the same. Startup also logs how many values remain under a previous key, how many no key decrypts, how many recipient approval hashes cannot be recomputed, and how many values are still in the legacy format. Remove the previous keys once none remain.
For the full guide with worked examples, see Secrets and keys.
The legacy format
Section titled “The legacy format”Values in the legacy format stay readable while Beacon:Encryption:AllowLegacyCbc is true (the default); the first one read is logged once as a Warning. Once the re-encryption run reports none left in the legacy format (StoredValueReEncryptionResult.LegacyFormatReadRemovable), set it to false: a legacy value is then refused like one no key decrypts. The report covers Beacon’s own stored values only (data sources, repository tokens, sensitive settings, recipients); values your host stored itself through IEncryptionService are not scanned, so check those before turning it off.
Before changing the key, set Beacon:Mcp:CallerHashKey to the key in use now, so MCP audit rows keep grouping together across the change. The MCP audit’s content hashes (ContentHash, SqlHash) come from the same secret and behave the same way. Set Beacon:Audit:IntegrityKey before you change the key too, so security audit events written from then on do not depend on it; events signed before keep verifying while their secret stays configured (see Security audit trail).
Once the re-encryption run reports no value left in the legacy format, turn the fallback off:
{ "Beacon": { "Encryption": { "AllowLegacyCbc": false } }}Beacon__Encryption__AllowLegacyCbc=falseFor the full guide with worked examples, see Secrets and keys.
Data Protection (the keys behind the session cookie)
Section titled “Data Protection (the keys behind the session cookie)”ASP.NET Core Data Protection signs and encrypts the Beacon.Auth cookie and the antiforgery tokens. It belongs to the host: AddBeaconCookieAuthentication configures none of it.
| Key | Type | Default | What it does |
|---|---|---|---|
Beacon:DataProtection:ApplicationName | string | Beacon in Development; required elsewhere | Used by AddBeaconDataProtection(configuration, environment), which keeps the key ring in the Beacon database (data_protection_keys). Give each deployment its own name (beacon-production, beacon-uat) so a cookie from one is refused by another. Missing outside Development: startup fails |
Beacon:DataProtection:AllowUnencryptedKeys | bool | false | Acknowledges a key ring persisted without encryption outside Development (a startup Warning instead of a refusal) |
- Keys encrypted at rest. Outside Development the host does not start when the key ring is persisted without key encryption. Chain
ProtectKeysWithAzureKeyVault(...)orProtectKeysWithCertificate(...)with a key only that environment holds, or acknowledge another protection withAllowUnencryptedKeys. - Keys written before encryption are revoked. At each start outside Development with key encryption on, keys still stored unencrypted are revoked and replaced (
DataProtectionKeyRing, 7121); their users sign in again once. - No repository configured gets a startup Warning outside Development.
- Your own setup. Call
AddDataProtection()with your own application name,PersistKeysTo*andProtectKeysWith*, and skipAddBeaconDataProtection.
builder.Services.AddBeaconDataProtection(builder.Configuration, builder.Environment) .ProtectKeysWithAzureKeyVault(new Uri(builder.Configuration["DataProtection:KeyUri"]!), new DefaultAzureCredential());After restoring a Beacon database into another environment: give every user a new security stamp (sessions signed in before end), delete the copied key rows so the copy creates its own keys, and if a copy may have been exposed, revoke the source environment’s keys too.
-- PostgreSQLUPDATE beacon.users SET security_stamp = md5(random()::text || clock_timestamp()::text || id::text);-- SQL ServerUPDATE beacon.Users SET SecurityStamp = LOWER(REPLACE(CONVERT(nvarchar(36), NEWID()), '-', ''));For the full guide with worked examples, see Secrets and keys.
Authentication
Section titled “Authentication”Beacon’s sessions use the Beacon.Auth cookie (HttpOnly, SameSite=Lax, SecurePolicy=SameAsRequest, sliding; Beacon:Authentication:Cookie:SecureAlways set to true always issues it with the Secure flag; this covers the Beacon.Auth cookie only, not the antiforgery or OIDC cookies). There is no default account: first-run setup creates the super admin. Register cookie authentication with the UI’s base path:
builder.Services.AddBeaconCookieAuthentication("/beacon"); // login page /beacon/loginFor the full guide with worked examples, see Sign-in and sessions.
Where Beacon credentials apply
Section titled “Where Beacon credentials apply”Beacon’s API keys, bearer tokens and Beacon.Auth cookie authenticate Beacon’s own routes, everything under /beacon, and the path prefixes listed in Beacon:Authentication:AdditionalPaths. On every other route of the host, Beacon’s API-key, bearer and cookie authentication do nothing, and the login and first-run redirects never send a request to Beacon’s pages: the host’s own authentication decides.
| Key | Type | Default | What it does |
|---|---|---|---|
AdditionalPaths | string[] | empty | More path prefixes where Beacon credentials apply, for example /warp for a Warp dashboard that admits Beacon admins. Matched by whole segments (/warp matches /warp/jobs, not /warpx), ignoring case, against the request path after the host’s PathBase. Each entry starts with / and is not / alone, with no query or fragment; a trailing / is ignored. An invalid entry fails startup |
{ "Beacon": { "Authentication": { "AdditionalPaths": [ "/warp" ] } } }app.UseBeaconAuthentication() wires Beacon’s authentication in the order it needs: the host’s UseAuthentication(), then one Beacon step: a presented API key or bearer JWT, which wins over any session, else the Beacon.Auth cookie, followed by the origin check, with the security headers before them all unless the host added them earlier (Beacon:Security, below). Call it in place of UseAuthentication(), before UseAuthorization().
The cookie scheme (Cookies) applies the same scope itself. When it is the host’s default authentication scheme (set as the default, or the only scheme registered), or a host policy names it, it authenticates nothing outside /beacon and AdditionalPaths: the session is refused there without a check against the user store, without renewal, and its cookie is left as it is. A host route that requires an authenticated user therefore needs the host’s own scheme.
Security headers and the origin check (Beacon:Security)
Section titled “Security headers and the origin check (Beacon:Security)”| Key | Type | Default | What it does |
|---|---|---|---|
Csp | Enforce | ReportOnly | Off | Enforce | The Content-Security-Policy on responses under /beacon. The other security headers are sent on all of Beacon’s routes in every mode |
OriginGuard | LogOnly | Enforce | LogOnly | Whether a state-changing, realtime-hub or anonymous Beacon request from a foreign origin is only logged or answered 403 |
AllowedOrigins | string[] | empty | The origins browsers reach Beacon from (https://beacon.example.com, with an optional port, no path). With Beacon:PublicBaseUrl they replace the default, the request’s own origin. An invalid entry fails startup |
AddBeaconApiServices() binds the section and UseBeaconAuthentication() applies it. See Security headers and the origin check.
{ "Beacon": { "Security": { "Csp": "ReportOnly", "OriginGuard": "Enforce", "AllowedOrigins": [ "https://beacon.example.com", "https://beacon.example.com:8443" ] } }}Beacon__Security__OriginGuard=EnforceStart with OriginGuard at LogOnly, read the log for refused origins, then switch to Enforce. For what each header does and how to roll it out, see Browser protections.
Session lifetime
Section titled “Session lifetime”Bound from Beacon:Authentication:Session, validated at startup.
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
RevalidateMinutes | int | 5 | 0–1440 (0 = every request) | How often, at most, a session is checked against the user store (user exists, enabled, not archived, same security stamp; roles replaced by the stored ones). Also how long a realtime connection lives before it is checked again (at least 1 minute) |
AbsoluteLifetimeHours | int | 12 | 1–8760 | A session ends this long after sign-in, however often it is renewed; caps the cookie’s expiry and “remember me” |
PersistSsoCookie | bool | false | A single sign-on session’s cookie outlives the browser session. false: a session cookie, dropped when the browser closes; true: kept until it expires (within AbsoluteLifetimeHours) |
{ "Beacon": { "Authentication": { "Session": { "RevalidateMinutes": 2, "AbsoluteLifetimeHours": 8, "PersistSsoCookie": false } } }}Beacon__Authentication__Session__AbsoluteLifetimeHours=8See Sign-in and sessions for what ends a session.
Local password sign-in
Section titled “Local password sign-in”Bound from Beacon:UserManagement:LocalLogin, validated at startup.
| Key | Type | Default | What it does |
|---|---|---|---|
Enabled | bool | true | Password sign-in through the login form. false: POST /beacon/api/auth/login is not mapped (unless a break-glass account is listed), password providers refuse every account, and the login page shows no password form. Startup fails when nobody could sign in (no OIDC, no BeaconApiOptions.ExternalLogin (a host-owned login page), no break-glass account) |
BreakGlassUserNames | string[] | empty | Up to 3 stored user names (exact, case-sensitive) that may still sign in with a password while Enabled is false, at /beacon/login?local=1. A blank entry or more than 3 fail startup; a name no enabled internal user has gets a startup Warning |
See User management → Local password sign-in.
{ "Beacon": { "UserManagement": { "LocalLogin": { "Enabled": false, "BreakGlassUserNames": [ "emergency-admin" ] } } }}Beacon__UserManagement__LocalLogin__BreakGlassUserNames__0=emergency-adminWith Enabled at false, startup still needs a way to sign in: SSO, a host-owned login page or a break-glass account, as above. See Sign-in and sessions.
Optional: OIDC / SSO
Section titled “Optional: OIDC / SSO”Bound by builder.Services.AddBeaconOidcAuthentication(builder.Configuration) from Beacon:Authentication:Oidc; validated at startup when Enabled.
{ "Beacon": { "Authentication": { "Oidc": { "Enabled": true, "Authority": "https://login.microsoftonline.com/{tenant-id}/v2.0", "ClientId": "{client-id}", "AllowedTenants": [ "{tenant-id}" ], "RequiredRoles": [ "Beacon.User" ], "DisplayName": "Microsoft" } } }}| Key | Type | Default | What it does |
|---|---|---|---|
Enabled | bool | false | Turns SSO on |
Authority, ClientId, ClientSecret | string | Required | All three required when enabled. Authorization code flow with PKCE. Supply ClientSecret as Beacon__Authentication__Oidc__ClientSecret or from a secrets provider |
CallbackPath | string | /signin-oidc | The redirect callback |
Scopes | string[] | openid, profile, email | Requested scopes (replaces the list) |
AllowedTenants | string[] | empty | Entra tenant ids (tid) that may sign in. Startup fails when empty, unless AllowAnyTenant |
AllowAnyTenant | bool | false | Skip the tenant check (an identity provider without tid). A Warning at startup with an Entra authority |
BlockGuests | bool | true | Refuse Entra B2B guests (acct=1, or an idp naming another provider) |
RequiredRoles / RequiredGroups | string[] | empty | When either is set, a user must hold one listed app role (roles) or group (groups). Prefer app roles: Entra drops groups when a user is in too many |
DefaultRoleName | string | unset (no role) | Role for a user provisioned at first sign-in. May not be Admin or a functional role (startup fails) |
DisplayName | string | SSO | The SSO button’s label |
EnableFrontChannelLogout | bool | false | Serve /signout-oidc, an anonymous GET that ends the session |
RequireMfa | bool | false | Refuse an interactive SSO sign-in whose ID token shows no MFA (amr contains mfa, or acr in AcceptedAcrValues). Covers the interactive SSO sign-in only |
AcceptedAcrValues | string[] | empty | acr values that count as MFA |
McpJwksEndpoint | string (URL) | None | Sample host: with SSO enabled, turns on bearer JWT with issuer = Authority, audience = ClientId and this JWKS URL. Not read by the Beacon libraries |
Admission runs before anything is provisioned: tenant, then guest, then required role or group. See User management → Single sign-on admission.
For the full guide with worked examples, see Sign-in and sessions.
JWT bearer
Section titled “JWT bearer”Bearer tokens on the REST API and the external login API are configured in code; there is no configuration section:
builder.Services.AddBeaconJwtAuthentication(jwt =>{ jwt.EnableBearerAuthentication = true; jwt.Validation.JwksEndpoint = "https://login.microsoftonline.com/{tenant}/discovery/v2.0/keys"; jwt.Validation.ValidIssuer = "https://login.microsoftonline.com/{tenant}/v2.0"; jwt.Validation.ValidAudience = "{beacon-client-id}";});| Option | Default | What it does |
|---|---|---|
ExternalLoginEndpoint | None | The login API the login form posts to, an https URL; internal users sign in first (HybridAuthenticationProvider) |
EnableBearerAuthentication | false | Accept Authorization: Bearer <jwt> on the REST API |
AccessTokenClaim | None | For a non-Entra issuer without typ: at+jwt: a claim only its access tokens carry. A claim ID tokens carry stops startup |
Validation.SigningKey / JwksEndpoint | None | One is required. A signing key is at least 32 bytes (HS256/384/512 only); the JWKS endpoint is an https URL (RS, PS and ES 256/384/512 only). http to a loopback host is accepted in Development only |
Validation.ValidIssuer(s), ValidAudience(s) | None | At least one of each is required |
Validation.ClockSkew | 5 minutes | At most 5 minutes. Not applied to a token’s iat against the user’s last sign-out everywhere: a token issued before it is refused |
Validation.JwksRefreshInterval | 1 hour | How long fetched JWKS keys are used before the next fetch; 5 minutes to 24 hours |
Validation.JwksMaximumStaleness | 24 hours | How long the last good keys are kept while the endpoint fails; at least the refresh interval, at most 7 days |
Validation.ValidateLifetime, ValidateIssuer, ValidateAudience | true | Must stay true |
ClaimsMapping.* | sub, preferred_username, email, roles, name | Which claims hold the user id, user name, e-mail, roles and display name |
With bearer or external login on, a missing or short key, a missing issuer or audience, a validation flag turned off, a skew above 5 minutes or an http endpoint stops the host. A token must be an access token and name an existing, enabled, external Beacon user; see User management. Entra callers on /beacon/mcp are configured separately (below).
For the full guide with worked examples, see Sign-in and sessions.
MCP callers from Entra ID (Beacon:Mcp:Callers)
Section titled “MCP callers from Entra ID (Beacon:Mcp:Callers)”Validated at startup. Without the section, no JWT caller is admitted on /beacon/mcp. Active callers also need bearer JWT enabled with issuer and audience validation.
| Key | Type | Default | What it does |
|---|---|---|---|
AllowedTenants | string[] | empty | Tenants whose tokens map to a caller; required when callers are active |
Users:Enabled | bool | false | Accept delegated user tokens |
Users:RequiredRoles / RequiredGroups | string[] | empty | Any-of admission rules; both empty fails startup unless AllowAnyTenantUser |
Users:AllowAnyTenantUser | bool | false | Admit every user of the allowed tenants |
Users:ProjectIds | int[] | empty | Projects for every accepted user |
Users:GroupProjects | map group or role → int[] | empty | Extra projects per group or app role |
Users:Scope | Read | Execute | Execute | Scope of user callers |
Users:AutoProvision | bool | true | Find or create a Beacon user keyed on oid |
Users:DefaultRoleName | string | Viewer | Role for provisioned users; not Admin or a functional role |
Systems[i]:Name | string | Required | Required, unique |
Systems[i]:ClientId or ObjectId | string | Required | Exactly one: an app-only token’s client, or a service user’s oid |
Systems[i]:ProjectIds, Scope, HostClaims[] | Execute | The system caller’s projects, scope and host-endpoint claims |
See Entra ID callers.
{ "Beacon": { "Mcp": { "Callers": { "AllowedTenants": [ "00000000-0000-0000-0000-000000000000" ], "Users": { "Enabled": true, "RequiredGroups": [ "11111111-1111-1111-1111-111111111111" ], "ProjectIds": [ 1 ], "GroupProjects": { "22222222-2222-2222-2222-222222222222": [ 2, 3 ] }, "Scope": "Read", "AutoProvision": true, "DefaultRoleName": "Viewer" }, "Systems": [ { "Name": "reporting-agent", "ClientId": "33333333-3333-3333-3333-333333333333", "ProjectIds": [ 1 ], "Scope": "Execute" } ] } } }}The host also needs AddBeaconJwtAuthentication with EnableBearerAuthentication, an issuer and an audience (see JWT bearer), or startup fails. Replace the GUIDs with your tenant, group and app ids.
Data-source transport security
Section titled “Data-source transport security”Every data-source connection must authenticate the server over TLS (for example SSL Mode=VerifyFull on PostgreSQL,
SslMode=VerifyFull on MySQL, Encrypt=Mandatory or Strict without TrustServerCertificate=true on SQL Server and
Azure Synapse). The rule per engine is in Transport security (TLS).
Creating a data source, changing its connection and testing a connection refuse a connection that does not meet it.
Bound from Beacon:DataSources:Transport:
| Key | Type | Default | What it does |
|---|---|---|---|
EnforceOnExisting | bool | false | Refuses a stored data source whose connection does not meet the rule every time it connects. While false, such a source keeps working, the data-source list reports it (transportVerified: false) and the log carries one Warning per data source per process |
AllowInsecure | bool | false | Lifts the rule for new, changed and stored connections alike. For development hosts whose local databases have no TLS; outside Development the host logs a Warning at startup while it is set. The sample host sets it in appsettings.Development.json only |
{ "Beacon": { "DataSources": { "Transport": { "EnforceOnExisting": true } } } }Host-managed data sources follow the same rules, applied to the ConnectionStrings:{Name} value each time they connect.
That value is checked as a stored connection, never refused as a new one: a value that does not meet the rule is logged
as a Warning, and refused only while EnforceOnExisting is true.
For the full guide with worked examples, see Data-source connections.
Data-source driver options and hosts
Section titled “Data-source driver options and hosts”Each connector also refuses driver options that act on the Beacon host or sign in as it (the list per engine is in
Driver options and hosts), on create, change and test connection;
a stored source gets one Warning per process instead, and is refused under
Beacon:DataSources:Transport:EnforceOnExisting; a host-managed source gets the host list only. Beacon:DataSources:Transport:AllowInsecure lifts the option rule,
never the host list. Bound from Beacon:DataSources:
| Key | Type | Default | What it does |
|---|---|---|---|
AllowedHosts | string[] | [] | The hosts a data-source connection may reach: exact host names or IP addresses, or *.example.com for the hosts below example.com (ASCII; an internationalised name in its xn-- form). Empty leaves hosts unrestricted. While set, a connection reaching an unlisted host, a host that is not a bare host name or IP address, or one whose hosts cannot be told, is refused; a BigQuery source needs oauth2.googleapis.com. The list matches names, and resolved addresses are not pinned to it (the REST API and Databricks connectors also check the addresses they connect to, see HTTP data-source addresses). An entry with a scheme, port or path fails startup |
AllowHostCredentials | bool | false | Accepts connections that sign in as the Beacon host: integrated or Kerberos security, a managed, workload or default cloud identity, an AWS profile or IAM role, BigQuery application default credentials, a certificate store, a client certificate or key file on the Beacon host (PostgreSQL SSL Certificate, SSL Key, SSL Password; MySQL a .pfx CertificateFile/SslCa, CertificatePassword, SslCert, SslKey; a CA file that only verifies the server — Root Certificate, a PEM SslCa, ServerCertificate — needs no option), a local socket or named pipe, a PostgreSQL pgpass file |
{ "Beacon": { "DataSources": { "AllowedHosts": [ "*.db.example.com", "adb-1234567890123456.7.azuredatabricks.net" ] } } }For the full guide with worked examples, see Data-source connections.
HTTP data-source addresses
Section titled “HTTP data-source addresses”The REST API and Databricks connectors resolve a data source’s host when they connect and connect only to an address these rules allow; an address they refuse is never dialled, and the error names the rule, never the address or URL:
- loopback (
127.0.0.0/8,::1) is refused unlessAllowLoopbackbelow istrue(orBeacon:DataSources:Transport:AllowInsecure, development hosts only, which also lifts the TLS and option checks); - private networks (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,100.64.0.0/10,fc00::/7) are allowed unlessAllowPrivateNetworksbelow isfalse; - link-local and cloud metadata addresses (
169.254.0.0/16,fe80::/10and the providers’ metadata addresses), unspecified, multicast and reserved addresses are always refused.
An IPv4 address written in an IPv6 form (for example ::ffff:169.254.169.254) is judged as the IPv4 address it carries.
Through a system proxy, the destination’s resolved addresses are checked before the request is sent and the proxy
connects; configure its egress policy to refuse the same destinations. Bound from Beacon:DataSources:Outbound:
| Key | Type | Default | What it does |
|---|---|---|---|
AllowPrivateNetworks | bool | true | Lets the REST API and Databricks connectors reach private network addresses. Set false where every HTTP data source is on the public internet; otherwise consider listing the allowed hosts in Beacon:DataSources:AllowedHosts |
AllowLoopback | bool | false | Lets the REST API and Databricks connectors reach loopback addresses: an endpoint on the Beacon host itself, or a local sidecar or tunnel. The TLS and connection option checks stay on |
{ "Beacon": { "DataSources": { "Outbound": { "AllowPrivateNetworks": false } } } }For the full guide with worked examples, see Data-source connections.
Authorization
Section titled “Authorization”Bound from Beacon:Authorization, validated at startup. Whether authorization is on at all is code-only (options.Authorization.Enabled). See Authorization.
| Key | Type | Default | What it does |
|---|---|---|---|
RequireProjectMembership | bool | false | Restrict every project to its members and Admins; data sources no project links become Admin-only. Startup fails without a membership source (Beacon user management or a host IProjectMembershipSource) |
{ "Beacon": { "Authorization": { "RequireProjectMembership": true } }}Beacon__Authorization__RequireProjectMembership=trueThis needs Beacon user management or a host IProjectMembershipSource, or startup fails.
Functional permissions: role names, identity-provider app roles, separation of duties
Section titled “Functional permissions: role names, identity-provider app roles, separation of duties”{ "Beacon": { "Authorization": { "Roles": { "Auditor": "Compliance Reviewer", "HonourHostRoleClaims": false }, "IdpRoles": { "Enabled": true, "Map": { "beacon.auditor": "Auditor" }, "ClaimLifetimeMinutes": 60 }, "SeparationOfDuties": { "Enabled": true } } }}| Key | Type | Default | What it does |
|---|---|---|---|
Roles:Approver, Auditor, SecurityAdmin, UserAdmin, DataSourceAdmin, MigrationOperator | string | the permission’s name | The level-0 system role that grants the permission. At most 50 characters, not Admin, Editor or Viewer, unique across permissions (ignoring case); blank keeps the default |
Roles:HonourHostRoleClaims | bool | false | Host without Beacon user management: let session role claims named like a permission’s role grant it. No effect with user management |
IdpRoles:Enabled | bool | false | Map identity-provider app roles to permissions at SSO sign-in (session claims only, never stored). Needs at least one Map entry |
IdpRoles:Map | map app role → permission | empty | Only the six permissions; never Admin, Editor or Viewer |
IdpRoles:ClaimLifetimeMinutes | int | 60 | 1–1440. How long a mapped permission counts after the sign-in |
SeparationOfDuties:Enabled | bool | false | Refuse (400) assignments giving one user Approver + SecurityAdmin, Auditor + SecurityAdmin, Auditor + UserAdmin, UserAdmin + Approver or UserAdmin + MigrationOperator; an IdpRoles:Map onto such a pair fails startup |
User management and first-run setup
Section titled “User management and first-run setup”User management itself is code-only (Code-only options); these keys are bound from configuration:
| Key | Type | Default | What it does |
|---|---|---|---|
Beacon:UserManagement:SetupToken | string | unset | The secret first-run setup asks for. At least 32 characters after trimming, or startup fails (checked when user management is on). Unset: Beacon generates a token per process and prints it once to the process console (standard error, never the log) while no super admin exists. Set it when several replicas serve the setup page |
Beacon:UserManagement:LocalLogin:* | See Local password sign-in |
Login attempts are throttled at 10 per 60 seconds per client address; the first-run setup endpoints have their own budget. Neither is configurable.
{ "Beacon": { "UserManagement": { "SetupToken": "<at least 32 random characters>", "MinimumPasswordLength": 12 } }}Supply the token as a secret, not in a file:
Beacon__UserManagement__SetupToken="<at least 32 random characters>"API keys
Section titled “API keys”Bound from Beacon:ApiKeys, validated at startup. See API keys.
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
MaxLifetimeDays | int | 365 | 1–3650 | Longest lifetime a new key may have; a key created without a date gets 90 days, capped at this |
EnforceMaxLifetimeOnExistingKeys | bool | false | A key stored without an expiry expires MaxLifetimeDays after creation. Off: such keys keep working and warn once per process | |
MaxOwnerInactivityDays | int | 0 (off) | 0–3650 | A key stops working (401) while its owner has not signed in with their own identity for this many days |
Scopes are Read and Execute; a key stored with the retired Admin scope is read as Execute.
{ "Beacon": { "ApiKeys": { "MaxLifetimeDays": 180, "EnforceMaxLifetimeOnExistingKeys": true, "MaxOwnerInactivityDays": 60 } }}Query execution row cap
Section titled “Query execution row cap”Bound from Beacon:Query, validated at startup. These apply to every statement Beacon runs for its own features: previews, subscription runs, AI actor checks, ad-hoc queries.
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
MaxExecutionRows | int | 100000 | 1–10,000,000 | The most rows one statement may return. The cap is written into the SQL (a larger LIMIT/TOP/FETCH is lowered to it); on PostgreSQL, MySQL, SQL Server, Azure Synapse and Snowflake the read also stops one row past it, BigQuery stops reading the job’s result there, and Databricks returns no more than that (row_limit). A larger result fails the run, never truncates, with a message naming the key. Rows are held in memory |
StatementTimeoutSeconds | int | 120 | 1–3600 | Cancels one statement: a query step, a final query on the in-memory join, a metadata sample. A subscription’s own timeout may only be shorter (saving a longer one is refused). On Snowflake the session also runs under STATEMENT_TIMEOUT_IN_SECONDS of this value, so the server stops the statement too |
MaxResultBytes | long | 268435456 (256 MiB) | greater than 0 | The most bytes one statement’s result may hold while it is read from a PostgreSQL, MySQL, SQL Server, Azure Synapse or Snowflake data source, capped or not, and while a final query’s result is read from the in-memory join. Estimated as the rows arrive: each row 32 bytes plus 8 a column, each value at least 8 bytes (text two bytes a character, binary its length, a number, date, time or identifier 16, an array, list, record or map its elements however deeply nested, any other value two bytes a character of its text form). A larger result fails the run as soon as it passes the limit, with “The result is larger than the N-byte limit (Beacon:Query:MaxResultBytes); select fewer columns or rows.”; no value or row is cut short. One row (on PostgreSQL, one value) is read whole before it is counted, and the rows are copied on their way to the caller, so peak memory can be a few times the limit. Not the MCP Max result size (maxResultBytes in the MCP settings), which bounds the result an MCP tool returns to its client — see MCP server |
Opening a connection to a PostgreSQL, MySQL, SQL Server or Azure Synapse data source waits at most 30 seconds: a connection string that sets no connect timeout (Timeout, Connection Timeout, Connect Timeout), or 0, gets 15 seconds, and a longer one is lowered to 30. Snowflake keeps its driver’s own login timeout.
Data migration reads use Beacon:Migrations:MaxRows instead. The MCP tools that run SQL use the project’s MCP statement timeout (30 seconds by default).
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
Beacon:Metadata:ForcedRefreshCooldownMinutes | int | 15 | 0–1440 (0 = off) | After a successful forced metadata refresh of a data source, the next one answers 429 until this passes. Per process; Admins and DataSourceAdmins are not held to it. Validated at startup |
Beacon:AiActors:ThinkCooldownMinutes | int | 15 | 0–1440 (0 = off) | An AI actor’s think cycle starts at most once per this many minutes, from its last think time. Background cycles within it are skipped; an on-demand cycle is refused with the time left. Validated at startup |
Beacon:AiActors:PlanExpiryDays | int | 7 | 1–365 | An AI actor’s plan awaiting approval expires this many days after it was proposed: it is no longer listed as pending, and approving, rejecting or revising it answers 409. Computed when read. Validated at startup |
{ "Beacon": { "Query": { "MaxExecutionRows": 50000, "StatementTimeoutSeconds": 60, "MaxResultBytes": 134217728 }, "Metadata": { "ForcedRefreshCooldownMinutes": 30 }, "AiActors": { "ThinkCooldownMinutes": 30, "PlanExpiryDays": 3 } }}Beacon__Query__MaxExecutionRows=50000For how the gate caps and refuses statements, see SQL execution gate.
Request limits
Section titled “Request limits”Bound from Beacon:RateLimits, validated at startup. Each limit is a fixed window: PermitLimit requests per WindowSeconds (1–3600, default 60) in each partition; PermitLimit is 0–100,000 and 0 turns that limit off. An authenticated caller is one partition per credential (an API key by its id, a mapped MCP caller by its subject hash, a signed-in user), an anonymous one per client address: an IPv4 address (also one mapped into IPv6) whole, an IPv6 address by its /64 block, so one client cannot spread its requests over the addresses of its block. Each limit keeps at most Beacon:RateLimits:MaxPartitions partitions (default 10000, 100–1,000,000); a new one beyond that replaces the one used least recently, which starts over with a full budget. The address is HttpContext.Connection.RemoteIpAddress, which UseForwardedHeaders rewrites only as your host configures it: behind a reverse proxy without forwarded headers every caller shares the proxy’s partition (see Production checklist). Beacon’s endpoints apply the limits themselves, on Beacon’s routes only; AddRateLimiter/UseRateLimiter are not needed and a host’s own limiter does not change them. The counts are kept in memory, so with N instances behind a load balancer a caller can reach N times a limit. Over a limit the answer is 429 as application/problem+json with Retry-After (whole seconds).
| Key | Default | Partition | What it limits |
|---|---|---|---|
Login | 10 a minute | client address | Password sign-in (POST /beacon/api/auth/login), and first-run setup in its own partition |
Api | 600 a minute | caller (anonymous: address) | Every /beacon/api request |
Anonymous | 30 a minute | client address | Anonymous requests to Beacon’s routes answered 401 (no credential, an unknown or expired API key or bearer token); over it they get 429 instead |
Mcp | 60 a minute | API key or MCP caller | Every request to /beacon/mcp |
Ask | 10 a minute | caller | The ask tool, through MCP and the playground; over it the tool answers an error (audited like every refusal) |
Feedback | 30 a minute | caller | The feedback tool, through MCP and the playground; over it the tool answers an error with a retry time (audited like every refusal) |
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
Beacon:RateLimits:Lockout:Enabled | bool | true | Apply the lockout. false (or MaxFailedAttempts 0) turns it off: password sign-in is then limited only per client address by Login | |
Beacon:RateLimits:Lockout:MaxFailedAttempts | int | 5 | 0–100 (0 = off) | After this many wrong passwords an internal user’s password sign-in, and the password change of a signed-in user, is locked. Counted per user (stored on the user, so it holds across instances), a wrong current password on a password change included; a name no user has is counted against nobody. The break-glass accounts (Beacon:UserManagement:LocalLogin:BreakGlassUserNames) are never locked: they are limited per client address by Login, and get the growing delay of BreakGlassThrottle only when you turn it on |
Beacon:RateLimits:Lockout:DurationMinutes | int | 15 | 1–1440 | How long the lock lasts. While locked every password, the right one included, gets the same generic answer as a wrong one, after the same password check; wrong passwords while locked do not extend it. The lock is decided after the password check, together with the write that clears the count, so attempts already in flight when another attempt locks the user are refused too. A successful sign-in, the lock itself, an administrator’s password reset and a wrong password sent this long or longer after the previous one start the count again. A lock records auth.user_locked_out and logs UserLockedOut (7124); a refused attempt records auth.password_sign_in_refused with reason locked_out |
Beacon:RateLimits:BreakGlassThrottle:Enabled | bool | false | Delay a break-glass account’s password sign-in after repeated wrong passwords. The account is never locked: the delay ends on its own. On, a per-account growing delay limits password guessing from many addresses, but anyone who knows the name can keep the account delayed. Off (the default), only the per-address Login limit applies | |
Beacon:RateLimits:BreakGlassThrottle:FailedAttemptsBeforeDelay | int | 5 | 0–100 (0 = off) | The wrong password that starts the first delay. Counted per account like the lockout |
Beacon:RateLimits:BreakGlassThrottle:InitialDelaySeconds | int | 30 | 1–MaxDelaySeconds | The first delay. Each further wrong password once the delay has ended doubles it. During a delay every password, the right one included, gets the generic answer after the same password check and does not extend it |
Beacon:RateLimits:BreakGlassThrottle:MaxDelaySeconds | int | 300 | 1–3600 | The longest delay |
Beacon:RateLimits:BreakGlassThrottle:ResetAfterMinutes | int | 60 | 1–1440, longer than MaxDelaySeconds | A successful sign-in, an administrator’s password reset or this long without a wrong password starts the count again. A delay logs UserLockedOut (7124) and is recorded as the attempt’s event: auth.user_locked_out with breakGlassDelay and delaySeconds in place of auth.password_sign_in_failed |
The lockout counts per user, not per client: anyone who knows a user name can lock that user’s password sign-in by sending wrong passwords, and again each time the lock ends (the per-address Login limit slows this down, but several addresses get past it). That denial of service is the price of a hard cap on password guessing. Keep a break-glass account for emergencies (it is never locked; with BreakGlassThrottle on it is delayed for at most MaxDelaySeconds at a time), prefer single sign-on for everyday users, or set Lockout:Enabled to false when the denial of service weighs more for your deployment than the cap.
{ "Beacon": { "RateLimits": { "Login": { "PermitLimit": 5, "WindowSeconds": 60 }, "Api": { "PermitLimit": 300, "WindowSeconds": 60 }, "Anonymous": { "PermitLimit": 20 }, "Mcp": { "PermitLimit": 120, "WindowSeconds": 60 }, "Ask": { "PermitLimit": 5, "WindowSeconds": 60 }, "Feedback": { "PermitLimit": 30, "WindowSeconds": 60 }, "MaxPartitions": 20000, "Lockout": { "Enabled": true, "MaxFailedAttempts": 5, "DurationMinutes": 30 }, "BreakGlassThrottle": { "Enabled": true, "FailedAttemptsBeforeDelay": 3, "InitialDelaySeconds": 30, "MaxDelaySeconds": 300, "ResetAfterMinutes": 60 } } }}Beacon__RateLimits__Api__PermitLimit=300For every setting with examples and what a refusal looks like, see Rate and request limits.
Request size and time limits
Section titled “Request size and time limits”Bound from Beacon:RequestLimits, validated at startup. They apply to Beacon’s own routes only (/beacon/api, the hub under it and /beacon/mcp), through UseBeaconAuthentication(), and a host’s own limit wins where it is stricter: a lower Kestrel MaxRequestBodySize is never raised. 0 turns one bound off. They do not touch the 5-minute Kestrel keep-alive and header timeouts or the 5-minute HttpClient timeout that AI calls need (see Host setup).
| Key | Type | Default | What it does |
|---|---|---|---|
ApiMaxBodyBytes | long | 2097152 | Largest request body on /beacon/api; a larger one answers 413 |
McpMaxBodyBytes | long | 4194304 | Largest request body on /beacon/mcp |
ApiTimeoutSeconds | int | 300 | A /beacon/api request still running after this has its cancellation token cancelled and, if nothing was sent yet, answers 504. The hub and the routes that run long work inline (migration run, metadata refresh, documentation generation, repository scan, eval run, playground tool run) are exempt and keep their own timeouts. A host’s own long route opts out with .WithBeaconLongRunning() |
HubMaxReceiveMessageBytes | long | 8192 | Largest message the hub takes from a client (it has no client-callable methods) |
HubMaxParallelInvocationsPerClient | int | 1 | Hub invocations in flight per connection |
HubClientTimeoutSeconds | int | 30 | Silence after which the hub drops a connection |
McpMaxIdleSessions | int | 1000 | Idle MCP sessions kept in memory (HttpServerTransportOptions.MaxIdleSessionCount; the SDK default is 10,000). A session is dropped after 30 idle minutes |
McpMaxInitializesPerCaller | int | 60 | MCP initialize requests one caller (API key, mapped caller, user or address) may send per window; more answer 429 with Retry-After. Per instance, in memory |
McpInitializeWindowSeconds | int | 60 | The window of the previous key |
A host that configures SignalR (BeaconApiOptions.ConfigureSignalR, AddHubOptions) or HttpServerTransportOptions itself overrides the hub and idle-session values.
{ "Beacon": { "RequestLimits": { "ApiMaxBodyBytes": 1048576, "McpMaxBodyBytes": 2097152, "ApiTimeoutSeconds": 120, "HubMaxReceiveMessageBytes": 8192, "HubMaxParallelInvocationsPerClient": 1, "HubClientTimeoutSeconds": 30, "McpMaxIdleSessions": 500, "McpMaxInitializesPerCaller": 30, "McpInitializeWindowSeconds": 60 } }}Beacon__RequestLimits__ApiMaxBodyBytes=1048576For every setting with examples and what a refusal looks like, see Rate and request limits.
Subscription limits
Section titled “Subscription limits”Bound from Beacon:Subscriptions, validated at startup.
| Key | Type | Default | Range | What it does |
|---|---|---|---|---|
MinIntervalMinutes | int | 5 | 1–1440 | The shortest time between two runs of a subscription’s cron schedule (in UTC). Creating a subscription with a schedule that fires more often (an AI actor’s included), or changing one to it, is refused; a subscription saved before keeps its schedule through other edits and a reactivation |
MaxAttachmentBytes | int | 10485760 (10 MB) | 65,536–104,857,600 | The largest file a subscription attaches to its email. A larger CSV or XLSX keeps only its first rows that fit (a CSV exactly as many; an XLSX file can keep somewhat fewer), and the email says how many of the rows it delivers the file holds; a first row larger than the limit leaves the column headers only, and headers larger than the limit leave no attachment. The email itself is about 1.33 times the attachment’s size (base64 encoding), so keep the limit below your mail server’s message limit |
See Subscriptions.
{ "Beacon": { "Subscriptions": { "MinIntervalMinutes": 15, "MaxAttachmentBytes": 5242880 } }}Reports (Beacon:Reports)
Section titled “Reports (Beacon:Reports)”| Key | Type | Default | What it does |
|---|---|---|---|
NeutralizeFormulas | bool | true | A text cell of a CSV or XLSX attachment that starts with =, +, -, @, a tab or a carriage return is written so a spreadsheet reads it as text: a CSV cell gets a leading ', an XLSX cell the quote prefix. Numbers, dates and booleans are never touched. Set false only when the file is not opened in a spreadsheet |
{ "Beacon": { "Reports": { "NeutralizeFormulas": true } }}Data migration
Section titled “Data migration”Bound from Beacon:Migrations, validated at startup. A deployment lock: only configuration turns it on.
| Key | Type | Default | What it does |
|---|---|---|---|
Enabled | bool | false | Maps the migration endpoints, shows the feature, lets jobs run and lets an Admin mark data sources as migration write targets. Off: nothing runs, for Admins too |
MaxRows | int | 100000 | 1–10,000,000. One run’s read and write budget; a larger source fails before anything is written |
See Data migration.
{ "Beacon": { "Migrations": { "Enabled": true, "MaxRows": 500000 } }}Beacon__Migrations__Enabled=trueApproval workflow
Section titled “Approval workflow”The four-eyes workflow is off unless the host turns it on, in code. See Approvals for what it governs.
builder.Services.AddBeaconServices(builder.Configuration, options =>{ // ... options.EnableApprovalWorkflow(x => { x.RequireApprovedVersionToRun = true; // strict mode });});Option (options.ApprovalWorkflow.*) | Default | What it does |
|---|---|---|
Enabled | false | Every change to a query’s executable content waits for a second person’s approval; subscriptions run only reviewed SQL |
AllowSelfApproval | false | Lets the requester approve their own change (for a host with one approver) |
RequireApprovedVersionToRun | false | Strict mode: a subscription or saved-query MCP tool runs only a version approved for exactly its content |
CoversMigrationJobs | true | While the workflow is on, a new migration job runs only after approval |
CoversCustomSqlRules | true | While the workflow is on, a new or changed Custom SQL rule is evaluated only after approval |
CoversRecipientDestinations | true | While the workflow is on, a new recipient or changed destination receives nothing until approved |
CoversDataSourceConnections | false | While the workflow is on, a new data source or a connection changed in anything but its secrets connects to nothing until approved |
CoversLlmConnection | false | While the workflow is on, a change of the stored LLM connection’s provider, endpoint, region or authentication mode waits for a live Admin’s approval; the stored connection stays in use meanwhile |
CoversAdminRoleGrants | false | While the workflow is on, giving a user the Admin role (a new user or a role change) waits until another live Admin approves it, whatever AllowSelfApproval says; removing it, and functional roles, apply at once |
LlmConnectionRequestDays | 7 | How long a staged LLM connection change waits for a decision before it expires and what it staged is wiped; held between 1 and 30 |
The Covers… switches apply only while Enabled is on. Turning a switch, or the workflow, off releases what it held; startup warns with the counts. Startup also logs how changes are governed (a Warning outside Development while the workflow is off).
Security audit trail
Section titled “Security audit trail”Beacon records sign-ins and changes to identities, keys, access, data sources, delivery, settings, approvals, ownership, tasks, curation, data quality and migrations in an append-only, signed trail an Auditor reads (see Security audit trail). It needs no configuration; these settings tune it:
{ "Beacon": { "Audit": { "IntegrityKey": "<from a secret store>", "PreviousIntegrityKeys": [], "RetentionDays": null, "Required": false } }}| Key | Type | Default | What it does |
|---|---|---|---|
Beacon:Audit:IntegrityKey | string | derived | The secret events are signed with: at least 32 characters, supplied like the encryption key (a secret store, or Beacon__Audit__IntegrityKey), never committed. Unset, Beacon derives a key for this purpose from Beacon:Mcp:CallerHashKey, else from Beacon:EncryptionKey. Set it before you change the encryption key |
Beacon:Audit:PreviousIntegrityKeys | string[] | empty | Integrity keys used earlier, as a list (Beacon__Audit__PreviousIntegrityKeys__0, …): accepted when verifying events, never used to sign. Move the old key here when you set a new one |
Beacon:Audit:RetentionDays | int | none (keep forever) | Days events are kept: between 365 and 36500. The purge must be scheduled; the sample host runs it daily as the Warp job security-audit-retention (see Retention) |
Beacon:Audit:Required | bool | false | When true, a successful sign-in (password or single sign-on) whose security audit event cannot be written is refused with the generic sign-in failure and no session, and logged at Error (Beacon.Audit 9115). Failed sign-ins and other refusals are unchanged (their event falls back to the log stream, 9107). While the audit table cannot be written nobody can sign in, so alert on 9115. A break-glass sign-in is the exception: admitted without its event and logged at Error (9116). See How events are written |
An integrity key shorter than 32 characters or containing ${, or a retention outside the range, stops the host at startup with a message that never contains a key. At startup the host logs the id of the key events are sealed under and where it comes from (never the key), with a Warning while IntegrityKey is unset.
Two jobs keep the trail checked and bounded; neither runs unless the host schedules it. The sample host schedules both as Warp recurring jobs: security-audit-verify (hourly at :15), which verifies the events written since its last run and writes a checkpoint to the Beacon.Audit log stream, and security-audit-retention (daily), the purge. A host embedding Beacon schedules ISecurityAuditVerificationService.VerifyNewEventsAsync and ISecurityAuditRetentionService.PurgeExpiredAsync itself (see Scheduled verification). Alert on the counters beacon.security_audit.write_failures and beacon.security_audit.verification_failures above zero.
AI / LLM
Section titled “AI / LLM”Bound from Beacon:LLM by builder.Services.AddBeaconAI(builder.Configuration). Optional; not validated. AI features also need options.UseAI = true.
| Key | Type | Default | What it does |
|---|---|---|---|
Provider | OpenAI | Claude | AzureOpenAI | Bedrock | OpenAI | The provider (Claude is Anthropic). Bedrock needs Moberg.Beacon.AI.Bedrock + AddBeaconBedrock() |
ApiKey | string | "" | The provider key. Bedrock: a legacy accessKey:secretKey pair, used when AwsAccessKeyId and AwsSecretAccessKey are both empty (under IamRole with a logged warning) |
BedrockAuthMode | IamRole | AccessKey | TemporaryCredentials | IamRole | Bedrock credentials: the default AWS credential chain, the access key pair, or the pair with SessionToken |
AwsAccessKeyId, AwsSecretAccessKey | string | None | The Bedrock access key pair for AccessKey and TemporaryCredentials; one without the other fails |
Endpoint | string | None | Required for AzureOpenAI. An https URL; http only for a loopback host (localhost, 127.0.0.1, [::1]) or while AllowInsecureEndpoint is set. Checked when the provider is built, when an Admin saves a new endpoint for Azure OpenAI and when the connection is tested; the other providers do not read it |
AllowInsecureEndpoint | bool | false | Accepts an http endpoint on any host. For development and closed test networks only: the key and every prompt then travel unencrypted |
Region | string | None | Required for Bedrock |
SessionToken | string | None | Bedrock temporary credentials |
Model | string | "" | The model; for Azure the deployment name, for Bedrock the model id |
FastModel | string | None | Model for the short classification calls on the ask path (intent classification and data-source routing). Empty or equal to Model: those calls use Model, as does every other call. If the fast model fails when called, the call is served once on Model |
Limits:MaxConcurrentRequests | int | 50 | Concurrency of the LLM request queue; a value saved in Admin Settings replaces it without a restart. Background work (documentation generation, indexing, learning, scheduled actor cycles, eval judging) holds at most half the slots (at least one) |
Limits:InteractiveQueueWaitSeconds | int | 60 | How long an interactive call waits for a free slot before it fails with The LLM is busy. Try again later. (LlmQueueSaturatedException). Non-positive: the default; at most 3600 |
Limits:BackgroundQueueWaitSeconds | int | 300 | The same wait for background work. Non-positive: the default; at most 3600 |
Limits:MaxQueuedRequests | int | 200 | How many interactive calls may wait for a slot at once; background work may have half as many waiting (at least one). One more fails as busy at once. Non-positive: the default |
Limits:RateLimitsEnabled | bool | false | Enforce TokensPerMinute and RequestsPerMinute (a per-minute token bucket each; a call that cannot get its share within its queue wait fails as busy). Admin Settings’ Enforce requests/tokens per minute replaces it once saved; like the other limits saved there, the stored value is applied again at startup |
Limits:TokensPerMinute, RequestsPerMinute | int, int | 80000, 1000 | Applied only while RateLimitsEnabled is on; 0 or less is unlimited. A call reserves its prompt characters / 4 plus its maximum answer tokens and settles them with the reported usage |
Limits:MonthlyBudget | decimal | 100.00 | Recorded, not enforced (Beacon keeps no record of spend) |
{ "Beacon": { "LLM": { "Provider": "Claude", "Model": "<model-id>", "FastModel": "<fast-model-id>" } }}export Beacon__LLM__ApiKey="<provider key>"Whatever the endpoint, the LLM clients resolve its host when they connect and never connect to a link-local or cloud
metadata address (169.254.0.0/16, fe80::/10 and the providers’ metadata addresses), nor to an unspecified, multicast
or reserved one; loopback and private network addresses stay allowed for local and on-premises gateways. An Azure OpenAI
endpoint stored with http on another host stops working until it is replaced or AllowInsecureEndpoint is set: the
host logs a Warning at startup naming where the endpoint comes from (Admin settings or Beacon:LLM:Endpoint, never the
URL), and another when the provider cannot be built.
At startup the provider is built from Beacon:LLM. Saving the AI provider in Admin settings swaps it immediately, without a restart; after a restart Beacon:LLM applies again until the settings are saved. Keep Beacon:LLM in step with Admin settings, or save them again after a restart. See AI providers.
For the full guide with worked examples, see LLM data safety.
Local embeddings (Beacon:Embeddings)
Section titled “Local embeddings (Beacon:Embeddings)”| Key | Type | Default | What it does |
|---|---|---|---|
Enabled | bool | false | Run a local ONNX embedding model in-process for semantic retrieval |
ModelPath | string | None | The ONNX model file (384 dimensions, for example bge-small-en-v1.5) |
TokenizerPath | string | None | The WordPiece vocabulary file |
These keys are read by the Moberg.Beacon.AI.Embeddings.Onnx package (AddBeaconOnnxEmbeddings()). The service is available only when Enabled is true and both files exist; otherwise retrieval falls back to lexical matching. On PostgreSQL the vectors live in a pgvector column, so the vector extension must be available to Beacon’s migrations; on SQL Server they are compared in memory. The sample host re-indexes every 12 hours (mcp-embedding-reindex, mcp-docchunk-reindex).
{ "Beacon": { "Embeddings": { "Enabled": true, "ModelPath": "/opt/beacon/models/bge-small-en-v1.5.onnx", "TokenizerPath": "/opt/beacon/models/vocab.txt" } }}GitHub repository scan (Beacon:GitHub)
Section titled “GitHub repository scan (Beacon:GitHub)”A project’s repository scan reads source files from https://github.com with the repository’s stored token. Only https://github.com/owner/repo URLs (or owner/repo) are scanned; a URL on another Git host (GitHub Enterprise Server, GitLab, Azure DevOps) fails the scan with a message saying so, and no request is made. Every scan is bounded:
| Key | Type | Default | Meaning |
|---|---|---|---|
MaxFilesPerRepository | int | 5000 | The most source files read from one repository. The rest are left out |
ScanTimeout | timespan | 00:05:00 | The longest one repository scan runs. A scan that reaches it keeps what it found |
MaxFileBytes | int | 1000000 | A larger source file is skipped |
MaxTreeResponseBytes | int | 33554432 | The most bytes read from the repository’s file list |
TaskDeadline | timespan | 03:00:00 | The longest a background scan of a project’s repositories runs: no repository’s scan starts after it, and the ones left count as not scanned. More than zero and at most 24 hours, checked at startup |
A scan that hits a bound still ends as completed, and its error text starts with “Partial scan:” and names what was left out (files over the cap, files over the size limit, the time limit, files that could not be read, or a file list GitHub itself truncated), so a partial result is never mistaken for a full one. The project’s repository list marks such a repository Partial with the reasons (partialScan and partialScanReasons on each repository of GET /beacon/api/projects/{id}), and POST /beacon/api/projects/{id}/scan returns them in partialScans. Scan repositories on a project’s
Repositories tab (an Editor’s) starts the scan as a background task, POST /beacon/api/projects/{id}/scans (202 with
{ taskId, jobId, state }; progress at GET /beacon/api/projects/{id}/scans/{taskId}, whose warningCount is the
repositories that failed, were only partly scanned or were not scanned before TaskDeadline): it runs as the user who
started it, checks again that they may still change the project (forbidden otherwise), and each repository keeps these
bounds. One scan of a project is queued or running at a time (409 for a second). Before each repository the task
records that it is still going; one silent for TaskDeadline plus ScanTimeout plus 15 minutes is given up
(abandoned), and a task given up stops before its next repository. The scan is on record when it ends
(access.repository_scan_ran, with the ids of the repositories it scanned then, which can include one added after the
start, and its counts; refused with the reason when it was skipped). The
in-request POST /beacon/api/projects/{id}/scan stays for Beacon 5.0 callers. The time limit also covers reading the repository’s metadata and file list: a scan that reaches it before the file list is read fails. A scan replaces the repository’s code references only when it finishes; one that fails or is cancelled by the caller keeps the previous references.
{ "Beacon": { "GitHub": { "MaxFilesPerRepository": 2000, "ScanTimeout": "00:03:00", "MaxFileBytes": 500000, "MaxTreeResponseBytes": 16777216, "TaskDeadline": "02:00:00" } }}Notification destinations (optional)
Section titled “Notification destinations (optional)”Bound from Beacon:Notifications, validated at startup (each bad entry is named); the effective policy is logged once.
| Key | Default | What it does |
|---|---|---|
AllowedHosts:Slack / Teams / Jira | empty | Extra hosts on top of the built-in ones: Slack hooks.slack.com; Teams *.webhook.office.com, *.logic.azure.com, *.environment.api.powerplatform.com; Jira *.atlassian.net, api.atlassian.com. *.example.com matches subdomains only; *.com is refused |
AllowedHosts:Webhook | empty (any public host) | When set, the only hosts a webhook may target |
AllowedHosts:Email | empty (any domain) | When set, the only e-mail domains |
DisabledTypes | empty | Types this host does not deliver: Email, Teams, Slack, Jira, Webhook |
AllowedPrivateNetworks:Webhook / Slack / Teams / Jira | empty | IP addresses, CIDR ranges or host names that calls of that type may still reach though private |
AllowedHeaders | empty | Webhook header names allowed besides Authorization, Api-Key, X-Api-Key, Ocp-Apim-Subscription-Key. Reserved names (Host, Content-Length, X-Forwarded-*, Metadata-Flavor, …) are refused |
Nat64Prefixes | empty | Extra NAT64 /96 prefixes besides 64:ff9b::/96. An address under one is judged by the IPv4 address it carries, by the notification calls and also by the HTTP data-source and LLM clients’ address checks |
UseSystemProxy | false | Send notification calls through the system proxy, with the destination checked before sending. Requires AllowedHosts:Webhook (or Webhook disabled) |
RequireEncryptedSecrets | false | Refuse to send to a recipient whose secrets are still stored unencrypted |
Slack, Teams, Jira and webhook destinations need https without user credentials. Calls never follow redirects, time out after 30 seconds (10 seconds to connect), and by default connect directly, only to public addresses Beacon resolved and checked itself.
Recipients saved by an older version keep working with unencrypted secrets until saved again or until IRecipientSecretEncryptionService.EncryptStoredSecretsAsync runs (the sample’s EncryptRecipientSecretsJob, which the host enqueues once every node runs the new version; an earlier version cannot read the encrypted secrets). Then set RequireEncryptedSecrets to true. Notification URLs are secrets: leave notification calls out of HTTP tracing (NotificationRequests.IsNotificationRequest). See Notifications.
{ "Beacon": { "Notifications": { "AllowedHosts": { "Slack": [], "Teams": [ "*.webhook.example.com" ], "Jira": [], "Webhook": [ "hooks.example.com" ], "Email": [ "example.com" ] }, "DisabledTypes": [ "Jira" ], "AllowedPrivateNetworks": { "Webhook": [ "10.20.0.0/16" ] }, "AllowedHeaders": [ "X-Tenant-Id" ], "Nat64Prefixes": [], "UseSystemProxy": false, "RequireEncryptedSecrets": true } }}Email adapter
Section titled “Email adapter”Beacon’s libraries ship no email implementation. Register your own IEmailAdapter with options.AddEmailAdapter<T>(). The sample host’s BeaconMailSender reads these keys, at send time:
| Key | Default | What it does |
|---|---|---|
Beacon:Smtp:Host | required | SMTP server |
Beacon:Smtp:Port | 465 | Port |
Beacon:Smtp:EnableSsl | true | TLS |
Beacon:Smtp:Username | required | Login |
Beacon:Smtp:Password | required | Password; supply as a secret |
Beacon:Smtp:FromAddress | required | Sender address |
A missing required key fails the send, not the startup. These keys belong to the sample’s adapter; a host with its own adapter reads whatever it needs.
{ "Beacon": { "Smtp": { "Host": "smtp.example.com", "Port": 587, "EnableSsl": true, "Username": "beacon@example.com", "FromAddress": "beacon@example.com" } }}Supply the password as a secret:
Beacon__Smtp__Password="REPLACE_ME"Data retention (Beacon:Retention)
Section titled “Data retention (Beacon:Retention)”One job, IDataRetentionService.RunAsync, keeps Beacon’s run history and logs bounded. The sample host runs it daily as
the Warp job data-retention (one run at a time, at most an hour); a host embedding Beacon schedules it itself, with a
timeout longer than the run’s 50-minute budget. It first clears the content of the content stores’ rows older than
ContentDays, keeping the rows and their structure (counts, timings, statuses, ids), then deletes the rows of every
retention target older than the target’s window.
{ "Beacon": { "Retention": { "Days": 90, // recommended; 0 (the default) keeps everything "Targets": { "subscription-runs": 365, "ai-actor-executions": 30 }, "ContentDays": 30, "Locked": false } }}| Key | Type | Default | Description |
|---|---|---|---|
Days | int | 0 (keep forever) | Days the rows of every target are kept; 0 keeps them forever. 90 is recommended |
Targets:{name} | int | Days | One target’s own window; 0 keeps its rows forever. An unknown name stops the host at startup |
ContentDays | int | 0 (off) | Days the content of the content stores is kept: SQL text, result snapshots, model output and error text become empty. 30 is recommended for regulated deployments |
Locked | bool | false | Deployment lock: Days (also when every target sets its own window), every target, ContentDays and Beacon:Mcp:Audit:RetentionDays must be greater than 0, or the host fails to start; the learning-signal retention Admins edit at runtime never resolves above Days. What it leaves out by design is listed below |
| Target | Store | Kept anyway |
|---|---|---|
subscription-runs | Subscription run history, with each run’s notifications | Each subscription’s newest run that was not skipped: the baseline its trigger compares the next result count with |
notifications | Delivered notifications | |
anomaly-baselines | Anomaly detection baselines | The longest configured look-back beyond the window |
anomaly-events | Detected anomaly events | The longest configured look-back beyond the window |
ai-actor-executions | AI actor executions and conversation turns | An execution a query change or a newer turn still names |
ai-actor-plans | AI actor plans | Plans awaiting approval or executing; a plan an execution, a query change or a revision still names |
migration-runs | Data migration runs | Queued or running runs, and a run a retry names as its parent |
mcp-eval-runs | MCP eval runs and their per-case results | Running evals; the golden cases are never purged |
execution-log | The execution log of previews and ad-hoc runs |
What goes with a purged row: a task keeps its row, but its notifications (the runs that raised it) go with their window; a plan that named a deleted AI actor execution has that id cleared; an anomaly event that named a deleted notification keeps no link to it.
The content stores are the subscription run history, notifications, the execution log of previews and ad-hoc runs, AI
actor executions and conversations, and migration runs. Clearing a row’s content empties its SQL text, result snapshot
and model output, and reduces its error text to an error class (schema, timeout, …), as the write-time lock does.
While the content lock is on (RetainQueryContent off in the global MCP settings, or
Beacon:Mcp:ForceNoContentRetention), Beacon writes no content to them, and each run also clears the result snapshots
they stored before, whatever their age. The content lock reaches these stores only globally: a project’s own
RetainQueryContent override does not, because their rows belong to no single project (a multi-step preview logs no
data source, notifications and AI actor turns carry none, and a data source can be linked to several projects, or to
others after the row was written). Turn content retention off globally, or set ForceNoContentRetention, where any
project needs it off for them.
The windows are read once at startup. Each step (the content, then each target) gets an equal share of the time left in
the run’s 50-minute budget; a step whose share runs out stops there (event 9124, the step’s name), the run still
succeeds, and the next run continues it, so a large first backlog takes several runs and never starves the steps after
it. A target that fails is logged (event 9121, the target’s name and a failure code) and the others still run, then the
job fails. Each purge logs its count (9120, 9122) to the Beacon.Audit category. The MCP audit (Beacon:Mcp:Audit:RetentionDays), the security audit trail
(Beacon:Audit:RetentionDays) and learning signals keep their own purges; the security audit is never a retention target.
Outside the lock by design, because they are configuration or governance records rather than run history: the security
audit trail (its own Beacon:Audit:RetentionDays), learning signals (their own window, which the lock caps at Days),
the query step change history (the record of how a saved query’s SQL changed and who, or which AI actor run, changed it;
it goes with its query, and the AI actor executions and plans it names are kept for it), the settings change history, and
configuration itself: projects, data sources, metadata, queries, subscriptions, tasks, the glossary, golden eval cases
and learned patterns.
For the full guide with worked examples, see Data retention.
Deployment locks
Section titled “Deployment locks”Settings that bind Admins too and that nothing at runtime can change; only host configuration sets them:
| Key | Default | Pins |
|---|---|---|
Beacon:Mcp:ForceReadOnly | true | MCP read-only enforcement on, globally and per project; the SQL gate judges every statement read-only whatever it is asked. false logs a startup Warning |
Beacon:Mcp:ForcePiiDetection | true | PII detection on. false logs a startup Warning |
Beacon:Mcp:ForceNoContentRetention | false | Content retention off: questions, SQL, result snapshots, model output and free-text errors are never persisted, in MCP and in the content stores outside it (subscription runs, notifications, the execution log, AI actor runs, migration runs; see Data retention) |
Beacon:Mcp:Audit:RequireContent | false | Content retention on, globally and per project, so the MCP audit keeps the question and the SQL of every statement a call ran. Cannot be combined with ForceNoContentRetention: with both on the host fails to start. See Keeping audit content |
Beacon:Mcp:ForbidRowDataToLlm | false | Sample-value collection, value grounding and the eval judge off: no value read from a data source goes to the LLM provider |
Beacon:Mcp:Ceilings:* | none | Cap the MCP row limit and the SQL and question lengths; the other ceilings clamp recorded settings (see MCP) |
Beacon:Mcp:Audit:Required | false | Withhold an MCP tool result whose audit row could not be written |
Beacon:Migrations:Enabled | false | Data migration, the only write path |
Beacon:Retention:Locked | false | No retention window may keep data forever (the host fails to start otherwise), and the learning-signal retention never resolves above Beacon:Retention:Days. See Data retention |
A write that contradicts an MCP lock answers 409 (/errors/setting-locked), an Admin’s included; the MCP settings page shows the locked settings disabled, and GET /beacon/api/mcp/settings/locks lists them (lockedFields) and each active lock with the setting it pins (locks: fieldName, lockName). Stored values a lock overrides are kept and listed in one startup warning; they apply again when the lock is lifted. Settings resolve as lock → project override → global value → built-in default, ceilings last.
Other startup-validated keys (Beacon:Authorization:*, Beacon:Authentication:*, Beacon:UserManagement:*, Beacon:ApiKeys:*, Beacon:Query:*, Beacon:Subscriptions:*, Beacon:Notifications:*, Beacon:EncryptionKey, Beacon:DataProtection:*) have no runtime override either. Of the configuration values, only the base URL and the LLM settings can also be changed at runtime, in Admin settings.
{ "Beacon": { "Mcp": { "ForceReadOnly": true, "ForcePiiDetection": true, "ForbidRowDataToLlm": true, "Audit": { "Required": true, "RetentionDays": 365 }, "Ceilings": { "MaxRowLimit": 10000, "StatementTimeoutSeconds": 60 } }, "Migrations": { "Enabled": false }, "Retention": { "Days": 90, "ContentDays": 30, "Locked": true } }}Beacon__Mcp__ForceReadOnly=trueFor the full guide with worked examples, see Deployment locks.
Regulated profile (Beacon:Profile)
Section titled “Regulated profile (Beacon:Profile)”Beacon:Profile: Regulated turns on a preset of the settings a regulated deployment needs. Unset (or None) changes nothing; any other value fails startup. The profile reads the host’s configuration keys: a key the host’s configuration leaves unset is filled, a key the host’s configuration sets weaker than the profile requires is never overridden — the host fails to start with every such key listed in one message. For a key the profile fills, a weaker value the host sets in code (with the configuration key unset) is raised to the profile’s value.
| Key | Under the profile |
|---|---|
Beacon:Mcp:ForceReadOnly, Beacon:Mcp:ForcePiiDetection | Already true by default; false fails startup |
Beacon:Mcp:Audit:Required | Unset: true. false fails startup |
Beacon:Mcp:ForbidRowDataToLlm | Unset: true (no sample values, value grounding or eval judge). false fails startup |
Beacon:Mcp:Ceilings:MaxRowLimit, StatementTimeoutSeconds, MaxResultBytes, MaxConcurrentQueriesPerKey | Unset: the built-in MCP settings defaults (1,000 rows, 30 s, 262,144 bytes, 4 queries per key), so an Admin cannot raise them. A value the host sets is kept |
Beacon:Retention:Locked | Unset: true, so Beacon:Retention:Days, ContentDays, every target and Beacon:Mcp:Audit:RetentionDays must be configured above zero (see Data retention). false fails startup. The profile sets no window itself: nothing is deleted that the host did not configure |
Beacon:RateLimits:*:PermitLimit (Login, Api, Anonymous, Mcp, Ask, Feedback) and Beacon:RateLimits:Lockout | Already on by default; a limit of 0, or the lockout turned off, fails startup (see Request limits). The break-glass delay (BreakGlassThrottle) is not required: it would let anyone who knows the name keep the emergency account delayed |
Beacon:Audit:Required, Beacon:Audit:ExecutionLog:Required | Unset: true (a sign-in whose audit event cannot be written gets no session; a statement whose execution log row cannot be written does not run). false fails startup |
Beacon:Authentication:Cookie:SecureAlways | Unset: true (the session cookie always carries the Secure flag). false fails startup |
Beacon:UserManagement:MinimumPasswordLength | Unset: 12. A value below 12 fails startup |
Beacon:Security:Csp | Already Enforce by default; ReportOnly or Off, in configuration or in code (BeaconHostSecurityOptions), fails startup |
Beacon:DataSources:Transport:AllowInsecure, Beacon:DataSources:AllowHostCredentials, Beacon:LLM:AllowInsecureEndpoint, Beacon:DataProtection:AllowUnencryptedKeys | Already off by default; true fails startup |
Beacon:UserManagement:LocalLogin:Enabled | Must be set to false; never filled, since it ends password sign-in for every account but the break-glass ones (BreakGlassUserNames stay allowed) |
Beacon:Authentication:Oidc:RequireMfa | With single sign-on on, must be set to true; never filled, since your identity provider must send the amr/acr claims first |
Beacon:Authorization:RequireProjectMembership | Must be set to true; never filled, since every project becomes members-only and data sources no project links Admin-only |
Beacon:ApiKeys:EnforceMaxLifetimeOnExistingKeys | Must be set to true; never filled, since keys stored without an expiry stop working once they are older than MaxLifetimeDays |
Beacon:Security:OriginGuard | Must be Enforce, in configuration or in code (BeaconHostSecurityOptions); never filled, since a browser origin missing from Beacon:Security:AllowedOrigins is then refused (read what LogOnly logged first) |
Beacon:PublicBaseUrl | Must be set to Beacon’s https address |
Beacon:Audit:IntegrityKey | Must be set, from your secret store (at least 32 characters) |
Beacon:Encryption:AllowLegacyCbc | Must be set to false; never filled, since values still in the legacy format become unreadable: wait until the re-encryption run reports none left (see Encryption key configuration) |
Beacon:DataSources:Transport:EnforceOnExisting | Must be set to true; never filled, since a stored connection that does not authenticate its server stops connecting |
Beacon:DataSources:AllowedHosts | Must name the hosts data sources may reach (Beacon:DataSources:Outbound:AllowPrivateNetworks covers only the HTTP connectors and does not stand in for it) |
EnableUserManagement (code) | Must be on: per-user roles, functional permissions and project memberships need Beacon’s user store |
EnableApprovalWorkflow (code) | Must be on, with every Covers* switch true (CoversDataSourceConnections, CoversLlmConnection and CoversAdminRoleGrants are off by default) and AllowSelfApproval false. Not required in the Beacon MCP gateway (AddBeaconMcpGateway), which serves none of the changes the workflow governs |
{ "Beacon": { "Profile": "Regulated", "PublicBaseUrl": "https://beacon.example.com", "UserManagement": { "LocalLogin": { "Enabled": false, "BreakGlassUserNames": [ "admin" ] } }, "Authentication": { "Oidc": { "Enabled": true, "RequireMfa": true } }, "Authorization": { "RequireProjectMembership": true }, "ApiKeys": { "EnforceMaxLifetimeOnExistingKeys": true }, "Security": { "OriginGuard": "Enforce", "AllowedOrigins": [ "https://beacon.example.com" ] }, "Audit": { "IntegrityKey": "<from your secret store>" }, "Encryption": { "AllowLegacyCbc": false }, "DataSources": { "AllowedHosts": [ "db.internal.example.com" ], "Transport": { "EnforceOnExisting": true } }, "Retention": { "Days": 90, "ContentDays": 30 }, "Mcp": { "Audit": { "RetentionDays": 365 } } }}builder.Services.AddBeaconServices(builder.Configuration, options =>{ // … the scheduler and sign-in wiring as before options.EnableUserManagement(); options.EnableApprovalWorkflow(x => { x.CoversDataSourceConnections = true; x.CoversLlmConnection = true; x.CoversAdminRoleGrants = true; });});At startup Beacon logs one report of these checks. Under the profile, event 9130 (Warning) names each setting that is weaker than the profile requires; without a profile, 9130 names only the MCP locks and ceilings, the retention lock, the request limits, the lockout, local login and MFA, and one Information (9133) names the other weak settings, so an alert on the Warning does not start firing at an upgrade. Under the profile, once every check holds, one Information (9131) names the settings the profile filled, and another (9132) names the surfaces the profile allows that are on (Beacon:Embed:Enabled, Beacon:Migrations:Enabled), for review. The report and the startup failure carry configuration names only, never a value. LLM concurrency and rate limits are Admin settings stored at runtime (see AI / LLM), outside the profile.
Upgrading a regulated deployment. The profile now also requires Beacon:Authorization:RequireProjectMembership, Beacon:ApiKeys:EnforceMaxLifetimeOnExistingKeys, Beacon:Security:OriginGuard: Enforce, an https Beacon:PublicBaseUrl, Beacon:Audit:IntegrityKey, Beacon:Encryption:AllowLegacyCbc: false, Beacon:DataSources:Transport:EnforceOnExisting, a data-source host list (Beacon:DataSources:AllowedHosts; closed private networks no longer stand in for it), user management and the approval workflow over every kind. A host that set none of them fails to start with the full list: run once without the profile to read the 9130 and 9133 report, set each key, then turn the profile back on. The Beacon MCP gateway (AddBeaconMcpGateway) runs under the profile with the keys above set in its configuration; the approval workflow is not required there.
For the full guide with worked examples, see Regulated profile.
MCP (Beacon:Mcp)
Section titled “MCP (Beacon:Mcp)”Validated at startup. Without the section, ForceReadOnly and ForcePiiDetection are on, nothing else is locked, and only the built-in length caps apply.
{ "Beacon": { "Mcp": { "ForceReadOnly": true, "ForcePiiDetection": true, "ForceNoContentRetention": false, "ForbidRowDataToLlm": false, "Ceilings": { "MaxRowLimit": 1000, "MaxSqlChars": 100000, "MaxQuestionChars": 4000, "AskTimeoutSeconds": 120, "AskMaxLlmCalls": 12, "AskSchemaContextChars": 120000 }, "Audit": { "Required": true, "RetentionDays": 400, "RequestIdHeader": "X-Request-Id", "RequireContent": false } } }}| Key | Type | Default | What it does |
|---|---|---|---|
ForceReadOnly, ForcePiiDetection, ForceNoContentRetention, ForbidRowDataToLlm | bool | true, true, false, false | See Deployment locks |
DataNotice | bool | true | Ends every successful tool result with a text block saying its content is data, not instructions (see Connection details). false leaves results as the tools built them, for a client that reads every content block as the answer; the server instructions say the same either way |
Ceilings:MaxRowLimit | int | none | Caps the row limit the MCP tools apply; must be greater than 0 when set |
Ceilings:StatementTimeoutSeconds, MaxResultBytes, MaxConcurrentQueriesPerKey | int | none | Clamp the MCP settings of the same names, shown on the MCP settings page; must be greater than 0 when set. The MCP tools apply the statement timeout to every statement, bound each tool result to the byte budget, and refuse a call when the caller already runs that many queries |
Ceilings:LearningSignalRetentionDays | int | none | Clamps the learning-signal retention (LearningSignalRetentionDays, global and per project) on the MCP settings page; greater than 0 when set. Under Beacon:Retention:Locked it is at most Beacon:Retention:Days |
Ceilings:MaxExplainCost | decimal | none | Clamps the MCP MaxExplainCost setting, shown on the MCP settings page; greater than 0 when set. The setting is enforced on PostgreSQL data sources: a statement whose planner-estimated total cost (EXPLAIN, never run) exceeds it is refused before it runs. Other engines ignore it |
Ceilings:MaxSqlChars | int | 100000 (always applies) | Longest SQL text the gate evaluates |
Ceilings:MaxQuestionChars | int | 4000 (always applies) | Longest question ask accepts |
Ceilings:AskTimeoutSeconds | int | 120 (always applies) | Wall-clock time one ask call may take, its statements included; past it the call returns an error; 1 to 3600 when set |
Ceilings:AskMaxLlmCalls | int | 12 (always applies) | Logical LLM calls one ask call may make (a provider’s transport retries are not counted); fewer self-consistency candidates and skipped repairs keep it within them, and a call with none left before it generated SQL returns an error; at least 2 when set (the intent classification and the first SQL generation) |
Ceilings:AskSchemaContextChars | int | 120000 (always applies) | Longest schema context one ask sends to the LLM, in characters (about 30,000 tokens at the default); over it whole table descriptions are left out, least relevant to the question first, and one line inside the cap names them. When the grounding sections leave no room for the most relevant table they are left out first (learned patterns, glossary, verified examples, value matches, join paths), and that table is sent even if it alone is longer than the cap. At least 10000 when set |
Audit:Required | bool | false | Fail closed: withhold a tool result whose audit row could not be written |
Audit:RetentionDays | int | none (keep forever) | Days audit rows are kept; unset or 0 keeps them forever (365 recommended). The sample host purges daily (PurgeExpiredMcpAuditLogsJob); other hosts schedule it themselves |
Audit:RequestIdHeader | string | X-Request-Id | Upstream correlation header stored with each audit row; empty reads none |
Audit:RequireContent | bool | false | See Deployment locks |
CallerHashKey | string | derived from Beacon:EncryptionKey | See Encryption key |
The MCP settings page’s own built-in defaults (row limit 1000, PII detection on, content retention on, sample values and value grounding off) are runtime settings, not configuration. See MCP server and MCP observability and audit.
MCP discovery (Beacon:Mcp:ProtectedResource)
Section titled “MCP discovery (Beacon:Mcp:ProtectedResource)”Read at request time.
| Key | Type | Default | What it does |
|---|---|---|---|
AuthorizationServers | string[] | empty | Issuers published in /.well-known/oauth-protected-resource; each must equal its server metadata’s issuer |
DeriveAuthorizationServerFromJwtIssuer | bool | false | When AuthorizationServers is empty, publish the bearer JWT issuer |
ScopesSupported | string[] | empty | Scopes published for an external identity provider (for example api://{id}/mcp.access) |
ResourceName | string | empty | The resource_name MCP clients show, also the server card’s name and the server name at initialize; empty publishes Beacon MCP (Beacon on the card and at initialize) |
ResourceDocumentation | string | empty | The resource_documentation URL, also the server card’s documentation; empty publishes Beacon’s MCP docs. Anything but an absolute https URL logs a startup warning |
Without the section, the authority published is Beacon:Authentication:Oidc:Authority when SSO is enabled. Startup warns about a derived issuer that is not absolute, and about an external server published without ScopesSupported.
{ "Beacon": { "Mcp": { "ProtectedResource": { "AuthorizationServers": [ "https://login.example.com/tenant-id/v2.0" ], "ScopesSupported": [ "api://beacon-client-id/mcp.access" ], "ResourceName": "Example Beacon MCP", "ResourceDocumentation": "https://docs.example.com/beacon-mcp" } } }}Telemetry
Section titled “Telemetry”| Key | Type | Default | What it does |
|---|---|---|---|
Beacon:Telemetry:CaptureContent | bool | false | Put an MCP tool’s input on the current trace span (beacon.tool.input), only where the project’s content retention allows. Logs and metrics never carry content |
OTEL_EXPORTER_OTLP_ENDPOINT | string | unset | Sample host: when set, registers OpenTelemetry tracing and metrics with the OTLP exporter (/beacon/api/health and notification calls are not traced) |
OTEL_SERVICE_NAME | string | beacon | Sample host: the service name |
Other standard OTEL_* variables are read by the OpenTelemetry SDK itself. The Beacon libraries choose no exporter.
{ "Beacon": { "Telemetry": { "CaptureContent": false } }}The sample host reads the OpenTelemetry variables from the environment:
OTEL_EXPORTER_OTLP_ENDPOINT=https://otel.example.com:4317OTEL_SERVICE_NAME=beaconEmbedding (Beacon:Embed)
Section titled “Embedding (Beacon:Embed)”Off by default, and a deployment lock: while Enabled is false no embed route is mapped (each answers 404) and no key is
needed. On, a SecurityAdmin creates embed grants at POST /beacon/api/embed-grants (listed at GET, revoked at
POST /beacon/api/embed-grants/{id}/revoke): one project, one saved query and its approved version, the frame origins,
an expiry, and every query parameter fixed or locked. A grant’s secret is shown once; only its SHA-256 is stored.
The host’s backend exchanges it for a short-lived token at POST /beacon/api/embed/tokens
(Authorization: BeaconEmbedGrant <secret>, body { "parameters": { … }, "ttlSeconds": … }), and Beacon’s embed page at
GET /beacon/embed/{publicId} renders the query with it (POST /beacon/api/embed/render,
Authorization: BeaconEmbed <token>). These three routes are anonymous to Beacon’s cookie, API keys and bearer tokens:
only the embed credential authenticates them, and every refusal gets the same {"error":"embed_unavailable"}. A render
acts for the grant’s creator (their live access and row entitlement), always masks PII and returns at most the smaller
of the project’s row limit and MaxRows. The embed page is served with a strict Content-Security-Policy whose
frame-ancestors lists the grant’s origins. An MCP gateway host serves no embed route. Validated at startup.
The limits count per client address (an IPv6 address by its /64 network): the embed page per address and grant, refusals
per address, and the exchange and render per verified grant. Only refusals spend the refusal budget. A render whose
token verifies is never refused for it; the exchange and the page, which each cost a lookup, are answered 429 without one
once the address has spent it (a valid secret from that address waits for the next minute). Behind a reverse
proxy or load balancer, run UseForwardedHeaders with the proxy’s address in KnownProxies or KnownNetworks before
UseBeaconAuthentication (the sample host: Beacon:ForwardedHeaders:Enabled and KnownProxies), and set
Beacon:PublicBaseUrl when TLS ends at the proxy. Without forwarded headers every viewer shares the proxy’s address (one
page and refusal budget for all of them), and the render’s same-origin check compares the viewer’s https origin with
Beacon’s http one and refuses every render.
The embed routes are AllowAnonymous, but ASP.NET Core still authenticates a host’s FallbackPolicy on them: a fallback
policy that names AuthenticationSchemes replaces the embed caller and every exchange and render is refused (401). Leave
the fallback policy without schemes, or exempt the embed paths from it.
| Key | Type | Default | What it does |
|---|---|---|---|
Enabled | bool | false | Maps the embed routes and allows grants to be created |
SigningKey | string | Required when Enabled | Base64 of at least 32 random bytes (openssl rand -base64 32), checked like Beacon:EncryptionKey, and never the encryption key itself. Supply as a secret (Beacon__Embed__SigningKey) |
TokenTtlSeconds | int | 300 | 1 to MaxTokenTtlSeconds |
MaxTokenTtlSeconds | int | 900 | 1–900 |
MaxGrantDays | int | 90 | The longest a grant lives; 1–366 |
MaxRows | int | 1000 | 1–100,000 |
MaxOrigins | int | 10 | Frame origins per grant; 1–50. Origins are exact https://host[:port] (http://localhost only in Development) |
MaxConcurrentRenders | int | 8 | Embed renders running at once in the process, over every grant; one more is answered 503 at once. 1–256 |
MaxConcurrentRendersPerGrant | int | a quarter of MaxConcurrentRenders, at least 1 | Renders one grant may run at once, so one grant never holds every slot; one more is answered 503 at once. 1 to MaxConcurrentRenders |
RateLimits:ExchangePerGrantPerMinute | int | 60 | Exchanges per verified grant; 1–10,000 |
RateLimits:RenderPerGrantPerMinute | int | 120 | Renders per verified grant (a valid token); 1–10,000 |
RateLimits:PagePerClientPerMinute | int | 60 | Embed page loads per client address and grant; 1–10,000 |
RateLimits:RefusalsPerIpPerMinute | int | 30 | Refusals per client address; past it a refusal is answered 429 and not audited, and the exchange and page are 429 before any lookup. 1–10,000 |
{ "Beacon": { "Embed": { "Enabled": true, "SigningKey": "<base64 of 32 random bytes, not the encryption key>", "TokenTtlSeconds": 300, "MaxTokenTtlSeconds": 600, "MaxGrantDays": 30, "MaxRows": 500, "MaxOrigins": 5, "MaxConcurrentRenders": 8, "MaxConcurrentRendersPerGrant": 2, "RateLimits": { "ExchangePerGrantPerMinute": 60, "RenderPerGrantPerMinute": 120, "PagePerClientPerMinute": 60, "RefusalsPerIpPerMinute": 30 } } }}Beacon__Embed__SigningKey="<base64 of 32 random bytes>"Embed tokens (Beacon:EmbedToken, obsolete)
Section titled “Embed tokens (Beacon:EmbedToken, obsolete)”Read by IEmbedTokenService (obsolete, removed in 6.0), a host-facing service that mints and validates HS256 tokens for embeddable integrations; no Beacon route uses it, and the embed routes never accept its tokens. Validated at first use.
| Key | Type | Default | What it does |
|---|---|---|---|
SigningKey | string | Required | Required; at least 32 bytes (UTF-8). Supply as a secret |
Issuer | string | beacon | Must not be blank |
DefaultTtlSeconds | int | 300 | Greater than 0, at most MaxTtlSeconds |
MaxTtlSeconds | int | 900 | Greater than 0 |
New hosts use Beacon:Embed instead of this section.
Scheduling
Section titled “Scheduling”Beacon does not bundle a job runner; recurring and background work goes through IBeaconScheduler, registered with options.AddBeaconScheduler<T>() (required). The sample host implements it on Moberg.Warp.
namespace Beacon.Core.Worker;
public interface IBeaconScheduler{ Task AddOrUpdate(int subscriptionId, string subscriptionName, string cron); Task Remove(int subscriptionId, string subscriptionName);
// Optional: default implementations throw NotImplementedException. Task AddOrUpdateDataQualityJob(int contractId, string contractName, string cron); Task RemoveDataQualityJob(int contractId, string contractName); Task<string> EnqueueProjectDocumentation(int projectId, int userId, string? notifyUserId); Task<string> EnqueueAiActorThinkCycle(int actorId, int subscriptionId); Task<string> EnqueueMcpEval(int runId);}Beacon calls AddOrUpdate when a subscription is created or its cron changes and Remove when it is deleted or disabled; your implementation maps them onto recurring jobs that call IJobService.ExecuteQuery(subscriptionId). The Enqueue… methods return the job id the UI correlates JobStatusChanged events by. A host that runs Beacon’s jobs on its own job host must mark each job’s DI scope as system work (ISystemWorkScope.MarkAsSystemWork()). See Background jobs.
Data-source connectors
Section titled “Data-source connectors”Register a connector per engine on the builder: .AddPostgreSqlConnector(), .AddSqlServerConnector(), .AddMySqlConnector(), .AddBigQueryConnector(), .AddSnowflakeConnector(), .AddDatabricksConnector(), .AddAzureSynapseConnector(), .AddCloudWatchConnector(), .AddApiConnector(). Data-source connections are entered in the UI and encrypted at rest. Give every data source Beacon reads a read-only login. On PostgreSQL and MySQL, Beacon also runs each read in a read-only transaction. See Data-source connectors and Data sources.
builder.Services.AddBeaconServices(builder.Configuration, options =>{ options.AddBeaconScheduler<BeaconScheduler>();}) .AddPostgreSqlConnector() .AddSqlServerConnector() .AddMySqlConnector() .AddApiConnector() .UsePostgreSql(); // Beacon's own database: ConnectionStrings:BeaconContextRegister only the engines you use. Each data source’s own connection is entered in the UI. See also Data-source connections for the checks every connection passes.
Warehouse cost limits
Section titled “Warehouse cost limits”Each BigQuery query job is sent with MaximumBytesBilled: the data source’s own MaximumBytesBilled, or 10 GiB
(10,737,418,240 bytes) when it sets none. A job that would bill more fails without a charge, with a message naming the
limit. The per-source value is a number of bytes in the data source’s connection JSON, next to ProjectId and
ServiceAccountJson (for example "MaximumBytesBilled": 2147483648); the New data source dialog does not ask for
it, so set it by replacing the connection with PUT /beacon/api/data-sources/{id} (with confirmTargetChange: true,
see Data sources). The deployment can lower every source’s limit, bound from
Beacon:DataSources:BigQuery:
| Key | Type | Default | What it does |
|---|---|---|---|
MaxBytesBilled | long | none | The most bytes one BigQuery query job may bill; a larger source limit is lowered to it. At least 1 when set, validated at startup |
{ "Beacon": { "DataSources": { "BigQuery": { "MaxBytesBilled": 5368709120 } } } }Not configurable, on every deployment:
- A BigQuery, Databricks or CloudWatch data source’s stored
QueryTimeoutSecondsis clamped to 900 seconds (0 or less means 300). A BigQuery job and a Databricks statement are cancelled on the warehouse when the timeout passes or the caller cancels. - Databricks results are limited to 16 MiB (
byte_limit); a larger result fails rather than being cut short. A BigQuery or Databricks result read without a row cap fails above 10,000 rows (Beacon’s own reads always carry one). - A REST API data source’s
TimeoutSecondsis clamped to 1–120 seconds and one response may hold at most 10 MB. Fetching the OpenAPI description for a metadata import takes at most 30 seconds and 50 MB.
Logging
Section titled “Logging”{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.EntityFrameworkCore": "Warning" } }}Beacon logs identifiers and counts, never query text, connection strings, row data or tokens. Security log events are structured log events 7101 to 7123; route them to your log pipeline, together with the Beacon.Audit category, which carries the MCP audit events and a copy of every committed security audit event (9104 to 9115).
Complete example
Section titled “Complete example”{ "ConnectionStrings": { "BeaconContext": "Host=db;Database=beacon;Username=beacon;Pooling=true;MaxPoolSize=50" }, "Beacon": { "BaseUrl": "https://beacon.example.com/beacon", "PublicBaseUrl": "https://beacon.example.com", "DataProtection": { "ApplicationName": "beacon-production" }, "Authentication": { "Session": { "RevalidateMinutes": 5, "AbsoluteLifetimeHours": 12 }, "Oidc": { "Enabled": true, "Authority": "https://login.microsoftonline.com/{tenant-id}/v2.0", "ClientId": "{client-id}", "AllowedTenants": [ "{tenant-id}" ] } }, "UserManagement": { "LocalLogin": { "Enabled": false, "BreakGlassUserNames": [ "superadmin" ] } }, "Authorization": { "RequireProjectMembership": true, "SeparationOfDuties": { "Enabled": true } }, "ApiKeys": { "MaxLifetimeDays": 180 }, "Mcp": { "Audit": { "Required": true, "RetentionDays": 400 } }, "ForwardedHeaders": { "Enabled": true, "KnownProxies": [ "10.0.0.5" ] }, "LLM": { "Provider": "OpenAI", "Model": "<model-id>" } }, "Logging": { "LogLevel": { "Default": "Information" } }}Supply Beacon__EncryptionKey, Beacon__Authentication__Oidc__ClientSecret, Beacon__UserManagement__SetupToken, Beacon__LLM__ApiKey and the database password as environment variables or from a secrets provider.
Next steps
Section titled “Next steps”- Host wiring: registration and middleware in context
- Production checklist
- Security model