Add settings that block domains for GitLab Duo web search

What does this MR do and why?

Adds a list of domains that GitLab Duo web search does not search or read. Administrators and top-level group owners manage it through the AI domain settings mutations with the new WEB_SEARCH_DENIED type, the same way as the Network access lists. The list holds up to 100 domains and includes subdomains.

On GitLab.com the top-level group list applies, on GitLab Self-Managed and GitLab Dedicated the instance list. The workflow exposes the list that applies as webSearchDeniedDomains.

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. With GITLAB_SIMULATE_SAAS=1, as a top-level group owner, run in GraphQL explorer:

    mutation {
      aiDomainSettingsNamespaceUpdate(input: {
        namespaceId: "gid://gitlab/Group/<id>", action: ADD,
        domainSettingType: WEB_SEARCH_DENIED, domains: ["*.Python.org", "example.com"]
      }) { addedDomains errors }
    }

    It returns ["python.org", "example.com"]. Adding example.com/blog returns example.com/blog is not a valid domain.

  2. Send a message in Agentic Chat in a project of that group, then check the session:

    query {
      duoWorkflowWorkflows(projectPath: "<group>/<project>", first: 1) {
        nodes { webSearchDeniedDomains }
      }
    }
  3. With GITLAB_SIMULATE_SAAS=0, as an administrator, save an instance list:

    mutation {
      aiDomainSettingsInstanceUpdate(input: {
        action: ADD, domainSettingType: WEB_SEARCH_DENIED, domains: ["python.org"]
      }) { addedDomains errors }
    }

    The workflow query from step 2 now returns ["python.org"].

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eva Kadlecová

Merge request reports

Loading
Loading