-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for container identity for cosign #270
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ kerberos | |
marshmallow | ||
urllib3<2 | ||
pubtools-sign>0.0.6 | ||
docker |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,6 +348,7 @@ def generate_backup_mapping( | |
internal_item_processor = item_processor_for_internal_data( | ||
self.dest_quay_client, | ||
self.target_settings["quay_host"].rstrip("/"), | ||
self.dest_registries, | ||
self.target_settings.get("retry_sleep_time", 5), | ||
self.target_settings["quay_namespace"], | ||
) | ||
|
@@ -503,6 +504,7 @@ def fetch_missing_push_items_digests( | |
item_processor = item_processor_for_internal_data( | ||
self.dest_quay_client, | ||
self.target_settings["quay_host"].rstrip("/"), | ||
self.dest_registries, | ||
self.target_settings.get("retry_sleep_time", 5), | ||
self.target_settings["quay_namespace"], | ||
) | ||
|
@@ -557,10 +559,13 @@ def sign_new_manifests(self, docker_push_items: List[Any]) -> List[Tuple[str, st | |
+ ":" | ||
+ tag | ||
) | ||
registry = self.dest_registries[0] | ||
pub_reference = f"{registry}/{repo}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Does tag need to be included in identity? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cosign doesn't include it in docker-reference. I guess it's because tag is option when you sign with cosign |
||
# add entries in internal format for cosign | ||
to_sign_entries_internal.append( | ||
SignEntry( | ||
reference=reference, | ||
pub_reference=pub_reference, | ||
repo=repo, | ||
digest=digest, | ||
signing_key=key, | ||
|
@@ -572,6 +577,7 @@ def sign_new_manifests(self, docker_push_items: List[Any]) -> List[Tuple[str, st | |
to_sign_entries.append( | ||
SignEntry( | ||
reference=reference, | ||
pub_reference="", | ||
repo=repo, | ||
digest=digest, | ||
signing_key=key, | ||
|
@@ -666,6 +672,7 @@ def run(self) -> None: | |
to_sign_entries = [] | ||
item_processor = item_processor_for_internal_data( | ||
self.src_quay_client, | ||
self.target_settings["quay_host"].rstrip("/"), | ||
self.dest_registries, | ||
self.target_settings.get("retry_sleep_time", 5), | ||
self.target_settings["quay_namespace"], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an image is pulled from registry.access.redhat.com, identity in signature starts with registry.redhat.io, would signature verification fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure how validation works. But when doing validation in podman for example it uses containers/policy.json where you specify trusted host. SO if you have there both hosts, it should work