forked from pulp/pulp_ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add signature support for CollectionVersions
Add new signature model CollectionVersionSignature Add new content API to view CollectionVersionSignatures Add new sign task to repository endpoint to create new CollectionVersionSignatures Add new signature metadata to CollectionVersion Galaxy V3 API to enable syncing of signatures fixes: pulp#748 fixes: pulp#757 fixes: pulp#758
- Loading branch information
Showing
19 changed files
with
693 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -euv | ||
|
||
echo "machine pulp | ||
login admin | ||
password password | ||
" > ~/.netrc | ||
|
||
chmod og-rw ~/.netrc | ||
chmod og-rw ~/.netrc | ||
|
||
if [[ "$TEST" == "upgrade" ]]; then | ||
exit | ||
fi | ||
|
||
cmd_stdin_prefix bash -c "cat > /var/lib/pulp/sign-metadata.sh" < "$GITHUB_WORKSPACE"/pulp_ansible/tests/assets/sign-metadata.sh | ||
|
||
cmd_prefix bash -c "curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-pulp-qe | gpg --import" | ||
cmd_prefix bash -c "curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-pulp-qe | cat > /tmp/GPG-KEY-pulp-qe" | ||
cmd_prefix chmod a+x /var/lib/pulp/sign-metadata.sh | ||
|
||
KEY_FINGERPRINT="6EDF301256480B9B801EBA3D05A5E6DA269D9D98" | ||
TRUST_LEVEL="6" | ||
echo "$KEY_FINGERPRINT:$TRUST_LEVEL:" | cmd_stdin_prefix gpg --import-ownertrust |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added Collection Signatures to the Galaxy V3 API to allow for syncing of signatures during a collection sync. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added ``CollectionVersionSignature`` content model to store signatures for Collections. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added API to serve Collection Signatures at ``/pulp/api/v3/content/ansible/collection_signatures/``. |
This file contains 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
This file contains 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
This file contains 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
31 changes: 31 additions & 0 deletions
31
pulp_ansible/app/migrations/0038_collectionversionsignature.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 3.2.8 on 2021-11-29 21:17 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0077_move_remote_url_credentials'), | ||
('ansible', '0037_gitremote'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CollectionVersionSignature', | ||
fields=[ | ||
('content_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='ansible_collectionversionsignature', serialize=False, to='core.content')), | ||
('data', models.BinaryField()), | ||
('digest', models.CharField(max_length=64)), | ||
('pubkey_fingerprint', models.CharField(max_length=64)), | ||
('signed_collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='signatures', to='ansible.collectionversion')), | ||
('signing_service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='signatures', to='core.signingservice')), | ||
], | ||
options={ | ||
'default_related_name': '%(app_label)s_%(model_name)s', | ||
'unique_together': {('pubkey_fingerprint', 'signed_collection')}, | ||
}, | ||
bases=('core.content',), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
pulp_ansible/app/migrations/0039_collectionremote_signed_only.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.11 on 2022-01-10 21:26 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ansible', '0038_collectionversionsignature'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='collectionremote', | ||
name='signed_only', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.