Interface OutboundEgressGuard

All Known Implementing Classes:
HttpEgressGuard

public interface OutboundEgressGuard
Classifies whether a target URL is an eligible outbound destination, as a defence against server-side request forgery (SSRF) on tool-driven HTTP. This is a neutral, dependency-light primitive: it classifies and never enforces — check(URI) returns an EgressCheckResult and never throws a policy exception. Callers own the reaction (fail a tool invocation, refuse a configuration, and so on).

The default implementation is HttpEgressGuard. The SPI references this interface rather than the concrete classifier so the core tool-provider contract stays free of a concrete util type.

  • Method Summary

    Modifier and Type
    Method
    Description
    check(URI uri)
    Classifies a target URL.
  • Method Details

    • check

      EgressCheckResult check(URI uri)
      Classifies a target URL.
      Parameters:
      uri - the absolute target URL; must not be null
      Returns:
      an allowed result when the scheme is http/https and the host resolves entirely to public addresses; otherwise a denied result whose EgressCheckResult.reason() describes the classification