Installation Validation
  • 21 Mar 2024
  • Dark
    Light
  • PDF

Installation Validation

  • Dark
    Light
  • PDF

Article Summary

Once Itential Automation Gateway is installed and configured, use the information in this guide to change the default password, get started with the API, and set your security keys.

  • Default User Name: admin@itential.
  • Default Password: admin.

Change Default Password

You must first login to obtain the authorization token and then paste the token into the change password curl command.

An example curl script is provided below.

$ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "new_password": "super-secure-password",
   "old_password": "admin"
 }' 'http://localhost:8083/api/v2.0/account/admin%40itential/change_password'

Alternate Method: Editing the SQLite Database

The default password can also be changed by directly editing the underlying SQLite database. This may be required if Itential Automation Gateway is down or otherwise not accepting API requests. The sqlite3 Python module is included in all Itential Automation Gateway installations; as such, the following examples assume its usage as your SQLite interface.

  1. Load the Itential Automation Gateway data file into sqlite3.

    sqlite3 automation-gateway.db
    
  2. Optionally, list all the tables present in the data file. The account table contains the password to be changed.

    .table
    
  3. Update the admin@itential user password on the account table. Provide the new password as a SHA-512 hash. In this example, the hash equals "Admin1234!". If you use the hash as-is, be sure to update the password to a unique and secure value once you have access to the system.

    UPDATE account SET password_hash = "pbkdf2:sha512:40000$7z3XJWhA$8fb0c3cc8098cc9d1ae566e7d1d622794bfe8c1808fa9c42a8cdd9b5d098231d6b46f71a74f4b692ed2d21043cb4417234e4efe01df3e928e86f5c96ac449fb8" WHERE name = "admin@itential" ;
    
  4. Optionally, review your changes by listing all account table values.

    select * from account;
    
  5. Exit the sqlite3 module.

    .exit
    

Login to Automation Gateway

Login to the Automation Gateway UI running at: https://servername:8083.

  • The username will be admin@itential.
  • The password will be the <super-secure-password> that was selected in the previous step.
Click here for IAG 2022.1

Login to Automation Gateway UI running at:

https://servername:8443

Password Reset Functionality Enabled

During initial (first time) login as admin, a straightforward Change Password feature is enabled that allows the user to enter a new password.

  • You will be asked to set security questions and a strong password that meets security guidelines.

  • The default email for admin is set to admin@itential.com but it can be changed to an email that complies to organization standards. The email and security answers that are set will be used as an identifier for the account, in case of password or username recovery.

  • For creation of user accounts, the email id is a mandatory field.

Figure 1: First Time Login

01_FirstLogin

Note:

Refer to IAG Server Configuration for more information.

Getting Started with the API

For a complete API reference, use the API Documentation link in the Automation Gateway UI. The interface allows you to browse and interact with the Automation Gateway API.

Add a Device

If an existing Ansible Inventory is not already configured, you can add a new device to Automation Gateway using the API. The following is an example curl script to add a device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "name": "ios02",
   "variables": {
     "ansible_host": "192.168.32.79",
     "ansible_port": 22,
     "ansible_user": "ios-user",
     "ansible_ssh_private_key_file": "/path/to/key",
     "ansible_network_os": "ios",
     "ansible_connection": "network_cli"
   }
 }' 'https://localhost:8083/api/v2.0/devices'

Get a Device List

Use the following command to get a list of managed devices.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X GET --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Accept: application/json' 'http://localhost:8083/api/v2.0/devices'

Get Configuration for a Device

Use the following command to retrieve the configuration for a managed device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "hosts": [ "ios01" ]
 }' 'https://localhost:8083/api/v2.0/roles/itential_get_config/execute'

Click here to show code snippet in IAG 20221.

Automation Gateway 2022.1

   curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "hosts": [ "ios01" ],
   "template": "ios_config"
 }' 'https://localhost:8083/api/v2.0/getConfig'

Run a Command on a Device

Use the following to run a command on a managed device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "command": [ "show version" ],
   "hosts": [ "ios01" ]
 }' 'https://localhost:8083/api/v2.0/roles/itential_cli/execute'

Click here to show code snippet in IAG 20221.

Automation Gateway 2022.1

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v2.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "command": [ "show version" ],
   "hosts": [ "ios01" ],
   "template": "ios_command"
 }' 'https://localhost:8083/api/v2.0/runCommand'

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.