sqlinsight-pro/src/SQLInsight.Web/WebOptions.cs
Søren Eggert Lundsteen Olsen 30d89acbd7 API v1: findings, rules, reports and page data as JSON, with OpenAPI
- /api/v1/findings gains status (active/resolved/all), from/to, database,
  ruleId, category, sort and paging (limit + X-Continuation header; the
  response stays an array). /findings/{id} with fix script and history.
- /rules (built-in, community, local) and /instances/{name}/rule-states.
- /reports and /reports/{driftsrapport|analyse|rettigheder} as JSON or PDF,
  built from the same models as the pages and PDFs.
- Page data: analysis, top-sql, disks, configuration, privileges (one or
  all instances) and wait types. Statement texts, logins, names and
  service accounts are "[udeladt]" unless ApiIncludesSensitiveEvidence.
- OpenAPI at /api/v1/openapi.json; a test fails when an endpoint is
  missing from it.
- API tokens get scopes ("read", "support:write"); the old form is read
  only, and new-api-token takes --scope. Token names show as token:<name>.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 09:27:10 +02:00

28 lines
1.3 KiB
C#

namespace SQLInsight.Web;
public sealed class WebOptions
{
public const string SectionName = "SQLInsight:Web";
/// <summary>Windows (Negotiate/Kerberos) or None. None is for development only.</summary>
public string Authentication { get; set; } = "Windows";
/// <summary>Windows groups allowed to use the UI (e.g. DOMAIN\SQL-Admins). Empty: any authenticated user.</summary>
public IList<string> AllowedGroups { get; } = [];
/// <summary>Time zone for display, e.g. Europe/Copenhagen. Defaults to the server's local time zone.</summary>
public string? TimeZone { get; set; }
/// <summary>Include evidence marked sensitive (query text, logins, host names) in /api/v1/findings. Off by default.</summary>
public bool ApiIncludesSensitiveEvidence { get; set; }
/// <summary>Name shown on reports, e.g. the company or department.</summary>
public string Organization { get; set; } = "SQL Server-miljøet";
/// <summary>The SQLInsight Pro website (documentation, downloads, support plans), linked from the menu.</summary>
public Uri CommunityUrl { get; set; } = new("https://sqlinsight.seosoft.dk/");
/// <summary>The community forum, linked from the menu.</summary>
public Uri ForumUrl { get; set; } = new("https://forum.seosoft.dk/c/sqlinsight");
}