Create MaskConfig not allowing name to change

Hi,

I am working with masking, when i trying maskconfig POST call on an API proxy , in maskconfig  payload i have attribute called name (<MaskDataConfiguration name="default">). When i try to change the name of default to some other , managementAPI throwing 400 error. 

Is there any way to create multiple mask configs for a proxy with different names, and if not what is need for " GET /organizations/{org_name}/apis/{api_name}/maskconfigs" , which will only return "default".

 

And general question when we send text/xml we are receiving application/json. can we send json payload as well as maskconfig, if so what is the format.

And by any chance can we do partial masking like 8 of 12 characters in field without JavaScript.

 

Thanks

 

0 2 107
2 REPLIES 2

i have attribute called name (<MaskDataConfiguration name="default">). When i try to change the name of default to some other , managementAPI throwing 400 error.

This is expected.

Is there any way to create multiple mask configs for a proxy with different names,

No, there is not. "default" is the only name.

if not what is need for GET /organizations/{org_name}/apis/{api_name}/maskconfigs , which will only return "default".

I can't give a good answer for that!

when we send text/xml we are receiving application/json.

I think you can modify this behavior, if you like, by using the Accept header in your call.

can we send json payload as well as maskconfig, if so what is the format.

Yes, you can. here's an example.

 

POST :mgmtserver/v1/o/:org/maskconfigs
Authorization: Bearer :edge-token
content-type: application/json

{
  "name": "default",
  "namespaces": [
    {
      "prefix": "ns",
      "value": "http://abc.com/Message"
    },
    {
    "prefix" : "ns1",
    "value": "urn://C593C08C-A6D3-4806-A3C6-BE232825D97A"
     },
    {
    "prefix" : "soap11",
    "value": "http://schemas.xmlsoap.org/soap/envelope/"
     },
    {
    "prefix" : "wsse",
    "value": "http://schemas.xmlsoap.org/ws/2003/06/secext"
     }
  ],
  "variables": [
  ],
  "xPathsRequest": [
    "//child/@sensitiveInfo",
    "/ns:Message/ns:SensitiveInfo",
    "/soap11:Envelope/soap11:Header/wsse:Security/wsse:UsernameToken/wsse:Username",
    "/soap11:Envelope/soap11:Header/wsse:Security/wsse:UsernameToken/wsse:Password",
    "/soap11:Envelope/soap11:Body/ns1:Operation1"
  ],
  "xPathsResponse": [
    "//child/@sensitiveInfo",
    "/ns:Message/ns:SensitiveInfo",
    "/ns:Message/ns:Id/@*"
  ]
}

 

Hey, Thanks you confirmed it. Adding to above, in payload i have an array with single element ( eg: "accountNumber":["123654789"] ) which i am not able to mask, and also my payload has array of json objects. when i try ( $.key1.key2[*].field ) , no masking applied.

 

In general, to flush all the mask config is there any way , though we use delete. Suppose i run create mask 10 times with different elements in payload and i delete 9 of them and dont remember 10th one . when i do get call maskconfig/default it returns null.

so i wanted to flush all maskconfig details, is it possible?

Do we have any refresh time or something to apply mask after delete.

 

Thanks