Request header 'pub_key_format' can be passed as 'pem'
- Dominant language
- No language data
- Stars
- 4
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Many network participants use crypto libraries that support 'pem' format and find it difficult to convert between registry public keys format.
Suggestion :
1. 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.
2. If the format passed is 'PEM", convert to pem and return the public keys, This will make participant's life easy.
3. 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"}]
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names the subscribers/lookup API and provides a curl example; start by locating that endpoint and checking its current public-key response behavior. Verify that an optional pub_key_format header preserves the existing response when absent and returns PEM-formatted keys when requested, including behavior for unsupported values. No repository files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, cryptography, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100