Saved Connections and Inventory
In enterprise usage, saved connections become the operational backbone of rauto.
They are not just convenience shortcuts. They are the source of truth for:
- reusable target definitions
- inventory grouping
- orchestration targeting
- long-term session records
Why saved connections matter
Ad-hoc flags are fine at the beginning:
But enterprise workflows quickly need:
- shorter and safer command lines
- reusable target naming
- stable inventory selection for jobs and orchestration
- consistent device profile assignment
- searchable device model and software version metadata
- auditable history bound to known targets
That is where saved connections become essential.
Core connection lifecycle
Add or update a saved connection
Reuse a saved connection
Inspect and delete
Device facts
Saved connections can persist two optional device facts:
device_modelsoftware_version
The Web connection editor lets you enter either value manually or detect both from the target. Detection resolves the effective device Profile, executes its version show object, and extracts facts from the NTC/TextFSM result. If parsing returns only one fact, the editor reports a partial result and preserves the existing manual value for the missing field.
The saved connection catalog includes model and version in its searchable summary, so operators can locate targets by platform details as well as by name, host, groups, or labels.
Save effective connection after success
Credential reference rules
Authentication now lives in reusable device credentials rather than connection records.
- every new saved connection must reference an existing credential
- saved connections store
credential_id, not usernames or passwords --credential <name-or-id>selects authentication for a direct target--save-connectionpreserves the effective credential reference- credential ciphertext is encrypted in
rauto.db; the master key stays in the system keyring - a referenced credential cannot be deleted until connections release it
Operational implication:
- database backups move connection metadata and credential ciphertext
- the operating-system keyring master key is not included, so cross-machine restores may require credentials to be saved again
See Device Credentials for lifecycle and import commands.
Bulk import
Bulk import is one of the most important enterprise onboarding features.
Supported file types:
.csv.xlsx.xls.xlsm.xlsb
Recommended headers
Import behavior
From the README and current docs:
- import uses upsert semantics by connection name
- if
nameis omitted, it can be derived fromhost credentialmust name an existing unique credential; connection import does not create credentials- omitting
credentialpreserves the reference for an existing connection, while a new connection requires one - device facts accept
device_model/software_versionheaders and common aliases such asmodel,hardware,os_version, andversion - Web UI also exposes a starter CSV download flow
Repository sample files:
templates/examples/connection-import-template-en.csvtemplates/examples/connection-import-template-zh.csv
Session record model
Saved connections can be used to filter unified session records.
Current CLI support:
This matters in enterprise environments because session records are easier to interpret when bound to a stable saved target instead of transient ad-hoc flags.
Inventory model
There is no separate persistent inventory target record layer anymore.
Instead:
- saved connections are the inventory target source of truth
- inventory CLI focuses on group management
This is a subtle but important design decision.
It means the target identity model stays unified:
- one saved connection entry
- reused by CLI execution
- reused by Web UI
- reused by groups
- reused by orchestration
Group management
Current group operations:
Group JSON shape
The positional group name passed to group upsert is authoritative if JSON content also contains a name field.
Automatic discovery
Discovery accepts IPs, CIDRs, and ranges, tries up to three ordered probe credentials, persists the latest result, and prevents duplicate endpoint imports. Continue with Automatic Device Discovery for filters, TUI behavior, and Web usage.
Labels, groups, and enterprise inventory usage
The README describes saved connections as the source of truth for fields including:
enabledlabelsgroups
This makes saved connections suitable for:
- environment segmentation
- region / site grouping
- role-based grouping
- staged orchestration targeting
- approval-friendly naming and reporting
Enterprise operating model
Recommended maturity path
Stage 1: ad-hoc execution
Use direct flags while learning.
Stage 2: saved connection normalization
Standardize names, device profiles, and SSH security settings.
Stage 3: group-based inventory
Define groups such as:
coreaccessedgelinux-applinux-jump
Stage 4: orchestration and workflow reuse
Build rollout logic on top of saved connections and groups rather than inline host fields.
Naming recommendations
Use stable names that work well in session records and orchestration plans.
Examples:
core-sh-01access-bj-07fw-hq-01linux-jump-01