SqlBLT Deployment Guide

Version 20261130.1.2 · 30 November 2026 · SqlBLT Portal 20261130.1.2

1. Overview

This guide describes how to deploy the SqlBLT Portal and its API: the deployment options, the authentication of users and programs in each, the set-up at an identity provider, the security of each option, and every setting. The SqlBLT Guide describes SqlBLT itself, and the SqlBLT Database its database.

The Portal is one executable, SqlBLTPortal.exe: an ASP.NET Core application on Kestrel (.NET 10), published as a single self-contained file, which needs no installation and no runtime on the computer that runs it. It serves the report page and the SqlBLT API, the operations under api/v1/ through which the page reads every report. Any other program, a script or an AI agent, calls the same operations with the same results. The description of the API, api/v1/openapi.json (OpenAPI 3.1), states how to call it, what the data answers, and every operation, parameter and column.

Whatever the deployment, the Portal and its API:

Deployment options

A. Desktop appB. Windows serviceC. IIS siteD. Published with OpenID Connect
Runson the user's computer or a jump host, as the useron a server, as a service accounton an IIS web server, as the application pool identityon a server, as B or C, reached at a public HTTPS address
Users sign innot at all: the app answers its own Windows user onlywith their Windows accounts (Kerberos or NTLM)with their Windows accounts, through IIS Windows Authenticationat the organisation's identity provider
Programs and AI agentson the same computer, with the key of the desktop appas the Windows account they run underas the Windows account they run underwith an access token of the identity provider
Windows authentication to SQL Server connects asthe userthe user, with --impersonate and Kerberos constrained delegationthe user, with --impersonate and Kerberos constrained delegationthe user's Active Directory account, with --impersonate, WindowsAccountClaim and Kerberos protocol transition
Section3456, 7, 8

Option D is not a fourth executable: it is option B or C with the section OpenIdConnect and the setting PublicAddress in appsettings.json. Option B or C with PublicAddress alone is published with Windows authentication (section 6.10).

2. Choosing an option

WhenChoose
A DBA or an analyst reads the data on a workstation or a jump host that reaches the SQL Server instancesA, the desktop app: nothing to install, nothing to configure
Several users on the organisation's network open the Portal in their browsersB, a Windows service on a server of its own, or C, where an IIS web server is already run
The site permits neither SQL logins nor users' Windows logins on its SQL ServersB or C with service connections: the service account alone holds a read-only login
Users must reach the Portal from outside the organisation's network, or sign in with the organisation's identity provider (Microsoft Entra ID, Okta, Google, PingOne, Keycloak, AD FS or another OpenID Connect provider)D
Users of option D must connect to SQL Server with their own Windows accountsD with Kerberos protocol transition (section 8); the Portal's server is a member of the users' Active Directory domain
A program or an AI agent reads SqlBLT dataThe API of whichever option the users have (section 9)

3. A. The desktop app

Copy the executable to any computer with network access to the SQL Server instances and run it. It listens on http://127.0.0.1:8781, or on a free port when that one is taken, and opens the browser on its page. The user registers each instance with the connect icon of the menu and adds its SqlBLT databases with Add Database. A Windows registration connects as the user running the app; a SQL login registration asks for its password when the instance connects, unless the password is remembered.

Files. The app keeps two files in %APPDATA%\SQLBench\SqlBLTPortal, both protected with Windows data protection (DPAPI) for the current user, so that another account on the computer cannot read them: registrations.dat, the user's registrations (names of instances, authentication and login names, never a password), and apikey.dat, the key of the desktop app. The registrations survive a port change, a reinstall and the clearing of the browser's data. A remembered password is kept by the browser for the address of the page, so it is asked for once more after a port change or after the browser's site data is cleared. The download and upload icons of the menu move the list of registrations between computers as a file of names. Nothing else is installed or written.

The key of the desktop app. The loopback address on which the app listens can be reached by every user and every process of the computer, so the app answers only callers that present its key. It creates the key once for the Windows user who runs it and requires it on every call of api/, as the header Authorization: Bearer <key>. The page receives the key in the address the app opens the browser on (after #key=, a part of an address that a browser sends to no server), keeps it for that address and removes it from the address bar; the user sees no difference. While the app listens on the loopback address only, it also refuses a request whose Host header names another host. The key stays the same from start to start, so a program that was given it goes on working; to replace it, stop the app, delete apikey.dat and start the app again.

The API window. The button API at the right of the top bar of the page opens a window with the address of the API, the address of its description and the key, for a program of the same user on the same computer (section 9).

Command lineEffect
SqlBLTPortal.exelistens on http://127.0.0.1:8781, or a free port, and opens the browser on the page
--no-browserdoes not open the browser; writes the address to open, with the key, to the console
--urls http://0.0.0.0:8781serves other computers as well, without TLS; a browser there needs the address with the key. Prefer option B for users of other computers.

4. B. A Windows service on a server

The Portal runs on a server of its own (Windows Server 2022 or later) as a Windows service under a service account, in hosted mode (--hosted). Users open the page in their browsers and authenticate with their own Windows accounts; a program authenticates in the same way, as the Windows account it runs under. Each user's registrations live in that user's browser; the service stores nothing of theirs.

  1. The service account. A domain account with the Log on as a service right on the server, or a group managed service account (gMSA), which has no password to store and is the better choice. Interactive logon is not needed and may stay denied: the Service Control Manager uses the service logon type.
    New-ADServiceAccount -Name svc_sqlblt -DNSHostName svc_sqlblt.domain.local -PrincipalsAllowedToRetrieveManagedPassword SQLBLTVM$
    Install-ADServiceAccount svc_sqlblt      # on the server
    Test-ADServiceAccount svc_sqlblt
  2. The service, registered from a folder the account can read. A gMSA is given without a password; a domain account adds password=. The listen address is set in step 3; behind a reverse proxy that terminates TLS, add --urls http://0.0.0.0:8781 instead.
    sc.exe create SqlBLTPortal binPath= "D:\SqlBLTPortal\SqlBLTPortal.exe --hosted" start= auto obj= DOMAIN\svc_sqlblt$
    sc.exe start SqlBLTPortal
  3. TLS. Passwords and the Kerberos exchange cross the network, so the site must be HTTPS. Give Kestrel the server's certificate in an appsettings.json beside the executable, the standard Kestrel configuration, or terminate TLS on a reverse proxy in front of the Portal. Open the firewall for that port only.
    { "Kestrel": { "Endpoints": { "Https": { "Url": "https://0.0.0.0:8443",
          "Certificate": { "Subject": "sqlblt.domain.local", "Store": "My", "Location": "LocalMachine" } } } } }
  4. Kerberos, so that browsers authenticate with Kerberos rather than NTLM: register the service principal name of the site on the service account, setspn -S HTTP/sqlblt.domain.local DOMAIN\svc_sqlblt$, and have users open the page by that host name.
  5. Windows registrations, where the site allows users' Windows logins on the SQL Servers: add --impersonate to the command line and configure constrained delegation from the service account to the MSSQLSvc service principal names of the registered instances (the account's Delegation tab, or Set-ADServiceAccount -PrincipalsAllowedToDelegateToAccount on the SQL Server service accounts for resource-based delegation). Each user then needs a Windows login on each instance with the grants of the guide's section 5.2. Without --impersonate a hosted Portal refuses Windows registrations, and users register SQL logins.
  6. Allowed users. Every user the domain authenticates may use the Portal unless AllowedGroup names the Windows group a user must belong to.
  7. Service connections, where the site permits neither SQL logins nor users' Windows logins on the SQL Servers: give the service account a Windows login on each instance, with the grants of the guide's section 5.2 on each SqlBLT database it should show, list the instances in appsettings.json, and name the group of users allowed to use the server.
    { "ServiceConnections": [ { "name": "Production", "server": "SQLPROD01" },
                              { "name": "Finance", "server": "SQLFIN01\\INST1" } ],
      "AllowedGroup": "DOMAIN\\SqlBLT Users" }
    Every allowed user sees the service connections at the top of the menu, connects without any credential, and adds and reads any database the service account can access on the listed instances. The group, the list and the account's database access are the access control.

5. C. An IIS site

The same executable runs under IIS, started by the ASP.NET Core Module as a separate process: IIS forwards every request to it and, from the site's Windows Authentication, the user's Windows identity. IIS supplies the users' sign-on and TLS.

  1. Install the ASP.NET Core Hosting Bundle for .NET 10 on the web server (it adds the ASP.NET Core Module to IIS) and the IIS feature Windows Authentication.
  2. Create the site folder and copy SqlBLTPortal.exe and the web.config of the release into it. The web.config starts the executable with --hosted --iis; add --impersonate to its arguments attribute when constrained delegation is configured for the application pool identity as in option B. The listen address is IIS's.
  3. Create an application pool with .NET CLR version: No Managed Code and the service account or gMSA as its identity (Advanced Settings > Identity > Custom account; a gMSA is entered as DOMAIN\svc_sqlblt$ with no password), and give that identity read and execute permission on the site folder.
  4. Create the site on that pool with an HTTPS binding and the server's certificate. Enable Windows Authentication and disable Anonymous Authentication for the site: the Portal requires an authenticated user on every request. Authorise a domain group with URL Authorization when access is to be narrower than all authenticated users, or name it as AllowedGroup.
  5. For service connections, put the appsettings.json of option B in the site folder; the application pool identity is the account that connects.

IIS starts the executable on the first request, and again after a failure or a recycle of the pool. The executable writes nothing to the site folder; a logs subfolder receives its console output only while stdoutLogEnabled is set in the web.config. For option D under IIS, put the settings of section 6 in the site folder's appsettings.json, and disable Windows Authentication and enable Anonymous Authentication for the site: the Portal then signs users in itself.

6. D. Published with OpenID Connect

A published Portal is reached at a public HTTPS address. Users sign in at the organisation's identity provider, which decides who they are; the Portal decides from a claim of the identity provider whether a user may use it; SQL Server still authenticates and authorises every connection to a database. Programs present an access token of the same identity provider.

A published SqlBLT PortalUsers’ browsers and programs reach the Portal at its public HTTPS address, through an optional reverse proxy that terminates TLS. Users sign in at the identity provider; programs obtain access tokens from it. The Portal, SqlBLTPortal.exe running hosted as a Windows service or IIS site, holds sessions in memory, writes its audit log to the Windows event log, reads the identity provider’s signing keys and token endpoint, and reads the SqlBLT databases on the SQL Server instances over TCP, read only. With section 8 it obtains users’ Windows identities from Active Directory by Kerberos. SqlBLT Portal SQLPROD01 › SqlBLT › BLT › TopX ▾ SQLPROD01▾ SqlBLT ▾ BLTTopXTimeline TopX: wait time by statement Timeline: top blockers CPU % Blocked Lock waitsUsers’ browsersAIPrograms and AI agentsIdentity providerOpenID ConnectReverse proxy(optional): TLS forsqlblt.example.comThe Portal’s serverSqlBLTPortal.exe--hosted: service or IIS sitepage + api/v1• appsettings.json: PublicAddress, OpenIdConnect• sessions in memory• audit: Windows event logSQL Server instancesSqlBLT databasesActive DirectoryKerberos: section 8 onlyHTTPSHTTPS + tokensign-intokenkeys, tokensTCPread only
Figure 1. A published Portal: users and programs reach it at its public HTTPS address; the identity provider signs users in and issues the access tokens of programs; the Portal reads the SqlBLT databases over TCP.

6.1 What it needs

6.2 The registration at the identity provider

Register the Portal as a web application, a confidential client, with these values. Section 7 gives the notes for common identity providers.

ItemValue
Application typeWeb application (confidential client)
Grant typeAuthorization code, with PKCE (S256). The identity provider returns the browser with a GET (response mode query).
Redirect URIhttps://sqlblt.example.com/signin-oidc
Sign-out redirect URIhttps://sqlblt.example.com/signout-callback-oidc
Client authenticationPrivate key JWT: the public key of the Portal's certificate is uploaded to the registration (preferred); or a client secret
Scopesopenid and profile, which the Portal always asks for, and any the provider needs to issue the claim of AllowedClaim
Claim that allows a userA claim in the ID token whose values name the users allowed: an application role (for example roles with the value SqlBLT.User) or a group claim (for example groups with the value SqlBLT Users)
For programs (optional)An API, or resource, whose audience the access tokens of programs carry; its value is OpenIdConnect:Audience. The access token must carry the claim of AllowedClaim as well.
For Windows authentication to SQL Server (optional)A claim that carries each user's Active Directory user principal name (user@domain), in the ID token and in the access token: OpenIdConnect:WindowsAccountClaim (section 8)

6.3 appsettings.json

The settings are read from appsettings.json beside the executable when the Portal starts. With a certificate:

{
  "PublicAddress": "https://sqlblt.example.com",
  "OpenIdConnect": {
    "Authority": "https://login.microsoftonline.com/<tenant id>/v2.0",
    "ClientId": "<the client id of the registration>",
    "ClientCertificate": "<thumbprint of the certificate>",
    "AllowedClaim": { "type": "roles", "values": [ "SqlBLT.User" ] },
    "Audience": "api://sqlblt",
    "SessionHours": 8
  },
  "Kestrel": { "Endpoints": { "Https": { "Url": "https://0.0.0.0:443",
      "Certificate": { "Subject": "sqlblt.example.com", "Store": "My", "Location": "LocalMachine" } } } }
}

Here Kestrel serves HTTPS itself. Behind a reverse proxy, omit Kestrel, start the Portal with --urls, and add ReverseProxies (section 6.5). Section 11 lists every setting. The Portal checks them before it listens, and when one is missing or wrong it does not start: it writes the reason, which names the setting, and ends with exit code 2.

6.4 The client credential

6.5 The reverse proxy or load balancer

The Portal may listen behind a reverse proxy or a load balancer that terminates TLS for the public address. PublicAddress is then the address users open; the Portal builds its redirect URIs from it, never from the Host header of a request, and answers every request as if it had come to that address. List the addresses of the proxies in ReverseProxies: for a request from one of them, the audit log records the client address from the last entry of X-Forwarded-For. Keep the path between the proxy and the Portal on a private network, or use HTTPS on it as well.

6.6 Signing in and out

6.7 Protections of a published Portal

ProtectionWhat it does
HTTPS onlyThe Portal answers under its public address and sends Strict-Transport-Security.
Response headersA content security policy that allows the page's own script by its SHA-256 hash and nothing loaded from another address, and forbids framing; X-Content-Type-Options, Referrer-Policy, Cross-Origin-Resource-Policy, Cache-Control: no-store. These headers are sent in every option.
Requests from other sitesA request that changes state (any method but GET) must carry the Origin of the public address, or it is refused.
Connections by TCP onlyA server name a user registers is connected by TCP; a name that asks for named pipes or another protocol is refused. Without this, the SQL client would try named pipes when TCP fails, a connection over SMB in which Windows presents the Portal's account to the host named.
Refused SQL loginsWhen SQL Server has refused five SQL logins of one user within five minutes, that user's further SQL login attempts are not made until the five minutes have passed.
Remember meNot offered unless RememberMe is true.
ProgramsA program has at most four requests running at a time; a request above that is answered 429.
Audit logThe Windows event log Application, source SqlBLTPortal (table below). Each entry names the user and the client address; no password, token or statement text is written. A caller whose requests or tokens keep being refused is logged at most once a minute.
EventEntry
1000The Portal started
1001Sign-in of a user
1002Sign-in refused: the ID token carries none of the values of AllowedClaim; or the sign-in was not completed, with the cause
1003Sign-out, with the number of connections closed
1004A session ended at the end of its lifetime
1005Connect: the instance, the authentication, the login and the result (connected, refused or failed)
1006Open database: the database and the result
1007Request refused: Origin, protocol of a server name, limit on refused SQL logins, limit on the running requests of a program
1008Access token refused, with the reason

6.8 Start and check

  1. Start the Portal: the service of option B with --hosted (and --impersonate for section 8), or the IIS site of option C.
  2. Read event 1000 in the Application log: it confirms the settings in force. If the Portal does not start, the console, the service's error or the IIS stdout log gives the reason and names the setting.
  3. Open the public address, sign in as an allowed user, connect an instance and open a SqlBLT database; sign in as a user without the claim and see the refusal.
  4. For programs, obtain an access token (section 9) and call api/v1/version.

6.9 Users and SQL Server

A user who signs in at the identity provider has no Windows identity of the organisation's domain unless section 8 provides one. Such a user connects with a SQL login, typed in the Connect form and held in memory while connected, or through the service connections of the server. With section 8, the user's own Active Directory account connects.

6.10 Published with Windows authentication

Option B or C with PublicAddress and without the section OpenIdConnect keeps Windows authentication of the users and programs, and applies the protections of section 6.7 and the audit log.

7. Identity providers

The Portal works with an identity provider that implements OpenID Connect: discovery at <Authority>/.well-known/openid-configuration, the authorization code flow with PKCE, signed ID tokens, and, for programs, access tokens in JWT form for an audience the organisation defines. Authority is the issuer address of the provider, which begins with https. The labels of the providers' consoles change from time to time; the notes below name what to set.

Identity providerNotes
Microsoft Entra IDAuthority: https://login.microsoftonline.com/<tenant id>/v2.0, one tenant; the addresses common, organizations and consumers admit several organisations and are refused. App registration, single tenant; platform Web with the two redirect URIs; Certificates & secrets: upload the certificate. Create an app role (for example value SqlBLT.User), assign it to the users or groups allowed under Enterprise applications, and set AllowedClaim to {"type": "roles", "values": ["SqlBLT.User"]}. For programs, Expose an API gives the Application ID URI, which is the Audience. For section 8, add the optional claim upn to the ID token and the access token; it carries the user principal name of users synchronised from Active Directory.
OktaApp integration: OIDC, Web Application, grant type Authorization Code; the two redirect URIs; client authentication Public key / Private key with the Portal's public key. Group claim on the ID token (for example a filter on the group SqlBLT Users), and AllowedClaim on groups. Access tokens for programs come from a custom authorization server, whose audience is the Audience, and whose issuer is then the Authority.
GoogleGoogle Auth Platform, OAuth client of type Web application, with the redirect URI. Google issues a client secret only: encrypt it with --encrypt-client-secret. Google issues no group claim: allow users by email, or by hd, the domain of a Google Workspace or Cloud Identity organisation.
PingOneApplication of type OIDC Web App; response type Code, grant type Authorization Code, PKCE required (S256); the redirect and sign-off URLs; token endpoint authentication Private Key JWT with the Portal's key set. Map a groups attribute for AllowedClaim.
KeycloakAuthority: https://<host>/realms/<realm>. Client with client authentication on, standard flow, PKCE S256; credential Signed JWT with the Portal's certificate, or a client secret; a group membership mapper, or client roles, for AllowedClaim.
AD FSApplication group with a server application (the redirect URIs, and a certificate or secret) and, for programs, a web API whose identifier is the Audience; issuance transform rules for the claim of AllowedClaim (for example groups or role) and, for section 8, upn.

8. Windows authentication to SQL Server for users who sign in at an identity provider

With --impersonate and OpenIdConnect:WindowsAccountClaim, a user who signed in at the identity provider and registers an instance with Windows authentication is connected to SQL Server as that user's own Active Directory account, and so is a program whose access token carries the claim. The Portal obtains the account's Windows identity by Kerberos protocol transition, without any password of the user; SQL Server authenticates the account by Kerberos and applies its permissions.

  1. The Portal's server is a member of the domain of the users.
  2. The identity provider issues each user's user principal name (user@domain) in a claim: in the ID token for the page, in the access token for a program.
  3. The Portal runs with --impersonate, and appsettings.json names the claim: "OpenIdConnect": { ..., "WindowsAccountClaim": "upn" }. With the section OpenIdConnect, the Portal does not start with one of the two and not the other.
  4. In Active Directory, the Portal's account may delegate to each SQL Server instance: constrained delegation to the MSSQLSvc service principal names of the instance with Use any authentication protocol, or resource-based constrained delegation (the account of the SQL Server names the Portal's account). With Use Kerberos only the connection is refused.
  5. On the Portal's server, the Portal's account holds the user right Act as part of the operating system. The local system account has it; a domain service account is granted it in the local security policy (User Rights Assignment). The Portal enables the right in its own process at the first such connection.

When one of these is missing, the connection is refused and the answer says which: the identity provider names no account; the domain does not hold the account; Windows gave the identity for identification only (item 5); SQL Server received no identity (item 4). The Portal never connects as another account in the user's place. A user for whom the identity provider names no account still signs in, and uses SQL logins and service connections; the Connect form does not offer Windows authentication to that user. The Portal keeps an account's Windows identity for ten minutes, so a change of the account in Active Directory reaches the Portal within that time.

What a site trusts with this method. Active Directory issues the Kerberos ticket on the word of the Portal's account. The Portal's account can therefore connect, to the SQL Server instances it may delegate to and to no other service, as any account of the domain, and it takes the user principal name from the claim of the identity provider. Keep the delegation narrow, protect the Portal's server as a tier of the SQL Servers, and mark accounts that must never be delegated as Account is sensitive and cannot be delegated.

9. Programs and AI agents

A program reads SqlBLT data through the API of the Portal the users have. Give it the address of the API and a credential, and have it read the description first: <address>/api/v1/openapi.json. The description holds everything a program needs, including what the data answers and how: blocking hierarchies, blocked statements, top blockers, long running requests, SQL Server's missing index recommendations, the warnings of the query optimizer, trends, and the metrics of the instance.

OptionThe program presentsHow it obtains it
A. Desktop appAuthorization: Bearer <key>, the key of the desktop appThe user copies the key from the API window. The program runs on the same computer; the address is http://127.0.0.1:<port>/api/v1/.
B, C. Windows authenticationHTTP Negotiate (Kerberos or NTLM)The Windows account the program runs under, which must be allowed as a user is (AllowedGroup, IIS authorisation).
D. OpenID ConnectAuthorization: Bearer <access token>From the identity provider, for the audience of OpenIdConnect:Audience: a program of its own by the client credentials grant, a program acting for a user by the authorization code flow with PKCE. The token's claim of AllowedClaim decides as for a user.

The program then connects an instance as the page does: with auth windows (its own Windows account, or with section 8 the account its token names), sql (a SQL login it holds), or service (a service connection of the server). Give the account a login with the role SqlBLT_Reader of its own, so that its access is granted, audited and revoked apart from the users'. A program has at most four requests running at a time on a server with OpenID Connect; a request above that is answered 429, and the program should wait and repeat it.

For example, in PowerShell, with the address and the key of the API window of the desktop app:

$h = @{ Authorization = 'Bearer <the key>' }
$api = 'http://127.0.0.1:8781/api/v1'
Invoke-RestMethod "$api/version" -Headers $h
$c = Invoke-RestMethod "$api/connect" -Method Post -Headers $h -ContentType 'application/json' -Body '{"server": "SQLPROD01", "auth": "windows"}'
$d = Invoke-RestMethod "$api/open?id=$($c.id)&database=SqlBLT" -Method Post -Headers $h
$r = Invoke-RestMethod "$api/report?id=$($d.id)" -Method Post -Headers $h -ContentType 'application/json' -Body (@{ from = $d.from; to = $d.to; blt = 'L'; measure = 'elapsed' } | ConvertTo-Json)

An AI agent is given the same three things: the address of the API, the credential (in a file or a header it is told to use, rather than in its prompt), and the instruction to read openapi.json first. Ask it to cover the three roles (blocked, top blockers, long running) and the missing index recommendations, as the description's section What the data answers, and how sets out. The agent reads with the permissions of the account it connects as; it cannot change a database through the API.

10. Security

10.1 Where credentials are held

CredentialHeld
RegistrationsA: the DPAPI-protected file in the user's profile. B, C, D: the user's browser. Never a password.
SQL login passwordIn the Portal's memory while its connection is open; dropped at disconnect, after four idle hours, or when the Portal restarts.
Remembered passwordIn the user's browser, encrypted by the Portal with DPAPI: with the key of the computer that hosts the Portal (B, C, D) or of the Windows user who runs the desktop app (A), and bound to the instance, the login and, when hosted, the user. It cannot be read in the browser, and another server or another Windows user cannot decrypt it.
Windows identityB, C: the user's own, delegated per request by Kerberos constrained delegation. D with section 8: obtained by protocol transition, kept ten minutes.
Service connectionsNo credential: the server's own account.
Key of the desktop appThe DPAPI-protected file in the user's profile, and the browser's storage for the page's address.
Client credential of option DThe certificate's private key in the computer's store, or the client secret encrypted for that computer in appsettings.json.
Sessions and access tokensThe session in the Portal's memory; the access token with the program that presents it, validated at each request and not kept.

10.2 Constraints a site may set

ConstraintHow it is met
No installation on the database serverOnly the SqlBLT database with its SqlBLT schema and report procedures, and the three Agent jobs, exist there, all Transact-SQL. The Portal runs on a workstation, a server or a web server.
No credentials on the serverAs table 10.1. The service account connects only to the service connections listed in its own configuration.
Read-only access to the databaseThe Portal and its API only execute the report procedures and read catalog views. SqlBLT_Reader is all they need.
Service accounts cannot log on interactivelyThe service logon type (B) and the IIS application pool (C) need no interactive logon.
Users' Windows logins on SQL ServerNeeded only for Windows registrations: with --impersonate (B, C), and with section 8 (D). Where they are not permitted, users register SQL logins.
Neither SQL logins nor users' Windows logins on SQL ServerService connections: the service account alone holds a read-only login on each SQL Server, and the allowed users read through it.
Sign-in with the organisation's identity provider, multi-factor authenticationOption D: the identity provider applies its own policies, including multi-factor authentication and conditional access, before the Portal sees the user.

10.3 Network

FromToPortFor
Browsers, programsThe Portal, or its reverse proxy443, or the port of --urls or Kestrel (A: loopback only)The page and the API
The PortalEach SQL Server instanceTCP 1433, or the instance's portThe report procedures
The Portal (D)The identity providerHTTPS 443Discovery, signing keys, the token endpoint
The Portal (B, C, and D with section 8)Domain controllersThe ports of a domain member, Kerberos 88 among themDelegation and protocol transition

10.4 Residual risks

11. Configuration reference

11.1 Command line

SwitchEffect
(none)A, the desktop app: http://127.0.0.1:8781 or a free port; opens the browser; the key of the desktop app is required
--no-browserA: does not open the browser; writes the address with the key to the console
--urls <address>The listen address, for example http://0.0.0.0:8781; or set the Kestrel endpoints in appsettings.json
--hostedB, C, D: the hosted server. Users authenticate with Windows, or with the section OpenIdConnect at the identity provider; registrations are kept in each user's browser; a connection belongs to the caller who opened it; nothing is written to disk
--iisC: with --hosted, started by the ASP.NET Core Module through the web.config beside the executable
--impersonateWith --hosted: Windows registrations connect as the user: the user's Windows identity by Kerberos constrained delegation, or with the section OpenIdConnect the account of WindowsAccountClaim by protocol transition. Without it a hosted server refuses Windows registrations
--encrypt-client-secretAsks for a client secret and prints it encrypted for this computer, for OpenIdConnect:ClientSecret; starts nothing

11.2 appsettings.json

SettingOptionsMeaning
KestrelA, B, DThe standard Kestrel endpoints and certificate
ServiceConnectionsB, C, DAn array of { "name", "server" }: instances the server connects to as its own account, listed for every user; the list is the allow-list of the service account
AllowedGroupB, CThe Windows group a user or program must belong to. Not allowed with the section OpenIdConnect: use AllowedClaim
PublicAddressD (required), B, CThe HTTPS address users open, host and port only, no path. With it, or with the section OpenIdConnect, the Portal is published (section 6.7)
RememberMepublishedtrue: the Connect form offers Remember me. Unpublished, it is always offered
ReverseProxiespublishedAn array of IP addresses of reverse proxies whose X-Forwarded-For gives the client address of the audit log
OpenIdConnect:AuthorityD (required)The issuer address of the identity provider, https
OpenIdConnect:ClientIdD (required)The client identifier of the registration
OpenIdConnect:ClientCertificateD (one of two)The thumbprint of the certificate in the store of the computer (Personal), whose private key the Portal's account can use
OpenIdConnect:ClientSecretD (one of two)The client secret, encrypted by --encrypt-client-secret on this computer
OpenIdConnect:AllowedClaimD (required){ "type": "<claim>", "values": [ ... ] }: a user or program is allowed when the claim holds one of the values
OpenIdConnect:ScopesDScopes asked for in addition to openid and profile
OpenIdConnect:DisplayNameClaimDThe claim whose value the top bar and the audit log show for a user
OpenIdConnect:SessionHoursDThe absolute lifetime of a session; 8 unless set
OpenIdConnect:AudienceDThe audience the access tokens of programs must be issued for. Without it the API accepts no access token
OpenIdConnect:WindowsAccountClaimD with --impersonateThe claim that carries each user's Active Directory user principal name (section 8). Required with --impersonate, refused without it

11.3 Addresses outside the API

AddressServed
/The page. D without a session: the sign-in
/api/v1/..., /api/v1/openapi.jsonThe API and its description
/signin-oidc, /signout-callback-oidcD: the redirect URIs of the registration
POST /signoutD: signs the user, or the program of the token, out and closes its connections
/signed-out, /sign-in-not-completed, /account-not-allowedD: the pages served without a session
/api/registrationsA: the user's registrations, from the DPAPI-protected file