Project

Profile

Help

Issue #9032

create publication with signing: invalid hyperlink - object does not exist

Added by igagis 3 months ago. Updated 2 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Debian:
Platform Release:
Target Release - Debian:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

I'm trying to create a publication with metadata siging via REST api and I get the following error:

HTTP code = 400

{"signing_service":["Invalid hyperlink - Object does not exist."]}

I have created the signing service via pulpcore_manager add-signing-service and there is a GPG key in the keyring and signing shell script, as described here: https://docs.pulpproject.org/pulpcore/workflows/signed-metadata.html

I am able to get the signing service via REST api using its pulp_href, here is the response from REST request:

{
  "pulp_href": "/pulp/api/v3/signing-services/f204bdc9-2c5c-4963-b5a9-75dae6f4960d/",
  "pulp_created": "2021-07-08T12:14:33.021734Z",
  "name": "sign-metadata",
  "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGDm6n0BEADJ4jRZGZOfkgXJlbKL2TqhdStTmOedfVYi5VjxbmKVq1bsLqHO\nLb8/7u70M+iz18ERnRVG/F0EziKVOouXVdXKEsZhG2SPkOb9gKT1KlVp33k/bNyr\nJDyAVh3uYTeodCgMyHucFwkI8j5ums48rmIS/GzDxMDNLdzKLWspoQs6956F0mf+\nmmuVglfS0l8RncjXIFsh9JMlDeiK3trrbMGdhBo6U/QadxROYtfTdAZ6a10IW7iL\nMBAPe+pXtTHnCa43cJrqGXV9Y2FJ54GJVV3Kbr9T13M7zjj1ygAzm/eBnm9OqdgD\n55k0ZAyzLcpIdK//0ZLMgLIkcFQ+2BzQXLsi6xAIkzcycfXnvgSY7vUi6uwCLyLf\nyGbPoHd8Fz3q/9XJpa+3dw/q/p96d6dN+o/QmI82dy1I+D4iJ1NtLzH/lTX2ge5K\nh4FIIwGbfzJmgBSGb/2XAqBdh4FFIemmnIu2qq2Yk5SnR6wdw7FvMm3st3ww0PQZ\nn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Mp/ZhQMuHfPJxUBmQ1H4YE46\ny6t6PqVBRrGPSov82vX39vJjoN97JaCSE7ib+bRKrKIZIBk2Cy+j00cusm8HI2xy\nP0pEC9NYXQtV1k0kOiDTdBjYS/9vmSEC/eXa99w3+ScwerRnS61fSNXsAn0RQ6WS\nbitMd3rfhL6Mh3kyGf5pzkBv1iSFtfJFGdKxiDPKKeLLCr0u6/YTmhzaGRy0XwtW\n7u86efHFVneHM9uR6tWthNNy0VHNJcRip9I6Ghfa28TIDKpHsGC221Kvdh5VudkO\n/1mogvFDLTSq1RpBWV5EEVBbymwcmvSrToGCFl7R1PozyHLLG61jt+ofuanku3Ux\n+DqgGnoLJRZtLtMBV/3rd/ywdkRDWzwRQsID6sQV7/ECQvo5Giu0d3+IbsfGcTWf\n9iUCxpwW8haBtIj8FRNx3fczSxGetUodQN6QjUc=\n=tgAd\n-----END PGP PUBLIC KEY BLOCK-----\n",
  "pubkey_fingerprint": "DF050D9531F15F55C4A84D3A5933F05E302A7502",
  "script": "/var/lib/pulp/scripts/sign-metadata.sh"
}

I'm using pulp v3 installation made via ansible.

History

#1 Updated by igagis 3 months ago

the original REST request I do for creating the publication is:

curl
--location
--request
POST
http://cppfw.hopto.org/pulp/api/v3/publications/deb/apt/
--user
*****
--header
Content-Type: application/json
--data
{"repository":"http://cppfw.hopto.org/pulp/api/v3/repositories/deb/apt/f0f0d008-b093-4a84-bf41-48c2df0e99ca/","simple":true,"signing_service":"http://cppfw.hopto.org/pulp/api/v3/signing-services/f204bdc9-2c5c-4963-b5a9-75dae6f4960d/"}

#2 Updated by quba42 3 months ago

When running the pulpcore manager command, did you use the --class "pulp_deb:AptReleaseSigningService" option, because I think it will default to "core:AsciiArmoredDetachedSigningService", which is not what you need for pulp_deb.

Note: I have never used pulpcore manager to create my signing services, so I am not sure if I am interpreting the --class options syntax correctly... See here for more info: https://github.com/pulp/pulpcore/blob/master/pulpcore/app/management/commands/add-signing-service.py

#3 Updated by jxsxs 2 months ago

I'm also seeing the behavior @igagis describes.

openapi_client.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Wed, 14 Jul 2021 08:15:55 GMT', 'Content-Type': 'application/json', 'Content-Length': '66', 'Connection': 'keep-alive', 'Vary': 'Accept', 'Allow': 'GET, POST, HEAD, OPTIONS', 'X-Frame-Options': 'SAMEORIGIN', 'Correlation-ID': '897ba59380c24f74baf219541438a333', 'Access-Control-Expose-Headers': 'Correlation-ID', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'})
HTTP response body: {"signing_service":["Invalid hyperlink - Object does not exist."]}

Is there a way to figure out which SigningService was used?

Please register to edit this issue

Also available in: Atom PDF