<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div> <font face="Courier New"><span style="font-style: normal;">curl http://169.254.169.254/latest/meta-data/iam/security-credentials/iam-grid-s3</span></font></div><div><font face="Courier New"><span style="font-style: normal;">{</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "Code" : "Success",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "LastUpdated" : "2022-11-19T14:30:52Z",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "Type" : "AWS-HMAC",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "AccessKeyId" : "xxxxxxxxxxxxxxxxxxx",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "SecretAccessKey" : "xxxxxxxxxxxxxxxxx/1ssuwVLuUevA",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "Token" : "xxxxxxxxxz6ZANvixZ/Qhohaj8vlEORbiS12Wy0viYSL+mtg+SODus9XagS8uSovjDnFfM+a2iqP71TklhI5q18xhOFySsZCVT8RUXvgu9GlhyJrKFkvqgJXkd5qq0kAry8j6y5vRFn50Pvf/Ox/7tI0FYnYK5WUlk5AnT8+jurcHtHmpfOKNJfhCxxvwMh3Gfgbv+CaKeEnd/1ob3JURxgmOEllc8kmFj5ouixIkG7+tt2bXWCXlWof5zps+usJ4vaqdkbNSy4W8kzV4/c0OB5FGgpuZIFdQ7lleRDkis6wgixBcDWw/I95ivnL2VGyuv1r/ZsPMaWhi/JjET+spokZLmT9GGDawiZAmrdaz7BqnpoXKGq6XllO7uGCYFCvdBkSkRY90YDKzmgxEHrZ9hC09GmZy4jrCXKvuygILzSmnisNZaZw1CyNglXjx1C0ZGOnmxv6OOdWCaLRz0ps7wx8kZR5GeGwUcy6pLipQFr8DGJ2a8lv7StRGUJxND5rUoq8suZlhEI8LQ20APB4LH1Jf4H8smFIlVyTCS0eObBjqoAWYctYsxOeQG57+FFrQf0iTHpHS15Fx1LB7SJ2y99CYU63DRgJGWmKAN7oSCqbYkparZXlNAToLBiAYSezFAYCZtByavWXxsFwmqhG5SYbIWHmMlKhtEanFZUtNRpbEUD66XmwqO7h4GgY45s8iBrBou8d65UfnAULjcmfzLQvn/XSLylgOjv2qYKnm9crbqtSmaHovtiiyt7kTnLFxh+7ey6xbGan0owA==",</span></font></div><div><font face="Courier New"><span style="font-style: normal;">  "Expiration" : "2022-11-19T20:37:09Z"</span></font></div><div><font face="Courier New"><span style="font-style: normal;">}</span></font></div><br><div dir="ltr">I didn’t see anything odd in there but a json parsing issue would explain it. </div><div dir="ltr"><br></div><div dir="ltr">Mike</div><div dir="ltr"><br><blockquote type="cite">On Nov 19, 2022, at 9:26 AM, Even Rouault <even.rouault@spatialys.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Hi Mike,</span><br><span></span><br><span>could you send the output of</span><br><span></span><br><span>curl http://169.254.169.254/latest/meta-data/iam/security-credentials/iam-grid-s3</span><br><span></span><br><span>Slightly redacted of course, but with the exact formatting. This part of thee code currently uses a "simple JSON parser" (https://github.com/OSGeo/gdal/blob/c61d116a469821b769630a112dee7f1a61fed885/port/cpl_aws.cpp#L554), which is actually just a non JSON-aware string tokenizer, and I suspect it could be defeated by a new formatting of S3 or something specific to your credentials.</span><br><span></span><br><span>It could also be that something unhandled by that parser appears inside quoted strings, like an escaped double quote or some other JSON escaped character (like an escaped forward slash \/ )</span><br><span></span><br><span>If that was the case we should likely switch to proper JSON deserialization (that part of the code must predate libjson-c being a build requirement of GDAL).</span><br><span></span><br><span>Even</span><br><span></span><br><span></span><br><span>-- </span><br><span>http://www.spatialys.com</span><br><span>My software is free, but my time generally not.</span><br><span></span><br></div></blockquote></body></html>