<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Duo Auth API Sample - HMAC Issue in APIs</title>
    <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883753#M536</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I also have the same issue with this one. I’m just not sure which part we are wrong although all our credentials seems to be working with Postman. We are currently implementing using Delphi REST Client.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 May 2020 00:43:55 GMT</pubDate>
    <dc:creator>lvincent7</dc:creator>
    <dc:date>2020-05-01T00:43:55Z</dc:date>
    <item>
      <title>Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883752#M535</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;We are working to implement a the Duo Auth API.  We utalize a homegrown application to construct webservice requests.  We are attmepting to use that code to construct the sample request found at &lt;A href="https://duo.com/docs/authapi#troubleshooting" class="inline-onebox" rel="nofollow noopener"&gt;Auth API | Duo Security&lt;/A&gt;.  The issue we are having is that the HMAC we are generating does not match the HMAC that is shown in the sample.&lt;/P&gt;
&lt;P&gt;To validate our application, we are using the HMAC generator here: &lt;A href="https://www.freeformatter.com/hmac-generator.html#ad-output" rel="nofollow noopener"&gt;https://www.freeformatter.com/hmac-generator.html#ad-output&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2X_6_61675c5b98a0f74fdaadae7aa16e64625c1e9557.png" style="width: 690px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/191180i13286A710B0C5636/image-size/large?v=v2&amp;amp;px=999" role="button" title="2X_6_61675c5b98a0f74fdaadae7aa16e64625c1e9557.png" alt="2X_6_61675c5b98a0f74fdaadae7aa16e64625c1e9557.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;We are then using this tool to Base64 the HMAC output: &lt;A href="https://www.base64encode.org/" rel="nofollow noopener"&gt;https://www.base64encode.org/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2X_e_efcf5674c07cbefdabc31e15498a1e635caded54.png" style="width: 478px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/191010i35B8E9399893C84E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2X_e_efcf5674c07cbefdabc31e15498a1e635caded54.png" alt="2X_e_efcf5674c07cbefdabc31e15498a1e635caded54.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;We believe that this output should match what we see as the Basic Auth key in the Duo API sample, but unfortunately it does not.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Date: Tue, 21 Aug 2012 17:29:18 -0000
Authorization: Basic RElXSjhYNkFFWU9SNU9NQzZUUTE6MmQ5N2Q2MTY2MzE5NzgxYjVhM2EwN2FmMzlkMzY2ZjQ5MTIzNGVkYw==
Host: ■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Content-Length: 35
Content-Type: application/x-www-form-urlencoded
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone pinpoint what we are doing wrong here?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Apr 2020 13:41:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883752#M535</guid>
      <dc:creator>Dave_Szabo</dc:creator>
      <dc:date>2020-04-24T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883753#M536</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I also have the same issue with this one. I’m just not sure which part we are wrong although all our credentials seems to be working with Postman. We are currently implementing using Delphi REST Client.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 May 2020 00:43:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883753#M536</guid>
      <dc:creator>lvincent7</dc:creator>
      <dc:date>2020-05-01T00:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883754#M537</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;We have the same problem here too. Like &lt;A class="mention" href="https://community.duo.com/u/lvincent7"&gt;@lvincent7&lt;/A&gt; we are using Delphi RIO and the TRestClient.&lt;BR /&gt;
I tried the python script from here &lt;A href="https://github.com/duosecurity/duo_client_python" rel="nofollow noopener"&gt;https://github.com/duosecurity/duo_client_python&lt;/A&gt; with our parameter and it works like a treat.&lt;BR /&gt;
But what I can see so far it must have something to do with the encoding of the key and the body for the HMAC.SHA1. In the python script it is transforming it to a Bytes literal before running the HMAC.SHA1.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 May 2020 06:49:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883754#M537</guid>
      <dc:creator>NielsMaschmeyer</dc:creator>
      <dc:date>2020-05-01T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883755#M538</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Yup same problem here too.  I am getting invalid signature when I try to run the request.  The API documentation sucks.   Where I have a question is in the time zone offset. Even though the documenation shows -0000 I do belive you are supposed to put the actual offset there.  When I put -0000 as the offset i get “missing credentials” but when i put “-0500” i get invalid signuature. So I am not sure which one is right…&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 May 2020 11:38:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883755#M538</guid>
      <dc:creator>Corey_Crossman</dc:creator>
      <dc:date>2020-05-13T11:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883756#M539</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Because of the lack of reply from the Duo team here and no viable path forward, we have given up on Duo and are moving forward with a different solution.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 May 2020 14:24:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883756#M539</guid>
      <dc:creator>Dave_Szabo</dc:creator>
      <dc:date>2020-05-13T14:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883757#M540</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;Thank you for bringing this to our attention. We will look into fixing the HMAC example in the documentation.&lt;/P&gt;
&lt;P&gt;Please &lt;A href="https://help.duo.com/s/article/1441"&gt;contact Duo Support&lt;/A&gt; to troubleshoot this issue, and they will be able to help you figure out what’s going on here. As a friendly reminder, while we respond where we can, the community isn’t an official support channel with guaranteed response times.&lt;/P&gt;
&lt;P&gt;For anyone reading, we have knowledge base articles on frequently asked questions around our Auth API that might prove useful too: &lt;A href="https://help.duo.com/s/search/All/Home/auth%20api?language=en_US&amp;amp;tabset-da1b1=2"&gt;Link to Auth API articles here&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 May 2020 16:55:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883757#M540</guid>
      <dc:creator>Amy2</dc:creator>
      <dc:date>2020-05-13T16:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Duo Auth API Sample - HMAC Issue</title>
      <link>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883758#M541</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;After a lot of exploration we were able to resolve our issue with the help of &lt;A class="mention" href="https://community.duo.com/u/nielsmaschmeyer"&gt;@NielsMaschmeyer&lt;/A&gt;. Basically, if anyone creating a Delphi REST client API that interacts with DUO API you have to look into the encoding. Prior to the signature creation, the parameters must be AnsiString then pass these for generating the signature using the built-in THashSHA1.GetHMAC in Delphi together with the secret key. Bind the result with the Basic Authenticator, in addition you add the query parameters to your REST request parameters. I hope you are able to get that. Will simplify our solution and hopefully share it here.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 May 2020 00:51:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/duo-auth-api-sample-hmac-issue/m-p/4883758#M541</guid>
      <dc:creator>lvincent7</dc:creator>
      <dc:date>2020-05-14T00:51:40Z</dc:date>
    </item>
  </channel>
</rss>

