Class SsrfProtection

java.lang.Object
pl.edu.icm.unity.engine.api.files.SsrfProtection

public class SsrfProtection extends Object
Guards server-side fetches of remote-source-declared URIs (e.g. an OAuth federation member's or a SAML entity's self-declared logo_uri) against SSRF: resolves the URI's host and rejects it if any resolved address is a loopback, link-local, private, multicast, or otherwise non-public destination. This is a blocklist, not an allowlist - by design, since a public-destination allowlist would make arbitrary third-party logos unusable. It does not protect against DNS rebinding (the address re-resolving to an internal one between this check and the actual connection).
  • Method Details

    • assertNoInternalDestination

      public static void assertNoInternalDestination(URI uri) throws IOException
      Throws:
      IOException