Guard the DSP outbound calls against internal addresses

Abierto
#6,151 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Start by locating the shared HTTP client used by the DSP dispatcher and tracing the provider and consumer outbound request paths. The implementation must reject resolved loopback, link-local, private, unique-local, any-local, and multicast addresses at connection time, disable redirects, support CIDR/host allow-listing, and avoid retrying fatal blocked calls. Verify the provider callback and consumer management-API flows, including the warning behavior when the opt-in guard is disabled.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature_request stale triage

Feature Request

A counterparty chooses the address that the connector sends its DSP messages to:

  • Provider side. The callbackAddress of a ContractRequestMessage, ContractOfferMessage or
    TransferRequestMessage becomes the counterPartyAddress of the new negotiation or transfer process. Every later
    message is POSTed there by the state machine, with the connector's protocol token in the Authorization header.
    The address is only checked for presence, and not at all on the TransferRequestMessage.
  • Consumer side. The counterPartyAddress of a catalog request, a negotiation or a transfer comes from the
    management API. In a multi-tenant runtime, any tenant chooses it.

Any scheme, host or IP is accepted, and the shared HTTP client follows redirects. A counterparty that passes
authentication and policy evaluation can make the connector call internal addresses:

  • the cloud metadata endpoint (169.254.169.254);
  • the management, control and signaling ports of the connector itself;
  • other services on the internal network.

On the provider side the SSRF is mostly blind. The counterparty still learns something from how the state machine
reacts: a timeout, a 4xx and a 5xx are handled differently. On the consumer side, the tenant reads back the catalog
response, and the response body of a failed call in the error detail.

Proposal

Add an opt-in guard to the HTTP client that the DSP dispatcher uses. When it is enabled, the guard rejects the
addresses a host resolves to if they are loopback, link-local, private, unique-local, any-local or multicast. The check
is done when the connection is made, so it also covers DNS rebinding. Redirects are disabled on that client. An
allow-list of CIDRs and hosts re-admits the internal ranges that partners are legitimately reached on. A call to a
blocked address fails as a fatal error, so it is not retried.

The guard is off by default, because many deployments and all the e2e tests reach their partners on private or
loopback addresses. The connector logs a warning at boot when the guard is off.

Which Areas Would Be Affected?

e.g., DPF, CI, build, transfer, etc.

Why Is the Feature Desired?

Are there any requirements?

Who will sponsor this feature?

Please @-mention the committer that will sponsor your feature.

Solution Proposal

If possible, provide a (brief!) solution proposal.

Lenguaje dominante
Java
Estrellas
429
Forks
302
Merge medio
10 h 46 min
PR fusionados (30 d)
75

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-edc/Connector

Todos los issues de eclipse-edc/Connector

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.