<div dir="ltr">Hello All,<div><br></div><div>I tried the same with Opensips version 3.1.2 , Still the same result. The Payload is not a valid JSON.<br><br>version: opensips 3.1.2 (x86_64/linux)<br>flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<br>poll method support: poll, epoll, sigio_rt, select.<br>git revision: 539ab0b3a<br>main.c compiled on 05:43:20 May 24 2021 with gcc 7</div><div><br></div><div>Regards,</div><div>Sunil More</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Sunil More</strong> <span dir="auto"><<a href="mailto:sunil.more64sinfo@gmail.com">sunil.more64sinfo@gmail.com</a>></span><br>Date: Thu, 20 May 2021 at 15:55<br>Subject: STIR/Shaken payload issue.<br>To: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a> <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>><br></div><br><br><div lang="EN-IN" link="blue" vlink="#954F72" style="word-wrap:break-word"><div class="m_-7941281493350622922WordSection1"><p class="MsoNormal">Hello All, </p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I was working to use stir shaken module. The certificates are put in place and Identity Header is also created. However the Identity when tried to put on JWT.io for validation , I can observe that the payload is not good. </p><p class="MsoNormal"><span style="color:white">Here is the identity Heade<br></span><font color="#000000"><span class="gmail-m_-7941281493350622922typ"><b>Identity</b></span><span class="gmail-m_-7941281493350622922pun">:</span><span class="gmail-m_-7941281493350622922pln"> eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9hcHBzLnNhbWVzcGFjZS5jb20vc2VydmVyLmNydCJ9</span><span class="gmail-m_-7941281493350622922pun">.</span><span class="gmail-m_-7941281493350622922pln">eyJhdHRlc3QiOCIiwiZGVzdCI6eyJ0biI6WyI5MTk1MDMzMzgyNzUiXX0sImlhdCI6MTYyMDkxMDc3Nywib3JpZyI6eyJ0biI6IjkxOTUwMzMzODI3NiJ9LCJvcmlnaWQiOiJkc2FkYXNhc2Zkcy1kc2FkYXNkLXNWRzIn0</span><span class="gmail-m_-7941281493350622922pun">.</span><span class="gmail-m_-7941281493350622922typ">JzYHlbStXK7gpmRWVZY_IC8VmeZfaKWBzGTOfGU82OQ3w28lctaYv</span><span class="gmail-m_-7941281493350622922pun">-</span><span class="gmail-m_-7941281493350622922typ">YAzBdjqjUGJKISid327KSzUGGvpXYBSg</span><span class="gmail-m_-7941281493350622922pun">;</span><span class="gmail-m_-7941281493350622922pln">info</span><span class="gmail-m_-7941281493350622922pun">=<</span><span class="gmail-m_-7941281493350622922pln">https</span><span class="gmail-m_-7941281493350622922pun">:</span><span class="gmail-m_-7941281493350622922com">//<a href="http://apps.samespace.com/server.crt" target="_blank" style="">apps.samespace.com/server.crt</a>>;ppt="shaken"</span></font></p><p class="MsoNormal"><br></p><p class="MsoNormal">After JWT.io <br>Header for algorithm and token type looks ok ..<br>{</p><p class="MsoNormal"> "alg": "ES256",</p><p class="MsoNormal"> "ppt": "shaken",</p><p class="MsoNormal"> "typ": "passport",</p><p class="MsoNormal"> "x5u": "<a href="https://apps.samespace.com/server.crt" target="_blank">https://apps.samespace.com/server.crt</a>"</p><p class="MsoNormal">}<br><br></p><p class="MsoNormal">However payload looks like this which is probably some invalid JSON, I am not sure what could cause this.<br><br>"{\"attest\"8\"\"�&FW7B#��'F�#��#�\u0013�S\u0003333�#sR%���&�\u0017B#�\u0013c#\u0003�\u0013\u0003ssr�&�&�r#��'F�#�#�\u0013�S\u0003333�#sb'��&�&�v�B#�&G6\u0016F\u00176\u00176fG2�G6\u0016F\u00176B�5ds\"}"<br><br></p><p class="MsoNormal">Here is the code snippet used .</p><p class="MsoNormal"><br></p><p class="MsoNormal"><u></u><font color="#000000"><span style="font-size:10.5pt;font-family:Consolas">stir_shaken_auth(</span><span style="font-size:10.5pt;font-family:Consolas">"B"</span><span style="font-size:10.5pt;font-family:Consolas">, $var(origid),$var(cert), $var(privKey),</span><span style="font-size:10.5pt;font-family:Consolas">"<a href="https://apps.samespace.com/server.crt" target="_blank">https://apps.samespace.com/server.crt</a>"</span><span style="font-size:10.5pt;font-family:Consolas">,</span><span style="font-size:10.5pt;font-family:Consolas">"919503338276"</span><span style="font-size:10.5pt;font-family:Consolas">,</span><span style="font-size:10.5pt;font-family:Consolas">"919503338275"</span><span style="font-size:10.5pt;font-family:Consolas">)</span><span style="font-size:10.5pt;font-family:Consolas">;</span></font> <u></u></p><div><div><p class="MsoNormal" style="line-height:14.25pt;background:#1e1e1e"><span style="font-size:10.5pt;font-family:Consolas;color:#d4d4d4"><u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am using opensips version as below </p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">version: opensips 3.1.1 (x86_64/linux)</p><p class="MsoNormal">flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT</p><p class="MsoNormal">ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535</p><p class="MsoNormal">poll method support: poll, epoll, sigio_rt, select.</p><p class="MsoNormal">git revision: 229ec0793</p><p class="MsoNormal">main.c compiled on 11:50:44 Jan 15 2021 with gcc 7</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Kindly let me know if there is something wrong that I could be doing. I checked the sample from <b><a href="https://transnexus.com/whitepapers/understanding-stir-shaken/" target="_blank">https://transnexus.com/whitepapers/understanding-stir-shaken/</a><u></u><u></u></b></p><p class="MsoNormal">The Identity from this example shows a good payload. </p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards,</p><p class="MsoNormal">Sunil More</p><p class="MsoNormal">Phone : 919503338275</p><p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p><p class="MsoNormal"><u></u> <u></u></p></div></div>
</div></div></div>