Skip to content

Import docs: the password is said to go to the origins the source's documents name, but the code sends it to the source's origin only #800

Open

Description

@schmitch

Problem

docs/import.md:354-357 says the source's password is "sent only to the source's origin and the origins its documents name (a feed's package base address, a registry's token service)".

The code sends it to fewer places:

  • Feed::auth scopes the credentials to the service index's origin (crates/server/src/import/feed.rs:15-18, :107-118);
  • send_hops attaches them only to a hop on that origin (crates/core/src/net/upstream.rs:697-707);
  • npm and raw imports use the import URL's origin only.

Only a registry's token realm gets them on another origin.

Scenario

A NuGet feed's service index lists its PackageBaseAddress on another host that needs authentication. Following the docs, the administrator expects the import's credentials to go there. Instead every version list fails with "the source refused the credentials (401)", though none were sent. The docs also overstate where a secret goes, for anyone auditing its exposure.

Expected

The docs say what the code does: the source's origin, plus a registry's token realm. Keep the code, which is the safer behaviour.

New with #642. Found in the 2.2.0 release review.

Activity

  1. added this to the Backlog milestone on Nov 2, 2026
  2. added
    documentation
    on Nov 2, 2026
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

    documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions