Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Retrieve encrypted key-value-maps using Apigee Edge APIs

Hi everyone,

I'm trying to retrieve the values inside an encrypted KVM but it returns the value as "****". Would like to ask if its possible to retrieve the encrypted values when using Edge APIs.

To give context, I'm planning to backup all the configuration in my environment in a GitLab repository.

Regards,

Ryan

Solved Solved
0 7 1,482
1 ACCEPTED SOLUTION

No you cannot retrieve encrypted data via Edge (management) APIs. 

There is a workaround: build an API proxy that reads the encrypted KVM via the KeyValueMapOperations policy, and then emits that data as a response. You should protect that API proxy with appropriate credentials to insure only you or an authorized person, may invoke it. 

View solution in original post

7 REPLIES 7

No you cannot retrieve encrypted data via Edge (management) APIs. 

There is a workaround: build an API proxy that reads the encrypted KVM via the KeyValueMapOperations policy, and then emits that data as a response. You should protect that API proxy with appropriate credentials to insure only you or an authorized person, may invoke it. 

Noted on this. Thank you!

Follow-up question, is it possible to retrieve all of the key-value-pairs in a single key-value map using a single KVM policy?

No it is not possible. the KVM policy requires you to know the key, in order to look up a value. 

You can get the KVM keys administratively, though. 

Hi , Is there example code to reads the encrypted KVM via the KeyValueMapOperations policy, and then emits that data as a response ? I need to develop similar API .

Hi @htczbek,

Thanks for your question. I’d recommend starting a new thread, in that way, your request will get better visibility, and experts or community members who have implemented something similar can jump in to help!

Feel free to share any additional details in your new post and review this post with Tips to Ask Questions in the Apigee Forum.

We appreciate your engagement in the community!

Hi @htczbek ,

You can assign the KVM values in a variable so that you can send it as a response payload. What I did was to expose a queryparam so that I can identify which key I would like to extract the value from.