-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Many network participants use crypto libraries that support 'pem' format and find it difficult to convert between registry public keys format.
Suggestion :
- Accept "pub_key_format" as a header in the lookup api. ( This is not mandatory) , Absense of this header would result in existing behaviour of the lookup api.
- If the format passed is 'PEM", convert to pem and return the public keys, This will make participant's life easy.
- Also this placeholder can be used to convert to other formats if required.
e.g
curl -H 'content-type:application/json' -H 'pub_key_format: PEM' https://registry.becknprotocol.io/subscribers/lookup -d '{ "pub_key_id": "ty.test.subscriber.k1" }'
[{"created":"2022-04-05T13:28:18.000Z","valid_from":"2022-04-05T12:52:00.000Z","type":"BPP","signing_public_key":"MCowBQYDK2VwAyEAy874Xrv2uxmUKPy/WG3GF95qlkbjdPxYTXsLjtbr01Y=","valid_until":"2032-04-05T00:43:00.000Z","subscriber_id":"ty.test.subscriber","unique_key_id":"ty.test.subscriber.k1","subscriber_url":"https://beckn.free.beeceptor.com","pub_key_id":"ty.test.subscriber.k1","domain":"nic2004:52110","encr_public_key":"MCowBQYDK2VuAyEAgYqX3XCvvDEZkGO+SV0KFl3ciEP2hHqe6ai3PwFISFQ=","updated":"2022-04-05T13:36:48.000Z","status":"SUBSCRIBED"}]