Apigee emulator keystores example

Hey All, 

I am trying to test  KeyValueMapOperations policy using apigee emulator. I updated test data map.json file with below content and I am trying to obtain the clientSecret in my policy as shown below but my clientSecret variable is empty so my guess is that somehow Apigee emulator is not picking up the value listed in the map.json file. Am I missing something?

test data => test bundle => maps.json file example

 

[
  {
    "entries": {
      "clientId": "userx.clientId",
      "clientSecret": "userx.clientSecret"
    },
    "scope": "environment",
    "environment": "dev",
    "name": "basicAuthKvm"
  }
]

 

 KVM policy example

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="basic-auth-kvm">
    <DisplayName>basic-auth-kvm</DisplayName>
    <Properties/>
    <ExclusiveCache>false</ExclusiveCache>
    <ExpiryTimeInSecs>300</ExpiryTimeInSecs>
    <Get assignTo="clientSecret">
      <Key>
        <Parameter>clientSecret</Parameter>
      </Key>
    </Get>
    <Scope>environment</Scope>
</KeyValueMapOperations>

 

 

1 1 236
1 REPLY 1

Akash, looks like there is a mismatch on the KVM name. The name on the policy is "basic-auth-kvm" which is not the same on your maps.json (basicAuthKvm)

Please use the same name and try again. Let me know if that works.