PCC-174: [API] Create a Handle - #90
Merged
Merged
Conversation
irinaskop
force-pushed
the
feature/PCC-174
branch
3 times, most recently
from
September 10, 2026 19:11
4d9cc6d to
873bc03
Compare
fbasios
approved these changes
Sep 11, 2026
irinaskop
force-pushed
the
feature/PCC-174
branch
from
September 11, 2026 10:56
873bc03 to
0c78a0e
Compare
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 PR adds support for creating a Handle under an existing PCC Prefix.
A user can create a Handle by providing:
The Prefix is resolved from the PCC database using its internal PCC ID.
The authenticated PCC user's unique identifier is used when constructing the required
HS_ADMINHandle value.Endpoint
Example request:
{ "suffix": "irina-test-24", "serviceUrl": "https://hdl.grnet.gr:8001", "token": "<HANDLE_SERVICE_TOKEN>", "values": [ { "type": "URL", "value": "https://www.grnet.gr" }, { "type": "title", "value": "Irina Test Handle" }, { "type": "description", "value": "Handle created through PCC" } ] }Example successful response:
{ "handle": "21.T15999/irina-test-24", "values": [ { "type": "URL", "value": "https://www.grnet.gr" }, { "type": "title", "value": "Irina Test Handle" }, { "type": "description", "value": "Handle created through PCC" } ] }Handle service request
PCC transforms the user-provided values to the structure expected by the underlying Handle service.
Value indexes are generated automatically starting from
1.For example:
{ "type": "URL", "value": "https://www.grnet.gr" }is sent to the Handle service as:
{ "index": 1, "type": "URL", "data": { "format": "string", "value": "https://www.grnet.gr" } }The required
HS_ADMINvalue is appended automatically.Its Handle reference is constructed using the selected Prefix and the authenticated PCC user's unique identifier.
Error handling
Errors returned by the Handle service are translated to the PCC API response format.
Example:
{ "code": 400, "message": "That prefix doesn't live here" }The downstream HTTP status, Handle response code, Handle and message are logged for troubleshooting.
Handle service tokens are not logged.
TLS
The Handle service is accessed over HTTPS.
The Java runtime used by PCC must trust the CA chain of the configured Handle service. For
hdl.grnet.gr, this includes theHARICA TLS RSA Root CA 2021.Local testing
For an end-to-end test against the real Handle service, create a Prefix with the name
21.T15999using the existing PCC Create Prefix endpoint.Example request:
{ "name": "21.T15999", "owner": "GRNET", "used_by": "GRNET", "contract_end": "2028-07-22", "status": 0, "service_id": 1, "domain_id": 1, "provider_id": 1, "resolvable": true, "contact_name": "John Doe", "contact_email": "contact@example.org", "contract_type_id": 5, "lookup_service_type_id": 1 }Use the generated PCC Prefix ID to call:
Use:
serviceUrl:https://hdl.grnet.gr:8001token: a valid Handle service tokenExample:
{ "suffix": "review-test-1", "serviceUrl": "https://hdl.grnet.gr:8001", "token": "<HANDLE_SERVICE_TOKEN>", "values": [ { "type": "URL", "value": "https://www.grnet.gr" } ] }