How to hide header parameters from Apigee logs

Dear Experts

I am working on API development. Receiver expects the API key and password to be passed as the request header parameters. I have used KVM with encryption, followed by Assign Message policy.

I don't want API key and password to be visible in the API debug logs?

Could you pls let me know how to achieve this. Thanks in advance.

Below are the snippets of KVM and AM I have configured in the API policies.

<!-- Key/value pairs can be stored, retrieved, and deleted from named existing maps by configuring this policy by specifying PUT, GET, or DELETE operations -->
<!-- mapIdentifier refers to the name of the key value map -->
<KeyValueMapOperations mapIdentifier="MyAPIDetails" async="true" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
<!-- PUT stores the key value pair mentioned inside the element -->
<Get assignTo="private.api-key">
<Key>
<Parameter>api-key</Parameter>
</Key>
</Get>
<Get assignTo="private.api-password">
<Key>
<Parameter>api-password</Parameter>
</Key>
</Get>
<Scope>environment</Scope>
</KeyValueMapOperations>
<!-- This policy can be used to create or modify the standard HTTP request and response messages -->
<AssignMessage async="false" continueOnError="false" enabled="true" xmlns='http://www.sap.com/apimgmt'>
<!-- Sets a new value to the existing parameter -->
<Set>
   <Headers>
        <Header name="api-key">{private.api-key}</Header>
        <Header name="api-password">{private.api-password}</Header>
    </Headers>

</Set>

<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<AssignTo createNew="false" type="request">request</AssignTo>
</AssignMessage>
0 1 259
1 REPLY 1