DataMasking in AssignMessage

Hi All,

I've created a DataMask config to hide sensitive data.

<MaskDataConfiguration name="default">
    <JSONPathsRequest>
        <JSONPathRequest>$.paymentDetails.cardNumber</JSONPathRequest>
        <JSONPathRequest>$.paymentDetails.cardExpiryDate</JSONPathRequest>
    </JSONPathsRequest>
    <Variables>
        <Variable>request.content.paymentDetails.cardNumber</Variable>
        <Variable>request.content.paymentDetails.cardExpiryDate</Variable>
    </Variables>
</MaskDataConfiguration>

But am noticing that in the assign message policy's <VariableAccess>, am able to notice both masked and unmasked data.

    <Point id="Execution">
        <DebugInfo>
            <Timestamp>31-05-21 06:44:44:347</Timestamp>
            <Properties>
                <Property name="action">CONTINUE</Property>
                <Property name="stepDefinition-async">false</Property>
                <Property name="internal">false</Property>
                <Property name="stepDefinition-type">assignmessage</Property>
                <Property name="type">AssignMessageExecution</Property>
                <Property name="enforcement">request</Property>
                <Property name="stepDefinition-continueOnError">false</Property>
                <Property name="stepDefinition-displayName">assign-request-payload</Property>
                <Property name="stepDefinition-name">assign-request-payload</Property>
                <Property name="stepDefinition-enabled">true</Property>
                <Property name="result">true</Property>
            </Properties>
        </DebugInfo>
        <RequestMessage>
            <Content>{"REQUEST_BODY"}</Content>
            <Headers>
                <Header name="Accept">*/*</Header>
                <Header name="Accept-Encoding">gzip,deflate,br</Header>
                <Header name="Authorization">*****</Header>
                <Header name="Cache-Control">no-cache</Header>
                <Header name="Content-Length">1213</Header>
                <Header name="Content-Type">application/json</Header>
                <Header name="Host">dev.api.eftpos.io</Header>
                <Header name="Postman-Token">17c278fe</Header>
                <Header name="User-Agent">PostmanRuntime/7.28.0</Header>
                <Header name="X-Correlation-Id">rrt-01b5e9c624efe09ff-b-sy-17400-1460491-1</Header>
                <Header name="X-Forwarded-For">119.18.2.166</Header>
                <Header name="X-Forwarded-Port">443</Header>
                <Header name="X-Forwarded-Proto">https</Header>
            </Headers>
            <URI>/hko/payment/v1/purchases?auth=allow</URI>
            <Verb>POST</Verb>
        </RequestMessage>
        <VariableAccess>
            <Get value="{"paymentDetails":{"cardNumber":"**********","cardExpiryDate":"**********"}" name="request.content"/>
            <Set success="true" value="{"paymentDetails":{"cardNumber":"4444444444444444","cardExpiryDate":"2212"}}" name="reqpayload"/>
            <Set success="true" value="16669" name="apigee.metrics.policy.assign-request-payload.timeTaken"/>
        </VariableAccess>
    </Point>

How to disable this in the trace?

Any pointers or references to solve this will be of great help.

Thanks

Solved Solved
0 1 102
1 ACCEPTED SOLUTION

It looks like you're copying the values to a new variable, reqpayload that's not covered by your mask config

Either update the mask config to include this new variable, or try using the private prefix

View solution in original post

1 REPLY 1

It looks like you're copying the values to a new variable, reqpayload that's not covered by your mask config

Either update the mask config to include this new variable, or try using the private prefix