Skip to content

user and password available in poetry.lock #3567

Open

Description

@sblondon
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Debian 10 (buster)

  • Poetry version: 1.1.4

Issue

I'm unsure this should be considered as a bug.

In poetry.lock, the url field fills packages location. If HTTP authentication is used, the user and password are provided in the URL so it's readable in the file. For example:

[package.source]
type = "legacy"
url = "https://alice:a_passwd@pypi.domain.tld/site/prod/+simple"
reference = "whatever"

It could be replaced by https://**user**:**password**@.... However, I wonder if it's the good strategy because the poetry.lock file can't be used directly to rebuild a virtualenv without doing search/replace those strings. What do you think about it?

I could provide a PR but I prefer to get some feedback before.

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Jan 12, 2021
  2. 1ace commented on Feb 2, 2021

    @1ace
    Contributor

    My understanding is that poetry.lock is meant to contain all the information necessary to accurately re-create an environment. As such, you can't remove information from it and rely on finding that information somewhere else afterward.

  3. robertlagrant commented on Apr 18, 2021

    @robertlagrant

    Would vote that this is not a bug, but would suggest that in the presence of http auth that a warning is printed to the console.

  4. sblondon commented on Apr 22, 2021

    @sblondon
    Author

    I like the warning idea. I will see to implement it.

  5. thoward-godaddy commented on Oct 12, 2021

    @thoward-godaddy

    I'd consider this a bug. From my understanding the lock file is something you'd want to share with contributors through SCM. Having credentials in SCM seems like a bad idea. Maybe I have the purpose of the lock file wrong? Is it not supposed to be shared?

  6. sblondon commented on Oct 26, 2021

    @sblondon
    Author

    From my understanding the lock file is something you'd want to share with contributors through SCM. Having credentials in SCM seems like a bad idea.

    It's the use case that leads to create this issue.

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

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions