Getting error while retrieving values from encrypted KVM , the value being stored has special character like = , & etc .
Solved! Go to Solution.
Hi @Akshay, the error is not about the special characters, it is about not using a private prefix,
This error occurs if you try to retrieve a value from an encrypted key value map and set the value to a variable whose name does not have the prefix private. The prefix, which is required for basic security purposes during debugging, hides the encrypted values from API proxy Trace and debug sessions.
While retrieving encrypted values in KVM policy, you need to use private. prefix in <Get assignTo="private.foo">
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Key-Value-Map-Operations-1" mapIdentifier="pkvm"> <DisplayName>Key Value Map Operations-1</DisplayName> <Properties/> <ExclusiveCache>false</ExclusiveCache> <ExpiryTimeInSecs>300</ExpiryTimeInSecs> <Get assignTo="private.foo"> <Key> <Parameter>aaaaaaaaaaa</Parameter> </Key> </Get> <Get assignTo="private.bar"> <Key> <Parameter>bbbbbbbbbbb</Parameter> </Key> </Get> <Scope>environment</Scope> </KeyValueMapOperations>
Below is the error message and a sample of value trying to be stored:
error : { "fault": { "faultstring": "Failed to set variable sampleValue in KeyValueMapStepDefinition Key-Value-Map-Operations-1", "detail": { "errorcode": "steps.keyvaluemapoperations.SetVariableFailed" } } }
Sample Value : ABCDEFGHIJKLMANUOFUFBFNFJF%3d&se=1223ruruttndh
Hi @Akshay, the error is not about the special characters, it is about not using a private prefix,
This error occurs if you try to retrieve a value from an encrypted key value map and set the value to a variable whose name does not have the prefix private. The prefix, which is required for basic security purposes during debugging, hides the encrypted values from API proxy Trace and debug sessions.
While retrieving encrypted values in KVM policy, you need to use private. prefix in <Get assignTo="private.foo">
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Key-Value-Map-Operations-1" mapIdentifier="pkvm"> <DisplayName>Key Value Map Operations-1</DisplayName> <Properties/> <ExclusiveCache>false</ExclusiveCache> <ExpiryTimeInSecs>300</ExpiryTimeInSecs> <Get assignTo="private.foo"> <Key> <Parameter>aaaaaaaaaaa</Parameter> </Key> </Get> <Get assignTo="private.bar"> <Key> <Parameter>bbbbbbbbbbb</Parameter> </Key> </Get> <Scope>environment</Scope> </KeyValueMapOperations>
@Siddharth Barahalikar . Thanks
Hi sidd harth,
I am trying to save username/password in KVM, its working fine only I am unable to save special character such as plus sign. can you guide what characters are not allowed in password.
for example: this is the password I am trying to save "UwmSK4X+ZUsf". APIGEE save it successfully only remove plus sign when I try to retrieve its using the private variable.
post a new question please?
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |