Skip to content

Make support for libsecret and other credential providers more discoverable #16956

@nazar-pc

Description

@nazar-pc

Problem

Storing sensitive tokens in plaintext files is not great. It is quite bad I'd argue, especially since crates.io doesn't even support 2FA yet, so anyone who gets their hands on the token can publish whatever.

While cargo supports things like libsecret on Linux, I had no idea about it and even if I tried, it doesn't seem to work unless I read the docs and add this to the configuration file:

[registry]
global-credential-providers = ["cargo:libsecret"]

Proposed Solution

Support for canonical credential providers on various platforms should, ideally, be the default way with plaintext file being the fallback.

Otherwise, at least ask the user where they want to store the token rather than silently storing it in a plaintext file.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-credential-providerArea: credential provider for storing and retreiving credentialsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions