<?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 FTD API Sandbox Authentication Errors in DevNet Sandbox</title>
    <link>https://community.cisco.com/t5/devnet-sandbox/ftd-api-sandbox-authentication-errors/m-p/4307929#M5902</link>
    <description>&lt;P&gt;I reserved and successfully connected to an FTD REST API over VPN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the sandbox for the FTD REST API learning lab (&lt;A href="https://developer.cisco.com/learning/lab/fdm-api-102/step/2" target="_blank" rel="noopener"&gt;https://developer.cisco.com/learning/lab/fdm-api-102/step/2&lt;/A&gt;).&amp;nbsp; However, when attempting to use both Python and Ansible per the lab instructions, I am getting authentication errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g., for ansible I have modified the hosts and playbook files as per the lab guide (running this from docker image as suggested):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@a946c73820c3:/ftd-ansible/playbooks# cat /etc/ansible/hosts&lt;BR /&gt;[ftd]&lt;BR /&gt;10.10.20.65 ansible_network_os=ftd ansible_user=admin ansible_password=&amp;lt;removed&amp;gt; ansible_httpapi_use_ssl=True ansible_httpapi_validate_certs=False ansible_httpapi_port=443&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;root@a946c73820c3:/ftd-ansible/playbooks# cat network.yml&lt;BR /&gt;- hosts: 10.10.20.65&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;BR /&gt;- name: Create an FQDN network for Cisco DevNet&lt;BR /&gt;ftd_configuration:&lt;BR /&gt;operation: upsertNetworkObject&lt;BR /&gt;data:&lt;BR /&gt;name: CiscoDevNetNetwork&lt;BR /&gt;subType: FQDN&lt;BR /&gt;value: developer.cisco.com&lt;BR /&gt;isSystemDefined: False&lt;BR /&gt;type: networkobject&lt;BR /&gt;dnsResolution: IPV4_AND_IPV6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when running the playbook I get the following error:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;root@a946c73820c3:/ftd-ansible/playbooks# ansible-playbook network.yml&lt;/P&gt;&lt;P&gt;PLAY [10.10.20.65] *******************************************************************&lt;/P&gt;&lt;P&gt;TASK [Gathering Facts] ***************************************************************&lt;BR /&gt;&lt;STRONG&gt;fatal: [10.10.20.65]: FAILED! =&amp;gt; {"msg": "Server returned an error during authentication request: {'message': 'Unauthorized', 'status_code': 401}"}&lt;/STRONG&gt;&lt;BR /&gt;to retry, use: --limit @/ftd-ansible/playbooks/network.retry&lt;/P&gt;&lt;P&gt;PLAY RECAP ***************************************************************************&lt;BR /&gt;10.10.20.65 : ok=0 changed=0 unreachable=0 failed=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, from within the docker image, I can ssh to the FTD using the same credentials I entered in the ansible configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@a946c73820c3:/ftd-ansible/playbooks# ssh admin@10.10.20.65&lt;BR /&gt;The authenticity of host '10.10.20.65 (10.10.20.65)' can't be established.&lt;BR /&gt;ECDSA key fingerprint is SHA256:WQDnsgqj4BS2Azw101ZUJU1fRaGY1Aq+R4qfGnDA5+o.&lt;BR /&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;BR /&gt;Warning: Permanently added '10.10.20.65' (ECDSA) to the list of known hosts.&lt;BR /&gt;Password:&lt;BR /&gt;Last login: Tue Mar 16 05:41:49 UTC 2021 from 192.168.254.11 on pts/0&lt;/P&gt;&lt;P&gt;Copyright 2004-2020, Cisco and/or its affiliates. All rights reserved.&lt;BR /&gt;Cisco is a registered trademark of Cisco Systems, Inc.&lt;BR /&gt;All other trademarks are property of their respective owners.&lt;/P&gt;&lt;P&gt;Cisco Fire Linux OS v6.6.0 (build 37)&lt;BR /&gt;Cisco Firepower Threat Defense for VMWare v6.6.0 (build 90)&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried this on two separate reserved sandboxes and got the same errors on both.&amp;nbsp; Is there an issue with the sandobox causing these errors?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any assistance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 06:10:30 GMT</pubDate>
    <dc:creator>dgoodenberger</dc:creator>
    <dc:date>2021-03-16T06:10:30Z</dc:date>
    <item>
      <title>FTD API Sandbox Authentication Errors</title>
      <link>https://community.cisco.com/t5/devnet-sandbox/ftd-api-sandbox-authentication-errors/m-p/4307929#M5902</link>
      <description>&lt;P&gt;I reserved and successfully connected to an FTD REST API over VPN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the sandbox for the FTD REST API learning lab (&lt;A href="https://developer.cisco.com/learning/lab/fdm-api-102/step/2" target="_blank" rel="noopener"&gt;https://developer.cisco.com/learning/lab/fdm-api-102/step/2&lt;/A&gt;).&amp;nbsp; However, when attempting to use both Python and Ansible per the lab instructions, I am getting authentication errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g., for ansible I have modified the hosts and playbook files as per the lab guide (running this from docker image as suggested):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@a946c73820c3:/ftd-ansible/playbooks# cat /etc/ansible/hosts&lt;BR /&gt;[ftd]&lt;BR /&gt;10.10.20.65 ansible_network_os=ftd ansible_user=admin ansible_password=&amp;lt;removed&amp;gt; ansible_httpapi_use_ssl=True ansible_httpapi_validate_certs=False ansible_httpapi_port=443&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;root@a946c73820c3:/ftd-ansible/playbooks# cat network.yml&lt;BR /&gt;- hosts: 10.10.20.65&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;BR /&gt;- name: Create an FQDN network for Cisco DevNet&lt;BR /&gt;ftd_configuration:&lt;BR /&gt;operation: upsertNetworkObject&lt;BR /&gt;data:&lt;BR /&gt;name: CiscoDevNetNetwork&lt;BR /&gt;subType: FQDN&lt;BR /&gt;value: developer.cisco.com&lt;BR /&gt;isSystemDefined: False&lt;BR /&gt;type: networkobject&lt;BR /&gt;dnsResolution: IPV4_AND_IPV6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when running the playbook I get the following error:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;root@a946c73820c3:/ftd-ansible/playbooks# ansible-playbook network.yml&lt;/P&gt;&lt;P&gt;PLAY [10.10.20.65] *******************************************************************&lt;/P&gt;&lt;P&gt;TASK [Gathering Facts] ***************************************************************&lt;BR /&gt;&lt;STRONG&gt;fatal: [10.10.20.65]: FAILED! =&amp;gt; {"msg": "Server returned an error during authentication request: {'message': 'Unauthorized', 'status_code': 401}"}&lt;/STRONG&gt;&lt;BR /&gt;to retry, use: --limit @/ftd-ansible/playbooks/network.retry&lt;/P&gt;&lt;P&gt;PLAY RECAP ***************************************************************************&lt;BR /&gt;10.10.20.65 : ok=0 changed=0 unreachable=0 failed=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, from within the docker image, I can ssh to the FTD using the same credentials I entered in the ansible configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@a946c73820c3:/ftd-ansible/playbooks# ssh admin@10.10.20.65&lt;BR /&gt;The authenticity of host '10.10.20.65 (10.10.20.65)' can't be established.&lt;BR /&gt;ECDSA key fingerprint is SHA256:WQDnsgqj4BS2Azw101ZUJU1fRaGY1Aq+R4qfGnDA5+o.&lt;BR /&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;BR /&gt;Warning: Permanently added '10.10.20.65' (ECDSA) to the list of known hosts.&lt;BR /&gt;Password:&lt;BR /&gt;Last login: Tue Mar 16 05:41:49 UTC 2021 from 192.168.254.11 on pts/0&lt;/P&gt;&lt;P&gt;Copyright 2004-2020, Cisco and/or its affiliates. All rights reserved.&lt;BR /&gt;Cisco is a registered trademark of Cisco Systems, Inc.&lt;BR /&gt;All other trademarks are property of their respective owners.&lt;/P&gt;&lt;P&gt;Cisco Fire Linux OS v6.6.0 (build 37)&lt;BR /&gt;Cisco Firepower Threat Defense for VMWare v6.6.0 (build 90)&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried this on two separate reserved sandboxes and got the same errors on both.&amp;nbsp; Is there an issue with the sandobox causing these errors?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any assistance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 06:10:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-sandbox/ftd-api-sandbox-authentication-errors/m-p/4307929#M5902</guid>
      <dc:creator>dgoodenberger</dc:creator>
      <dc:date>2021-03-16T06:10:30Z</dc:date>
    </item>
  </channel>
</rss>

