Skip to content

Unable to upload package when FIPS is enabled on workstation #775

Closed
@cjbland

Description

@cjbland

Your Environment

Thank you for taking the time to report an issue.

To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.

  1. Your operating system: CentOS 7.9

  2. Version of python you are running: Python 3.6.8

  3. How did you install twine? Did you use your operating system's package manager or pip or something else? Installed via pip in a virtualenv

  4. Version of twine you have installed (include complete output of): twine version 3.4.1 (importlib_metadata: 4.6.1, pkginfo: 1.7.1, requests: 2.25.1, requests-toolbelt: 0.9.1, tqdm: 4.61.2)

  5. Which package repository are you targeting? Private Nexus PyPi repository

The Issue

Our development workstations were recently "upgraded" to enable FIPS. twine successfully creates the package, however the package fails to upload because a blank md5_digest is being sent in the HTTP payload. When this value is left in, our Nexus repo is responding with something like:

HTTPError: 400 Bad Request from https://internal.server/repository/repo/
Digests do not match, found <md5_hash>, expected:

The part after "expected" is the empty md5_digest from the HTTP payload.

I manually edited package.py, removed md5_digest from the metadata_dictionary return value, and the file uploaded successfully.

Steps to Reproduce

Unfortunately I'm not able to test this using the "test" PyPi server as the workstation I'm using is on a private lab/LAN. However, I have to assume this would function the same when trying to publish to there.

  1. You'll need a workstation with FIPS enabled
  2. You'll need a simple "hello world" package
  3. The command we are running is twine upload --repository-url=https://internal.server/repository/repo/ dist/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions