andersnas / nodecat

A port of Akamais CAT implementation into NodeJS
Apache License 2.0
2 stars 3 forks source link

catnip appears to create invalid cwt/cbor claim #6

Open izenoni opened 1 week ago

izenoni commented 1 week ago

was able to finally get this payload to work using the json to create catnip claim: { "catnip":[{"tag":52,"value":[16,2560]}] } what should be produced: /catnip/ 269: [/IPv4/ 52([16, /10.0.*.*/ h'0a00'])] but produces cwt/cbor: [57343([57344, ["tag", "value"], 52, [16, 2560]])] 81D9 DFFF 8419 E000 8263 7461 6765 7661 6C75 6518 3482 1019 0A00 would expect this cwt/cbor: A119 010D 81D8 3482 1042 0A00

would be nice if we could use something like this json to create a catnip claim: { "catnip":[ {"IPv4": [16,"10.0.*.*"]} ] }

andersnas commented 5 days ago

Great finding, I just realised that I've done no implementations using catnip ;-) Probably the most used claim though... I'll check with Shubham who wrote the base code for Edgeworkers if he ever got to test it.