Repository navigation
Examples: Add repository uploader - #2241
Merged
Merged
Conversation
Pull Request Test Coverage Report for Build 4122381770Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
jku
commented
Dec 23, 2022
jku
commented
Dec 23, 2022
jku
force-pushed
the
repository-lib-uploader
branch
from
December 27, 2022 12:18
01e6101 to
0859ddc
Compare
jku
marked this pull request as ready for review
December 27, 2022 12:19
Also use ThreadingHTTPServer: Using Chrome utterly breaks the non-threading server. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
The API doesn't modify the repository yet but the data flow is there now. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This tool works with the example repository: it can be used to * Add a delegation (this is an unsafe API corresponding to e.g. project creation in PyPI) * Submit new delegated role version (this requires using signing keys already submitted with the delegation) Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
uploader API has two POST endpoints
/api/delegation/<ROLE>
Accepts new delegation keys for targetpath "<ROLE>/*" to role <ROLE>.
This data is not signed in any way: In a real service this action would
require some external authentication.
POST content:
{ <KEYID>: <TUF KEY> }
/api/role/<ROLE>
accepts uploads of new versions of <ROLE> metadata. The metadata
must be correctly signed by the keys assigned to this delegation.
POST content:
TUF targets metadata as json
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
jku
force-pushed
the
repository-lib-uploader
branch
from
February 2, 2023 14:42
0859ddc to
d36c0cf
Compare
Member
Author
|
rebased, updated for the recent Key changes |
lukpueh
reviewed
Feb 6, 2023
lukpueh
left a comment
Member
There was a problem hiding this comment.
This is super cool! Here's a first batch of comments. I still need to take a closer look at _simplerepo.py and repo changes.
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
lukpueh
reviewed
Feb 8, 2023
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
lukpueh
approved these changes
Feb 8, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a maintainer tool example using the repository module
It's slightly larger than I wish it was but still manageable:
open()gets the metadata from ngclient Updater, andclose()submits to repository server