Skip to content

Add a display path to the shared executor for identifier-carrying requests #176

Open

Description

@milten89

ADR-0006 (changed in #175 for #109) requires that a REST provider whose request URI, path or query, carries personal identifiers gives the shared executor a display path or route template (e.g. /api/search/nip/{nip}). The executor has no API for this yet; the ADR defers it to the first such provider.

Where the request URI leaks today

src/Http/Infrastructure/RestRequestExecutor.cs uses the absolute RequestUri (around :277) in:

  • the url.path span tag;
  • the warning and debug logs, including the error-response log;
  • every status-error message (NotFound, BadRequest, 401/403, 408, …) and the timeout, connection and serialization error messages;
  • ErrorResponseContext.RequestPath, passed to a provider's MapErrorAsync.

A 400's message also embeds the server's body, which may echo an identifier back.

NBP is unaffected: its paths and queries carry no identifiers.

Scope

  • An additive executor API (e.g. a display path or template on the request) used for url.path, the logs, the error messages and ErrorResponseContext.RequestPath.
  • A way for a provider to mask or drop a 400's server message.
  • Tests that a URI containing an identifier appears nowhere in logs, tags, messages or metadata (ADR-0003).

When

With the first provider whose requests carry identifiers (likely MF or GUS), after the ADR-0010 gate. Not needed for NBP or for 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:httpAffects OpenUrzednik.HttpenhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions