mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-27 00:13:38 +00:00
Removed the operating-system sign-in for Confluence wikis with public addresses
This commit is contained in:
parent
ad6b285c8d
commit
6afd724002
@ -825,9 +825,9 @@ CONFIG["SETTINGS"] = {}
|
||||
-- baseUrl Required HTTPS root URL of the Confluence site, including its context path
|
||||
-- if present, for example https://wiki.example.org/confluence/. Search loads
|
||||
-- dosearchsite.action with the same web-page reader as read_web_page and uses
|
||||
-- the current user's operating-system sign-in, also when the wiki has public
|
||||
-- addresses. Redirects outside this URL are refused. A provider must have HIGH
|
||||
-- confidence to receive search results.
|
||||
-- the current user's operating-system sign-in when the wiki has a private or
|
||||
-- VPN address. Redirects outside this URL are refused. A provider must have
|
||||
-- HIGH confidence to receive search results.
|
||||
-- timeoutSeconds Search request timeout in seconds, at most 120. Default: 30.
|
||||
-- To read a found page, also configure read_web_page.allowedPrivateHosts if your wiki has a
|
||||
-- private or VPN address, and select both tools for the chat or assistant.
|
||||
|
||||
@ -139,10 +139,6 @@ public sealed class ConfluenceSearchTool(WebPageRetrievalService webPageRetrieva
|
||||
UseOsSso = true,
|
||||
IsPrivateHostAllowed = host => IsWikiHost(baseUrl!, host),
|
||||
|
||||
// The wiki address comes from the user or the organization, never from the model,
|
||||
// so the sign-in may also go to a wiki with public addresses:
|
||||
IsOsSsoAllowedForPublicHost = host => IsWikiHost(baseUrl!, host),
|
||||
|
||||
// Checked before every redirect is followed, so the query never reaches a host
|
||||
// outside the wiki:
|
||||
IsTargetAllowed = target => IsWithinWiki(baseUrl!, target),
|
||||
@ -162,7 +158,7 @@ public sealed class ConfluenceSearchTool(WebPageRetrievalService webPageRetrieva
|
||||
throw new InvalidOperationException(TB("Confluence redirected the search outside the configured wiki."));
|
||||
|
||||
if (IsLoginPage(page.FinalUrl))
|
||||
throw new InvalidOperationException(TB("Confluence asked for a sign-in instead of showing search results. Your operating system's sign-in was not accepted by the wiki; open it in your browser to check your access."));
|
||||
throw new InvalidOperationException(TB("Confluence asked for a sign-in instead of showing search results. AI Studio signs in with your operating system account only when your wiki has a private or VPN address, and either the wiki did not accept that sign-in or its address is public. Open the wiki in your browser to check your access."));
|
||||
|
||||
var markdown = retrievedPage.ExtractedPage.Markdown;
|
||||
if (string.IsNullOrWhiteSpace(markdown))
|
||||
|
||||
@ -34,14 +34,5 @@ public sealed class WebPageRetrievalOptions
|
||||
/// </summary>
|
||||
public Func<Uri, bool>? IsTargetAllowed { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Allows the operating system's sign-in for a host which resolves to public addresses.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Without it, the sign-in is only sent to allowed private hosts. Use it only for a host
|
||||
/// which the user or the organization configured, never for one a model named.
|
||||
/// </remarks>
|
||||
public Func<string, bool>? IsOsSsoAllowedForPublicHost { get; init; }
|
||||
|
||||
public Func<Uri, ConfidenceLevel, Task>? OnPrivateHostProviderBlockAsync { get; init; }
|
||||
}
|
||||
@ -160,10 +160,9 @@ public sealed class WebPageRetrievalService(HTMLParser htmlParser)
|
||||
originalUrl.Host.Equals(candidateUrl.Host, StringComparison.OrdinalIgnoreCase) &&
|
||||
originalUrl.Port == candidateUrl.Port &&
|
||||
!IsBlockedHostName(candidateUrl.Host) &&
|
||||
options.IsPrivateHostAllowed?.Invoke(candidateUrl.Host) is true &&
|
||||
addresses.Count > 0 &&
|
||||
(addresses.All(IsNonPublicAddress)
|
||||
? options.IsPrivateHostAllowed?.Invoke(candidateUrl.Host) is true
|
||||
: options.IsOsSsoAllowedForPublicHost?.Invoke(candidateUrl.Host) is true);
|
||||
addresses.All(IsNonPublicAddress);
|
||||
|
||||
private static IPAddress NormalizeAddress(IPAddress address) => address.IsIPv4MappedToIPv6 ? address.MapToIPv4() : address;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
- Added a way to roll a chat back to an earlier AI response. The response you pick stays, and every message after it is removed permanently, together with the attachments of those messages.
|
||||
- Added a way to save a single code block of an answer. When an answer holds a web page, a LaTeX document, or a Markdown text, the export menu now offers that block as a file of its own.
|
||||
- Added a Search Confluence tool for your company's wiki. Set your wiki's address in the tool settings, then select the tool alongside Read Web Page so the AI can find relevant pages and open them. The Confluence logo shows you the tool in tool lists and in your chat's tool activity.
|
||||
- Added sign-in with your operating system account to the Search Confluence tool, so you do not have to enter a password. When your wiki does not accept that sign-in, AI Studio tells you so instead of reporting an empty search.
|
||||
- Added sign-in with your operating system account to the Search Confluence tool for a wiki on your organization's network, so you do not have to enter a password. When your wiki does not accept that sign-in, AI Studio tells you so instead of reporting an empty search.
|
||||
- Added safeguards to the Search Confluence tool: it works only with a High-confidence provider, and it never follows a redirect that leads away from your wiki. Each search appears in the sources of the answer.
|
||||
- Added tools that AI models can use on their own, starting with Web Search and Read Web Page. When you ask something a model cannot answer from what it knows, it now searches the web, reads the pages it found, and answers with the sources it used. You decide which tools a model may use, right below the message field, and you can watch it work: AI Studio shows which tool is running and, afterward, every call it made with its result. Whether tools are offered at all depends on the model because it has to support them. Read Web Page works right away; for Web Search you pick a search service in the app settings — Tavily or Staan with a free API key, or a SearXNG instance you run yourself. Set up more than one, and they can take turns when one of them finds nothing, or be asked all at once with their results combined. Many thanks to Peer Hogeterp (`peerschuett`) and Nils Kruthoff (`nilskruthoff`) for building this feature.
|
||||
- Added answers that appear word by word even while the AI uses its tools. You read along as the model writes, including the short note it puts down before it looks something up, and the answer that follows a tool call arrives the same way instead of all at once at the end.
|
||||
|
||||
@ -92,7 +92,7 @@ What differs between callers is which targets are acceptable, and that follows f
|
||||
|
||||
`read_web_page` remains the independent single-URL tool and may use its configured private-host allowlist and operating-system sign-in behavior for allowed HTTPS targets. An allowed private host can only be read by a High-confidence provider.
|
||||
|
||||
`search_confluence` builds a CQL query for the configured HTTPS Confluence Data Center site's `dosearchsite.action` page and loads it through `WebPageRetrievalService`, the same reader used by `read_web_page`. The model supplies a search phrase and optionally a space key, never a URL or CQL expression. The tool returns the extracted search page as Markdown with links, after truncation and prompt-injection filtering, and lists the search page as its source. Every request, redirects included, must stay within the configured base URL; `WebPageRetrievalOptions.IsTargetAllowed` refuses a redirect before it is followed, so the query never reaches another host. The operating-system sign-in goes to the configured host even when it has public addresses (`IsOsSsoAllowedForPublicHost`), and a redirect to Confluence's login page is reported as a failed sign-in instead of an empty search. The tool is offered to High-confidence providers only and checks that again before each search, because a lowered tool setting must not let internal wiki content reach a less trusted provider; the result raises the chat's continuing confidence requirement to High. Selecting `search_confluence` also selects `read_web_page` so the model can load a result's full content; the latter tool's private-host allowlist and other availability rules still apply.
|
||||
`search_confluence` builds a CQL query for the configured HTTPS Confluence Data Center site's `dosearchsite.action` page and loads it through `WebPageRetrievalService`, the same reader used by `read_web_page`. The model supplies a search phrase and optionally a space key, never a URL or CQL expression. The tool returns the extracted search page as Markdown with links, after truncation and prompt-injection filtering, and lists the search page as its source. Every request, redirects included, must stay within the configured base URL; `WebPageRetrievalOptions.IsTargetAllowed` refuses a redirect before it is followed, so the query never reaches another host. The operating-system sign-in goes to the configured host only when all its addresses are private, the same rule `read_web_page` follows, and a redirect to Confluence's login page is reported as a failed sign-in instead of an empty search. The tool is offered to High-confidence providers only and checks that again before each search, because a lowered tool setting must not let internal wiki content reach a less trusted provider; the result raises the chat's continuing confidence requirement to High. Selecting `search_confluence` also selects `read_web_page` so the model can load a result's full content; the latter tool's private-host allowlist and other availability rules still apply.
|
||||
|
||||
Every successfully retrieved page with readable content is also returned as a structured tool source, using the final URL after redirects and the extracted page title. The provider collects these sources across local tool calls and attaches them to the final response under the separate “Sources used by tools” heading. Failed, blocked, empty, and duplicate retrievals do not add sources — a pattern worth copying for any tool that returns material the user may want to check.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user