Skip to content

Consider a mechanism to override credentials on a per-call basis #3472

@coryan

Description

@coryan

Sometimes applications want to use a single client but use different credentials in the client. For example, they may be a middle-tier service that receives an OAuth token and passes it through, or it may service many tenants with the credentials stored in secret manager, or it service many tenants with the 3LO flow.

In any case, the overhead of initializing the client (including HTTP + SSL handshake) is too hight for such middle-tier services.

This is bad in scenarios where different clients (with different Auth for example) need to be created in short succession.

That is an interesting use-case. With that said, I do not think we will want to expose reqwest::Client in the public API. We may change the implementation to use hyper or tonic in the future. Instead, we may consider a mechanism to override the credentials during a single call.

Version 0.24 had this feature. It was apparently removed as part of the re-structuring.

It was a bigger change, we took over the google-cloud-storage crate name, the old crate (with updates) now lives at:

https://crates.io/crates/gcloud-storage/

Originally posted by @coryan in #3471

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions