Description: Sets the public preconfigured GPG key of a JFrog Distribution service that needs to upload Release Bundles to a source Artifactory and Edge node. The GPG public key will be uploaded under Trusted Keys in the source Artifactory and Edge node.
Security: Requires a valid admin user
Usage: POST /artifactory/api/security/keys/trusted
Note that when the public GPG key is provided as part of the JSON payload and not in the request header, you need to add the --data-binary flag to the call.
Consumes: application/json
Since: 6.0
Sample Usage:
POST https://[JFrogPlatformURL]/artifactory/api/security/keys/trusted
Content-Type: application/json
Authorization : Basic XXXXXXXXX
Body : {
"alias" : "distribution key 1.0.0",
"public_key" : "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG C# v1.6.1.0
mQENBFpDamEBCACrrAoudjlwnrRqqjdrCgPwEPyHqYddXPLDHViOVZfiREp9ENkq
2PIThlj79Cj+60ePaE4Kxaze+uH1ckTxhCNIblHWiGUluKxH8Cpy7huCBdwqkD/y
...
x4w+26u0BNxE+4xlWaJ3NUb4CWtXLERfr8aKdkf1RXdMF3c96EXCBtGzLJbhrw==
=D24P
-----END PGP PUBLIC KEY BLOCK-----"
}
Expected Response:{
"kid": "46635b",
"fingerprint": "f5:80:6a:1b:08:35:e7:8c:fa:a8:a0:fc:b4:fd:30:87:93:7d:19:22",
"key": "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG C# 1.6.1.0\n\nmQENBFpDamEBCACrrAoudjlwnrRqqjdrCgPwEPyHqYddXPLDHViOVZfiREp9ENkq
2PIThlj79Cj+60ePaE4Kxaze+uH1ckTxhCNIblHWiGUluKxH8Cpy7huCBdwqkD/y
...
x4w+26u0BNxE+4xlWaJ3NUb4CWtXLERfr8aKdkf1RXdMF3c96EXCBtGzLJbhrw==
=D24P
-----END PGP PUBLIC KEY BLOCK-----",
"issued_on": "2017-12-27T09:39:45.000Z",
"issued_by": "alen@alen.com",
"valid_until": "1970-01-01T00:00:00.000Z"
}