Skip to content

_blob endpoint redirects in CrateDB loose Basic HTTP Auth headers #800

Closed

Description

@matriv

With: crate/crate@c8a0dcc fix for _blobs authorization, it's required for blob actions to make sure that Basic HTTP Auth headers are set, even if CrateDB redirects the http request to a different node (the one that holds the shard of the blob table, for performance purposes. By default http clients drop the Basic HTTP Auth headers in the case of a redirect (for security reasons). Please check the relevant issue: crate/crate#19335

Activity

  1. bgunebakan commented on May 13, 2026

    @bgunebakan
    Contributor

    Hi @matriv,
    Thanks for detailed information and report.

    The client actually handles this correctly already. Server.request() sets redirect=False on urllib3, so redirects are never followed automatically. Client._request() detects 3xx responses manually and re-issues the request by recursively calling itself with the redirect target as the server while rebuilding the Authorization header.

    There is a gap on unitests. Current tests do not cover this feature. I will introduce new tests to cover Auth handling on redirects.

    Best,
    Bilal

  2. matriv commented on May 13, 2026

    @matriv
    ContributorAuthor

    Thanks for investigating, and yes, adding test would be great!

  3. self-assigned this
    on May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions