Skip to content

Request header 'pub_key_format' can be passed as 'pem'  #13

@venkatramanm

Description

@venkatramanm

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"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions