Credentials

Credentials

This page describes Open-AudIT version 7. Content for earlier versions is kept further down the page, under Pre version 7.

Credentials

What is it?

Discovery can see a device without logging on, but seeing is not knowing. The software list, the users, the serial number, the disks, everything worth having comes from an audit, and an audit has to log on. Credentials is where you give Open-AudIT the logins to do that, once, in one place, encrypted.

You'll find it at menu > Discover > Credentials, and setting up credentials should be one of the first things you do after installing Open-AudIT. Ten types are supported.

  • SNMP (v1 and v2)

  • SNMP v3

  • SSH

  • SSH Key

  • VMware

  • Proxmox

  • Nutanix

  • XCP-ng / XenServer

  • API

  • Windows

What does it do?

It stores your logins encrypted. The credential details themselves are encrypted before they touch the database, and the web interface never displays the secret parts back to you.

It hands them to discovery in a sensible order. When a discovery reaches a device it does not try everything blindly. Credentials that worked on this exact device last time are kept against the device itself and tried first. Only if those fail does the wider list get tested, starting with credentials known to have worked somewhere before. SSH keys are tried before SSH passwords, and while testing SSH, Open-AudIT also works out and records whether the login is root or can use sudo, because that decides how complete the audit can be.

Each type carries what that protocol needs. Pick the type and the form shows the right fields.

Type

What you provide

SNMP (v1 / v2)

The community string.

SNMP v3

Security name and level, authentication protocol and passphrase, privacy protocol and passphrase, and optionally a context name and engine ID.

SSH

Username and password.

SSH Key

Username and the private key. Paste the whole key file into the box, from the BEGIN line to the END line inclusive. The key password is optional, as is a sudo password.

VMware

Username and password for the ESXi or vCenter API.

Proxmox

Username and password for the Proxmox VE API. Give the username with its realm, for example root@pam.

Nutanix

Username and password for the Nutanix Prism API, for example a Prism viewer account. Read access is enough.

XCP-ng / XenServer

Username and password for the XCP-ng or XenServer management API (XAPI), usually root.

API

Username and password for the API, and optionally a port.

Windows

Username and password. Give the username in the user@domain.com form for domain accounts.

Every credential belongs to an organisation, so in a multi-org setup each org's credentials are only offered to that org's discoveries.

How does it work?

The shared list lives in the credentials database table, encrypted in storage. The working logins that discovery remembers for each individual device are stored separately, in the credential table, note the missing s. When a discovery reaches a device, that device's own credentials are retrieved, decrypted and tested first, and only on failure does the shared list get tried.

Why?

The audit is the point. Without credentials a device is an IP address with open ports and a best guess at what it is. With them it is a fully audited machine. The difference in what you get back is the difference between a directory and an inventory.

One place, not a spreadsheet. The logins your discoveries depend on live encrypted in the database, not in a text file on someone's desktop, and changing a password means changing it once.

Discovery gets faster on its own. Because the working credential is remembered per device, the second discovery of a network spends almost no time testing logins. Only new devices pay the full testing cost.

Least privilege is respected. A sudo enabled user works for Linux audits, so you don't have to hand out root passwords, though root or sudo gets a more complete result than an unprivileged login.

How?

Three ways in, and one warning worth reading.

1. Create them one at a time. Go to menu > Discover > Credentials > Create Credentials. Give it a name you'll recognise, pick the organisation and the type, and fill in the fields that appear. For an SSH key, copy the entire private key file into the box, all of it, including the BEGIN and END lines. Using the example below, everything from the first dash to the last is pasted in.

-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,328refbeif03 duvbwuidnpowmpowenciubviencpomcpoenrfurehoiernfporjfoierhiuebvvn ... fSuJdcdlGBx7KH/7N/rRCioAc7lcRi/x+AgVs+7Cng0a5OHT4DfA6A== -----END RSA PRIVATE KEY-----
The Create Credentials form in version 7, with the SSH type selected

The Create Credentials form with the SSH type selected. The fields shown depend on the type.

2. Or import a batch. menu > Discover > Credentials > Import Credentials takes a CSV. The columns are name, org_id, type, and then the credential details as credentials.attribute columns, for example credentials.community, credentials.username, credentials.password. Include an id column with a number to update an existing entry rather than create a new one.

3. Then let discovery use them. There is nothing to attach. A discovery picks up the credentials visible to its organisation, tests them as described above, and remembers what worked on each device for next time.

A couple of practical notes. Windows passwords should avoid single and double quotes, which is a remote WMI limitation rather than an Open-AudIT one. And the export warning: the web interface hides the secrets, but a CSV, XML or JSON export of credentials, whether a single entry or the whole collection, contains the real details, decrypted, because that is what an export is for. If you don't want that possible at all, turn off the decrypt_credentials configuration item.


Pre version 7. Everything below this line describes Open-AudIT before version 7. Menus, screens and behaviour may differ.

Pre version 7

Introduction

 Credentials can have one of a few different types - snmp v.1 / v.2, snmp v.3, ssh, ssh key, windows are all implemented. CAVEAT - ssh keys are not implemented for Windows Open-AudIT servers as yet.

How Does it Work?

Credentials are stored in the "credentials" database table. The actual credential information is encrypted in storage. When a Discovery is run, a device has it's specific credentials retrieved from the database, decrypted and tested. If these fail the list of credentials is also retrieved, decrypted and then tested against the device starting with credentials known to have worked previously. Device specific credentials are stored at an individual device level in the "credential" table (note - no 's' in the table name). SSH keys are tested before SSH username / password. When testing SSH, credentials will also be marked as working with sudo or being root.

NOTE - If you request a downloaded CSV, XML or JSON format (either a single credential, or the complete collection) the actual credential details will be sent. Not the encrypted string, the actual username, password, community string, etc. Any sensitive details are not displayed in the web GUI, but are made available via other formats. To prevent this export a configuration item is available called decrypt_credentials.

Creating Credentials

To make another credential entry use the menu and go to menu: Discover -> Credentials -> Create Credentials. Provide a name, organization and optionally a description. Choose a type of credential. Once you do this, the additional fields will populate with the available configurable options.

Importing Credentials

Credentials can be imported en-masse using menu → Discover → Credentials → Import Multiple Credentials. We use a CSV formatted file. That page details the required columns.

Below is an example of the required csv format. The minimum required attributes for attributes are 'name','org_id','type' and the credentials details (see below). You should not include the edited_by and edited_date fields. These will be automatically set. If you include the "id" field and set it with a number, that item will be updated rather than created. The field 'credentials' is stored as an encrypted JSON object. You should use the field names of 'credentials.attribute name'. For an example, an SNMP community string would be 'credentials.community'. For an example, use the web interface to create a credential set and then go to menu -> Admin -> Database and click on Discoveries. Then export to CSV. Valid credentials attributes are: community, username, password, domain, ssh_key, authentication_passphrase, authentication_protocol, privacy_passphrase, privacy_protocol, security_level, security_name. You should use a header line containing the names of the columns you wish to populate, then your data lines below that.

"name","org_id","type","credentials.community","credentials.username","credentials.password"

"Public SNMP","1","snmp","public","",""

"My SSH","1","ssh","","my_user","my_password"

"Windows Creds","1","windows","","my_win_user@open-audit.com","my_win_password"

 

SSH Keys

You should copy and paste the entire file into the textbox. In the case below, copy ALL the text.

-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,328refbeif03 duvbwuidnpowmpowenciubviencpomcpoenrfurehoiernfporjfoierhiuebvvn dvkjeekjvlfkvlfbvienvpoemvpoenviuberiovneporvmpoernvoiernvoiernv 9wI0nVfcdhhd8DExfgwFfWr2AoGaNYgE0TVUfRU21HQG8C+HoLysC1a4CaHsRgVy DTzGJQhfKafu2G31wt12kTycTpujeO0EyRsa4kT0KPp+IDJRtkRmEJY3UG1Xg72P jLZ/o2Ygz15ZT9GkNb9jyPCZMF3NJqL+Mz03ikKHDZvfOxA5P1XTPiXSVLzB1MJt lgP2A3vlW/eaVeVhPa6Wo9gbDm/+PzDL+rT9ZK5K8sc1AcdIJ0m9OGCQtqpwSxEB iJ07usXWXI4Cf4ex3+Oxeoineoifnoienfoiernfoiernfoermf[pef[pffed0DD FsRSBmCbsCHrzGIqk8Maqh5gjPhkerneLlH40Jeloks2tkD72UT/bYWgpvTxzVUA +LSVhR/Li+cGIebgKqKgE2sXmuIGn9UuqOvFbDudowRyrO9OtM1QsfresILmTKTA VCNKEQExL1mhsUnr1paOOMs5vZ2oO3x0S7x+QXrWGye+QK9aquZ+IQ3Z4Lb130Q4 dfvneivnoiernvoirenvoinervionreoivnreoivnoiernvoiernv/pae,fefeff W76aH+wxCuuSNWACvhfDcYXjp4dP3AD2EiuIYlvkIl0cwNrX9tmZyG37qaYDPCdW ikmDolK6tepoqS05js+RouUHvZEZg3jBxkTkI0FB+JJcOvzl9ixf3Ce/CeWkcCrb 6oGjyNEOqoFDoceIUFZGOw4tsNySyqON9a0TuToPCX5rQd57fPabnl6Tl6XUCqwz 1DZ2HyVm+k4DAzLx2BoA5urWzdlniuberovbeirvbifevnienvirenviernviner ovneiuvnieufvbiuerbviunviunervioneroivnoiernvoiernvoinervoineroi b2cmcEETwXZEzVudljkOMt7d8F2fWVcFPYSh/wneI1A7kPiWw9B1T3SRTiLS8fv4 t8pr/GvAsevzRe7q9oMAfnAYnBuWCzN++JitjgwRhj1n/WmqxqfPuRwcZ/Y8cHZb fSuJdcdlGBx7KH/7N/rRCioAc7lcRi/x+AgVs+7Cng0a5OHT4DfA6A== -----END RSA PRIVATE KEY-----

 

 

 

 

Viewing Credential Details

Go to menu: Discover -> Credentials -> List Credentials.

You will see a list of credential. You can view a credential by clicking on the blue view icon. You can also edit or delete your credentials.

.

Database Schema

The database schema can be found in the application is the user has database::read permission by going to menu: Admin -> Database -> List Tables, then clicking on the details button for the table.

 

API / Web Access

You can access the collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see The Open-AudIT API documentation for further details.

 

Comments