Skip to content

Conversation

@chenghlee
Copy link
Contributor

Allow conda to verify metadata signatures when the extra_safety_checks configuration option is set to True and the conda-content-trust package is installed in the base environment.

chenghlee and others added 21 commits December 15, 2020 16:57
with a bunch of comments on the nature and future disposition of
the data.

Signed-off-by: Sebastien Awwad <[email protected]>
Based on feedback from product, don't show message for unsigned metadata
but do show warm fuzzy message for correctly signed metadata.
Forgot a module path component when calling `load_metadata_from_file`
Use a catch-all block so failing to get a valid, updated `key_mgr.json`
doesn't cause conda to crash and burn.
Allow the user to configure the base URL to look for `*.root.json` and
`key_mgr.json`, rather than assuming these required files are in the
base directory of each channel (i.e., when `channeldata.json` lives).
This better fits how we anticipate deploying these files as the artifact
verification feature goes into production.
Protect against cases where the user has requested metadata signature
verification but no key manager trust metadata is available; e.g., a
user has turned this feature on for the first time, but no trust
metadata can be obtained for the repository they're using.
Package signing trust metadata should be publicly available and not
protected by a token; suppressing the existing authentication mechanisms
ensures users can obtain these trust metadata even when they've set the
`add_anaconda_token` conda configuration option to True.
These are actually an indication that no updates are available and are
not real errors.
Reflects name change of the `conda-authentication-resources` package to
`conda-content-trust`.
`conda build` currently does not allow packages to include empty
directories, so we may need to create `etc/conda` at runtime for storing
artifact verification metadata (`*.root.json`, `key_mgr.json`).

Also, separate `_refresh_*` operations into individual functions to
improve code clarity.
Prevent conda from crashing when `etc/conda` contains files whose names
end with `.root.json` but do not contain just digits in their prefix.
@chenghlee chenghlee requested a review from a team March 29, 2021 22:16
@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 29, 2021
Switch to `from ... import ...` structure to reduce awkward looking
function names.
@chenghlee chenghlee added this to the 4.10.0 milestone Mar 29, 2021
Fixes a failing unit test and provides users with a (semi-)useful
description of what this parameter actually does.
@awwad
Copy link
Contributor

awwad commented Mar 29, 2021

Looks good to me. :) 👍

Copy link
Contributor

@cjmartian cjmartian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@cjmartian cjmartian merged commit f2be3ed into conda:master Mar 30, 2021
@awwad
Copy link
Contributor

awwad commented Apr 5, 2021

Lesson: when reviewing, clarify what you have reviewed. One of us should have started a clean environment using this PR branch and installed from scratch. We would have found that conda-content-trust is always treated as not installed.... (I'm puzzled, I would have thought I'd done that, but... I guess I must have used my existing environment.) Missed a bug introduced in a typo in e670fda.

@chenghlee chenghlee deleted the metdata-verification branch April 8, 2021 00:42
@github-actions
Copy link

Hi there, thank you for your contribution!

This pull request has been automatically locked because it has not had recent activity after being closed.

Please open a new issue or pull request if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants