oxidized 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +30 -4
- data/.github/ISSUE_TEMPLATE/feature_request.md +10 -3
- data/.github/ISSUE_TEMPLATE/support-request.md +30 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +3 -1
- data/.github/workflows/codeql.yml +4 -4
- data/.github/workflows/publishdocker.yml +2 -2
- data/.github/workflows/ruby.yml +10 -3
- data/.github/workflows/stale.yml +1 -1
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +2 -8
- data/AGENTS.md +174 -0
- data/CHANGELOG.md +127 -0
- data/CONTRIBUTING.md +78 -44
- data/Dockerfile +8 -4
- data/README.md +8 -1
- data/Rakefile +1 -1
- data/docs/Configuration.md +10 -1
- data/docs/Creating-Models.md +6 -6
- data/docs/DeviceSimulation.md +80 -51
- data/docs/Docker.md +49 -0
- data/docs/Hooks.md +92 -67
- data/docs/Inputs.md +95 -16
- data/docs/Issues.md +49 -13
- data/docs/Model-Notes/FTD.md +64 -0
- data/docs/Model-Notes/GrandstreamHT8xx.md +8 -0
- data/docs/Model-Notes/HPEAruba.md +5 -0
- data/docs/Model-Notes/ITMGOS.md +40 -0
- data/docs/Model-Notes/PanOS_API.md +20 -1
- data/docs/Model-Notes/RouterOS.md +13 -0
- data/docs/Model-Notes/TPLink.md +75 -0
- data/docs/Model-Notes/TrueNAS.md +11 -7
- data/docs/Outputs.md +1 -0
- data/docs/Release.md +49 -22
- data/docs/Ruby-API.md +231 -9
- data/docs/Supported-OS-Types.md +10 -4
- data/docs/Troubleshooting.md +8 -9
- data/extra/device2yaml.rb +21 -5
- data/extra/hooks/modelrulesadvanced.rb +2 -4
- data/extra/oxidized.service +0 -1
- data/extra/syslog.rb +1 -1
- data/lib/oxidized/cli/support.rb +149 -0
- data/lib/oxidized/cli.rb +9 -0
- data/lib/oxidized/config/vars.rb +2 -1
- data/lib/oxidized/core.rb +20 -0
- data/lib/oxidized/hook/ciscosparkdiff.rb +1 -1
- data/lib/oxidized/hook/slackdiff.rb +1 -1
- data/lib/oxidized/hook/xmppdiff.rb +2 -2
- data/lib/oxidized/hook.rb +2 -0
- data/lib/oxidized/input/cli.rb +14 -2
- data/lib/oxidized/input/debugtext.rb +40 -0
- data/lib/oxidized/input/debugyaml.rb +82 -0
- data/lib/oxidized/input/exec.rb +1 -6
- data/lib/oxidized/input/ftp.rb +0 -4
- data/lib/oxidized/input/http.rb +23 -15
- data/lib/oxidized/input/scp.rb +3 -1
- data/lib/oxidized/input/ssh.rb +28 -21
- data/lib/oxidized/input/sshbase.rb +50 -24
- data/lib/oxidized/input/telnet.rb +14 -11
- data/lib/oxidized/input/tftp.rb +0 -4
- data/lib/oxidized/model/acos.rb +2 -2
- data/lib/oxidized/model/acsw.rb +1 -1
- data/lib/oxidized/model/adtran.rb +1 -1
- data/lib/oxidized/model/aireos.rb +3 -3
- data/lib/oxidized/model/aoscx.rb +20 -12
- data/lib/oxidized/model/aosw.rb +8 -13
- data/lib/oxidized/model/arbos.rb +1 -1
- data/lib/oxidized/model/aricentiss.rb +1 -1
- data/lib/oxidized/model/asa.rb +1 -1
- data/lib/oxidized/model/asternos.rb +1 -1
- data/lib/oxidized/model/audiocodesmp.rb +1 -1
- data/lib/oxidized/model/awplus.rb +4 -3
- data/lib/oxidized/model/bdcom.rb +1 -1
- data/lib/oxidized/model/br6910.rb +1 -1
- data/lib/oxidized/model/c4cmts.rb +1 -1
- data/lib/oxidized/model/ciscosmb.rb +0 -1
- data/lib/oxidized/model/cnos.rb +10 -1
- data/lib/oxidized/model/comnetms.rb +1 -1
- data/lib/oxidized/model/coriantgroove.rb +1 -1
- data/lib/oxidized/model/cumulus.rb +3 -3
- data/lib/oxidized/model/dellx.rb +1 -1
- data/lib/oxidized/model/dlink.rb +1 -1
- data/lib/oxidized/model/dlinknextgen.rb +2 -1
- data/lib/oxidized/model/dnos.rb +2 -2
- data/lib/oxidized/model/eatonnetwork.rb +33 -32
- data/lib/oxidized/model/eciapollo.rb +1 -1
- data/lib/oxidized/model/edgeos.rb +3 -3
- data/lib/oxidized/model/enterasys.rb +1 -1
- data/lib/oxidized/model/eos.rb +1 -0
- data/lib/oxidized/model/fastiron.rb +10 -1
- data/lib/oxidized/model/fiberdriver.rb +1 -1
- data/lib/oxidized/model/firelinuxos.rb +1 -1
- data/lib/oxidized/model/fortigate.rb +16 -3
- data/lib/oxidized/model/fortios.rb +1 -1
- data/lib/oxidized/model/ftd.rb +183 -0
- data/lib/oxidized/model/ftos.rb +2 -2
- data/lib/oxidized/model/garderos.rb +16 -5
- data/lib/oxidized/model/grandstreamht8xx.rb +19 -0
- data/lib/oxidized/model/hpebladesystem.rb +1 -1
- data/lib/oxidized/model/ibos.rb +1 -2
- data/lib/oxidized/model/ingate.rb +15 -1
- data/lib/oxidized/model/ios.rb +2 -0
- data/lib/oxidized/model/iosxr.rb +9 -3
- data/lib/oxidized/model/ironware.rb +1 -1
- data/lib/oxidized/model/itmgos.rb +74 -0
- data/lib/oxidized/model/junos.rb +10 -4
- data/lib/oxidized/model/kornfeldos.rb +2 -4
- data/lib/oxidized/model/lancom.rb +2 -2
- data/lib/oxidized/model/linuxgeneric.rb +4 -2
- data/lib/oxidized/model/masteros.rb +1 -1
- data/lib/oxidized/model/mlnxos.rb +1 -1
- data/lib/oxidized/model/model.rb +5 -2
- data/lib/oxidized/model/mtrlrfs.rb +1 -1
- data/lib/oxidized/model/ndms.rb +1 -1
- data/lib/oxidized/model/necix.rb +1 -1
- data/lib/oxidized/model/netgear.rb +1 -1
- data/lib/oxidized/model/netscaler.rb +1 -1
- data/lib/oxidized/model/nxos.rb +13 -1
- data/lib/oxidized/model/ocnos.rb +1 -1
- data/lib/oxidized/model/onefinity.rb +1 -1
- data/lib/oxidized/model/oneos.rb +0 -1
- data/lib/oxidized/model/openbsd.rb +1 -1
- data/lib/oxidized/model/os10.rb +2 -2
- data/lib/oxidized/model/os6.rb +3 -2
- data/lib/oxidized/model/panos.rb +1 -1
- data/lib/oxidized/model/panos_api.rb +42 -14
- data/lib/oxidized/model/procurve.rb +63 -31
- data/lib/oxidized/model/routeros.rb +6 -1
- data/lib/oxidized/model/screenos.rb +2 -2
- data/lib/oxidized/model/sgos.rb +1 -1
- data/lib/oxidized/model/siklu.rb +2 -2
- data/lib/oxidized/model/slxos.rb +1 -1
- data/lib/oxidized/model/sonicos.rb +2 -2
- data/lib/oxidized/model/tdre.rb +2 -2
- data/lib/oxidized/model/telco.rb +1 -1
- data/lib/oxidized/model/tmos.rb +11 -2
- data/lib/oxidized/model/tplink.rb +8 -10
- data/lib/oxidized/model/truenas.rb +56 -5
- data/lib/oxidized/model/viptela.rb +1 -1
- data/lib/oxidized/model/voltaire.rb +1 -1
- data/lib/oxidized/model/vrp.rb +14 -8
- data/lib/oxidized/model/vsololt.rb +93 -0
- data/lib/oxidized/model/vyatta.rb +3 -3
- data/lib/oxidized/model/vyos.rb +6 -1
- data/lib/oxidized/model/xos.rb +1 -1
- data/lib/oxidized/model/zhoneolt.rb +1 -1
- data/lib/oxidized/node.rb +9 -9
- data/lib/oxidized/nodes.rb +5 -13
- data/lib/oxidized/output/git.rb +72 -81
- data/lib/oxidized/output/gitcrypt.rb +13 -32
- data/lib/oxidized/redact.rb +18 -0
- data/lib/oxidized/signals.rb +2 -16
- data/lib/oxidized/source/source.rb +5 -1
- data/lib/oxidized/source/sql.rb +1 -0
- data/lib/oxidized/version.rb +2 -2
- data/lib/oxidized.rb +1 -0
- data/lib/refinements.rb +7 -3
- data/oxidized.gemspec +20 -11
- metadata +74 -29
data/docs/Hooks.md
CHANGED
|
@@ -109,50 +109,102 @@ hooks:
|
|
|
109
109
|
|
|
110
110
|
## Hook type: githubrepo
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
The `githubrepo` hook executes a `git push` to a configured `remote_repo` when
|
|
113
|
+
the specified event is triggered.
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
### Configuration keys
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
| Key | Description |
|
|
118
|
+
|---------------|-------------|
|
|
119
|
+
| `remote_repo` | The remote repository to push to. Use a URL string (no groups) or a group dictionary (see [Using groups](#using-groups)). |
|
|
120
|
+
| `username` | Username for authentication. Defaults to the user part of the `remote_repo` URI, falling back to `git`. |
|
|
121
|
+
| `password` | Password for username/password authentication. |
|
|
122
|
+
| `privatekey` | Path to the private key file. Must be in legacy PEM format (see note below). |
|
|
123
|
+
| `publickey` | Path to the public key file (optional — inferred from `privatekey` + `.pub` if omitted). |
|
|
117
124
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
Notes:
|
|
126
|
+
- `remote_repo` must not match the name of any local `git` output repo configured under `output`. Use unique names for each.
|
|
127
|
+
- If using SSH key authentication with a passphrase-protected private key, provide the passphrase with the `OXIDIZED_SSH_PASSPHRASE` environment variable.
|
|
128
|
+
- The `privatekey` must be in the legacy PEM format (`BEGIN RSA PRIVATE KEY`), not the newer OpenSSH format (`BEGIN OPENSSH PRIVATE KEY`). See [#1877](https://github.com/ytti/oxidized/issues/1877) and [#2324](https://github.com/ytti/oxidized/issues/2324).
|
|
129
|
+
- To convert an existing key to PEM format, run:
|
|
130
|
+
```shell
|
|
131
|
+
ssh-keygen -p -m PEM -f $MY_KEY_HERE
|
|
132
|
+
```
|
|
122
133
|
|
|
123
|
-
|
|
134
|
+
### Authentication methods
|
|
124
135
|
|
|
125
|
-
|
|
136
|
+
Choose one of the following methods:
|
|
126
137
|
|
|
127
|
-
|
|
138
|
+
| Method | Required keys |
|
|
139
|
+
|-------------------------------|---------------|
|
|
140
|
+
| Username + password | `username` (optional), `password` |
|
|
141
|
+
| SSH key pair | `privatekey`, `publickey` (optional - assumed to be at `privatekey` + `.pub`) |
|
|
142
|
+
| SSH agent | no credentials needed |
|
|
128
143
|
|
|
129
|
-
|
|
130
|
-
* `username`: username for repository auth.
|
|
131
|
-
* `password`: password for repository auth.
|
|
132
|
-
* `publickey`: public key file path for repository auth. (optional)
|
|
133
|
-
* `privatekey`: private key file path for repository auth.
|
|
134
|
-
* NOTE: this key needs to be in the legacy PEM format, not the newer OpenSSL format [#1877](https://github.com/ytti/oxidized/issues/1877), [#2324](https://github.com/ytti/oxidized/issues/2324)
|
|
135
|
-
* To convert a key beginning with `BEGIN OPENSSH PRIVATE KEY` to the legacy PEM format, run this command:
|
|
136
|
-
`ssh-keygen -p -m PEM -f $MY_KEY_HERE`
|
|
144
|
+
### Configuration examples
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
**Username and password:**
|
|
139
147
|
|
|
140
|
-
|
|
148
|
+
```yaml
|
|
149
|
+
hooks:
|
|
150
|
+
push_to_remote:
|
|
151
|
+
type: githubrepo
|
|
152
|
+
events: [post_store]
|
|
153
|
+
remote_repo: git@git.intranet:oxidized/test.git
|
|
154
|
+
username: user
|
|
155
|
+
password: pass
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**SSH key pair:**
|
|
141
159
|
|
|
142
160
|
```yaml
|
|
143
161
|
hooks:
|
|
144
162
|
push_to_remote:
|
|
163
|
+
type: githubrepo
|
|
164
|
+
events: [post_store]
|
|
165
|
+
remote_repo: git@git.intranet:oxidized/test.git
|
|
166
|
+
publickey: /root/.ssh/id_rsa.pub
|
|
167
|
+
privatekey: /root/.ssh/id_rsa
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
**SSH agent:**
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
hooks:
|
|
175
|
+
push_to_remote:
|
|
176
|
+
type: githubrepo
|
|
177
|
+
events: [post_store]
|
|
178
|
+
remote_repo: git@git.intranet:oxidized/test.git
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Using groups
|
|
182
|
+
|
|
183
|
+
When using groups and `single_repo` is set to `true` (default) in the
|
|
184
|
+
configuration section output/git, `remote_repo` must be a dictionary mapping
|
|
185
|
+
group names to remote repositories. Groups not listed in the dictionary are
|
|
186
|
+
silently skipped.
|
|
187
|
+
|
|
188
|
+
Each entry can be either a plain URL string:
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
hooks:
|
|
192
|
+
push_to_remote:
|
|
193
|
+
type: githubrepo
|
|
194
|
+
events: [post_store]
|
|
145
195
|
remote_repo:
|
|
146
196
|
routers: git@git.intranet:oxidized/routers.git
|
|
147
197
|
switches: git@git.intranet:oxidized/switches.git
|
|
148
198
|
firewalls: git@git.intranet:oxidized/firewalls.git
|
|
149
199
|
```
|
|
150
200
|
|
|
151
|
-
...
|
|
201
|
+
...or a dictionary with `url` and `privatekey` to use a per-group SSH key:
|
|
152
202
|
|
|
153
203
|
```yaml
|
|
154
204
|
hooks:
|
|
155
205
|
push_to_remote:
|
|
206
|
+
type: githubrepo
|
|
207
|
+
events: [post_store]
|
|
156
208
|
remote_repo:
|
|
157
209
|
routers:
|
|
158
210
|
url: git@git.intranet:oxidized/routers.git
|
|
@@ -165,58 +217,31 @@ hooks:
|
|
|
165
217
|
privatekey: /root/.ssh/id_rsa_firewalls
|
|
166
218
|
```
|
|
167
219
|
|
|
168
|
-
Both forms can be mixed
|
|
220
|
+
Both forms can be mixed within the same configuration.
|
|
169
221
|
|
|
170
|
-
###
|
|
222
|
+
### Custom branch name
|
|
171
223
|
|
|
172
|
-
|
|
224
|
+
The `githubrepo` hook uses the branch name from the
|
|
225
|
+
[git output](Outputs.md#output-git) as the remote branch name. When the
|
|
226
|
+
repository is first created, Oxidized uses the default branch name from
|
|
227
|
+
`git config --global init.defaultBranch`. The default is `master`.
|
|
173
228
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
push_to_remote:
|
|
177
|
-
type: githubrepo
|
|
178
|
-
events: [post_store]
|
|
179
|
-
remote_repo: git@git.intranet:oxidized/test.git
|
|
180
|
-
username: user
|
|
181
|
-
password: pass
|
|
182
|
-
```
|
|
229
|
+
You can manually rename the branch after Oxidized has already created the
|
|
230
|
+
repository. Be aware that you may break things, so make backups.
|
|
183
231
|
|
|
184
|
-
|
|
232
|
+
To rename the branch after Oxidized has already created the repository:
|
|
185
233
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```
|
|
234
|
+
1. Stop oxidized.
|
|
235
|
+
2. Back up your oxidized git repository.
|
|
236
|
+
3. Change to your oxidized git repository directory.
|
|
237
|
+
4. Inspect the current branches: `git branch -avv`
|
|
238
|
+
5. Rename the local branch: `git branch -m <NewName>`
|
|
239
|
+
6. Remove the stale remote-tracking reference: `git branch -r -d origin/<OldName>`
|
|
240
|
+
7. Verify the result: `git branch -avv`
|
|
241
|
+
8. Restart oxidized.
|
|
195
242
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
[git output](Outputs.md#output-git) as a remote branch name. When creating the
|
|
199
|
-
git repository for the first time, Oxidized uses the default branch name
|
|
200
|
-
configured in git with `git config --global init.defaultBranch <Name>`. The
|
|
201
|
-
default is `master`.
|
|
202
|
-
|
|
203
|
-
If you need to rename the branch name after Oxidized has created it, you may do
|
|
204
|
-
it manually. Be aware that you may break things. Make backups and do not
|
|
205
|
-
complain if something goes wrong!
|
|
206
|
-
|
|
207
|
-
1. Stop oxidized (no one should access the git repository while doing the
|
|
208
|
-
following steps)
|
|
209
|
-
2. Make a backup of your oxidized data, especially the git repository
|
|
210
|
-
3. Change directory to your oxidized git repository (as configured in oxidized
|
|
211
|
-
configuration file)
|
|
212
|
-
4. Inspect the current branches with `git branch -avv`
|
|
213
|
-
5. Rename the default branch with `git branch -m <NewName>`
|
|
214
|
-
6. Remove the reference to the old remote branch with
|
|
215
|
-
`git branch -r -d origin/<OldName>`
|
|
216
|
-
6. Inspect the change with `git branch -avv`
|
|
217
|
-
7. Restart oxidized - you're done!
|
|
218
|
-
|
|
219
|
-
Note that you will also have to clean your remote git repository.
|
|
243
|
+
Oxidized will push to a new remote branch. When everything is fine, you can
|
|
244
|
+
remove the old branch from the remote repository.
|
|
220
245
|
|
|
221
246
|
## Hook type: awssns
|
|
222
247
|
|
data/docs/Inputs.md
CHANGED
|
@@ -96,6 +96,10 @@ Oxidized can `ssh` through a proxy as well. To do so we just need to set
|
|
|
96
96
|
`ssh_proxy` variable with the proxy host information and optionally set the
|
|
97
97
|
`ssh_proxy_port` with the SSH port if it is not listening on port 22.
|
|
98
98
|
|
|
99
|
+
`ssh_proxy` must be `[user@]host`, where `host` is a hostname (RFC 1123), an
|
|
100
|
+
IPv4 or an IPv6 address, and `ssh_proxy_port` must be an integer. Other values
|
|
101
|
+
are rejected and the node fails.
|
|
102
|
+
|
|
99
103
|
This can be provided on a per-node basis by mapping the proper fields from your
|
|
100
104
|
source.
|
|
101
105
|
|
|
@@ -137,9 +141,79 @@ vars_map:
|
|
|
137
141
|
# ...
|
|
138
142
|
```
|
|
139
143
|
|
|
144
|
+
### SSH Diffie-Hellman group size
|
|
145
|
+
net-ssh >= 8.0 requires Diffie-Hellman group exchange groups of at least 2048
|
|
146
|
+
bits. Some old devices only offer 1024-bit groups and fail to connect. Set the
|
|
147
|
+
variable `ssh_minimum_dh_bits` to accept smaller groups for these devices:
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
vars:
|
|
151
|
+
ssh_minimum_dh_bits: 1024
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Or only for one model:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
models:
|
|
158
|
+
ios:
|
|
159
|
+
vars:
|
|
160
|
+
ssh_minimum_dh_bits: 1024
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
### SSH public key algorithms
|
|
165
|
+
Since net-ssh 8.1, each RSA key is offered only once, with a single signature
|
|
166
|
+
algorithm, as OpenSSH does:
|
|
167
|
+
- If the device announces the algorithms it accepts (RFC 8308
|
|
168
|
+
`server-sig-algs`), Net::SSH uses the first one of `rsa-sha2-512`,
|
|
169
|
+
`rsa-sha2-256` and `ssh-rsa` that the device lists.
|
|
170
|
+
- Otherwise, the key is offered as `ssh-rsa`.
|
|
171
|
+
|
|
172
|
+
There is no fallback to another algorithm when the device rejects the
|
|
173
|
+
signature. Some devices announce `rsa-sha2-*` but only accept `ssh-rsa`, or
|
|
174
|
+
drop the connection on a `rsa-sha2-*` signature, e.g. Huawei SmartAX MA5683T
|
|
175
|
+
(#2875). Public key authentication with RSA keys then fails.
|
|
176
|
+
|
|
177
|
+
Set the variable `ssh_pubkey_algorithms` to choose the preferred algorithms,
|
|
178
|
+
in order, for these devices:
|
|
179
|
+
|
|
180
|
+
```yaml
|
|
181
|
+
models:
|
|
182
|
+
smartax:
|
|
183
|
+
vars:
|
|
184
|
+
ssh_pubkey_algorithms: ssh-rsa
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The listed algorithms are tried first, the other supported algorithms are
|
|
188
|
+
appended, so in practice this only changes the choice for RSA keys. The
|
|
189
|
+
OpenSSH prefixes `+`, `-` and `^` are supported, e.g. `-ssh-rsa` removes
|
|
190
|
+
`ssh-rsa`. Unsupported values are ignored.
|
|
191
|
+
|
|
140
192
|
### Custom SSH port
|
|
141
193
|
Set the variable `ssh_port` to the desired value (default is 22).
|
|
142
194
|
|
|
195
|
+
### OpenSSH configuration files
|
|
196
|
+
Net::SSH reads the OpenSSH configuration of the user running Oxidized:
|
|
197
|
+
`~/.ssh/config`, `/etc/ssh_config` and `/etc/ssh/ssh_config`, including their
|
|
198
|
+
`Include` files. `Host` blocks are matched against the IP address of the node.
|
|
199
|
+
|
|
200
|
+
Options set by Oxidized take precedence over the configuration files: the
|
|
201
|
+
`ssh_*` variables, `auth_methods`, the port, the timeout, keepalives and host
|
|
202
|
+
key verification.
|
|
203
|
+
|
|
204
|
+
Since net-ssh 8.0, the files are parsed more like OpenSSH:
|
|
205
|
+
- `KexAlgorithms` and `PubkeyAcceptedAlgorithms` are read, in addition to
|
|
206
|
+
`Ciphers`, `MACs` and `HostKeyAlgorithms`.
|
|
207
|
+
- Algorithm lists support the `+`, `-` and `^` prefixes. As Oxidized appends all
|
|
208
|
+
supported algorithms, a plain list only changes the preference order, but
|
|
209
|
+
`-` removes algorithms, which may break old devices.
|
|
210
|
+
- `Match` supports `all`, `Host`, `OriginalHost`, `User` (the username of the
|
|
211
|
+
node) and `LocalUser`. Blocks with other conditions (`exec`, `canonical`, ...)
|
|
212
|
+
are skipped and a warning is printed to stderr.
|
|
213
|
+
|
|
214
|
+
If a device fails to connect after a system or net-ssh upgrade, check these
|
|
215
|
+
files, including system-wide crypto policies (e.g. on RHEL or Fedora).
|
|
216
|
+
|
|
143
217
|
### SSH Host key verification
|
|
144
218
|
With the configuration `secure', you can set the ssh key verification:
|
|
145
219
|
- `true`: strict host verification, looking up the known host files
|
|
@@ -183,17 +257,19 @@ input:
|
|
|
183
257
|
The HTTP input supports the following HTTP methods:
|
|
184
258
|
- `:get` - for GET requests
|
|
185
259
|
- `:post` - for POST requests
|
|
260
|
+
- `:delete` - for DELETE requests
|
|
186
261
|
|
|
187
262
|
These methods are used internally by models that require HTTP-based
|
|
188
|
-
configuration retrieval. Models can use `get_http()
|
|
189
|
-
provided by the HTTP input.
|
|
263
|
+
configuration retrieval. Models can use `get_http()`, `post_http()` and
|
|
264
|
+
`delete_http()` methods provided by the HTTP input.
|
|
190
265
|
|
|
191
266
|
Example usage in a model:
|
|
192
267
|
|
|
193
268
|
```ruby
|
|
194
269
|
cfg :http do
|
|
195
|
-
post_response
|
|
196
|
-
get_response
|
|
270
|
+
post_response = post_http('/some/path', payload, 'Some-Extra-Header' => 'value')
|
|
271
|
+
get_response = get_http('/some/path')
|
|
272
|
+
delete_response = delete_http('/some/path')
|
|
197
273
|
end
|
|
198
274
|
```
|
|
199
275
|
|
|
@@ -208,25 +284,28 @@ input:
|
|
|
208
284
|
```
|
|
209
285
|
|
|
210
286
|
## Debugging
|
|
211
|
-
|
|
212
287
|
In case a model plugin doesn't work correctly (ios, procurve, etc.), you can
|
|
213
|
-
enable live debugging of SSH
|
|
214
|
-
|
|
215
|
-
depending on the parent directory of the logfile option.
|
|
288
|
+
enable live debugging of SSH and Telnet sessions with the `debug` option of
|
|
289
|
+
the `input` section.
|
|
216
290
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
291
|
+
Starting with version 0.37.0, `debug` can take different values:
|
|
292
|
+
- `text`: log input and output to a text file (ssh, telnet)
|
|
293
|
+
- `yaml`: produce a yaml simulation file (ssh)
|
|
294
|
+
- `library`: activate debug logging of the underlying library
|
|
295
|
+
- a combination of the options above (`text, yaml`)
|
|
296
|
+
- `true`; activate all debugging options (Only option for versions prior 0.37.0)
|
|
221
297
|
|
|
222
|
-
|
|
223
|
-
log: /home/oxidized/.config/oxidized/log
|
|
298
|
+
The log files will be created in `~/.config/oxidized/logs/` (or `$OXIDIZED_LOGS/logs/`).
|
|
224
299
|
|
|
225
|
-
|
|
300
|
+
The following example will log an active ssh/telnet session to
|
|
301
|
+
`~/.config/oxidized/logs/<IP-Address>-<PROTOCOL>-<timestamp>.txt` and for ssh
|
|
302
|
+
`~/.config/oxidized/logs/<IP-Address>-<PROTOCOL>-<timestamp>.yaml`. A new file
|
|
303
|
+
is created for each session.
|
|
226
304
|
|
|
305
|
+
```yaml
|
|
227
306
|
input:
|
|
228
307
|
default: ssh, telnet
|
|
229
|
-
debug:
|
|
308
|
+
debug: yaml, text
|
|
230
309
|
ssh:
|
|
231
310
|
secure: false
|
|
232
311
|
http:
|
data/docs/Issues.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Writing good issues
|
|
2
2
|
If you're experiencing a problem with Oxidized or need a new feature, you can
|
|
3
|
-
[submit an issue on
|
|
3
|
+
[submit an issue on GitHub](https://github.com/ytti/oxidized/issues). We have
|
|
4
4
|
a great community where users help each other through the issue system.
|
|
5
5
|
|
|
6
6
|
This guide provides tips on writing your issue to make it easier for the
|
|
@@ -18,8 +18,9 @@ could be invested in new code. Therefore, issues will be worked on with the
|
|
|
18
18
|
following rules:
|
|
19
19
|
|
|
20
20
|
- Use the predefined templates for bugs, feature requests and support requests.
|
|
21
|
-
- If
|
|
22
|
-
|
|
21
|
+
- If important information is missing (read this file, fill in the questions in
|
|
22
|
+
the templates), maintainers may ask you to provide the missing details or
|
|
23
|
+
close the issue.
|
|
23
24
|
- Inactive issues will be marked "stale" automatically after 90 days. Issues
|
|
24
25
|
are not closed automatically; this is a manual action by a maintainer.
|
|
25
26
|
- A feature request may be closed after some time of inactivity, as obviously
|
|
@@ -52,12 +53,12 @@ If you can, please also test against the latest git version, or at least read
|
|
|
52
53
|
## Format your issue
|
|
53
54
|
- Use [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) to format your issue.
|
|
54
55
|
- Preview your text before submitting to ensure it renders correctly.
|
|
55
|
-
- Avoid screenshots of text. Instead, use [code
|
|
56
|
+
- Avoid screenshots of text. Instead, use [code formatting](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code) for any relevant code snippets.
|
|
56
57
|
|
|
57
58
|
## Choose your title well
|
|
58
59
|
Keep the title brief yet descriptive. Aim to summarize the main issue or request in a few words.
|
|
59
60
|
|
|
60
|
-
## Provide
|
|
61
|
+
## Provide detailed information
|
|
61
62
|
Include as many relevant details as possible. At a minimum, specify:
|
|
62
63
|
|
|
63
64
|
- Oxidized version and operating system.
|
|
@@ -66,6 +67,21 @@ Include as many relevant details as possible. At a minimum, specify:
|
|
|
66
67
|
- Output of the error, if relevant.
|
|
67
68
|
- For issues related to specific devices, consider creating a YAML Simulation file (instructions below).
|
|
68
69
|
|
|
70
|
+
Please include the output of `oxidized --support` whenever possible. Run the
|
|
71
|
+
command in the same environment and as the same user as the regular Oxidized
|
|
72
|
+
process so that it finds the correct configuration, environment and gems. For
|
|
73
|
+
Docker installations, run it inside the running container as the `oxidized`
|
|
74
|
+
user, for example:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
docker exec --user oxidized <container-name> oxidized --support
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The command prints the Oxidized version, operating system, Ruby environment, a
|
|
81
|
+
sanitized copy of your configuration and the relevant installed gems. Sensitive
|
|
82
|
+
keys (passwords, tokens, ...) are redacted, but please review the output and
|
|
83
|
+
remove any remaining sensitive data before sharing it.
|
|
84
|
+
|
|
69
85
|
Also, provide clear steps to reproduce the issue, if applicable.
|
|
70
86
|
|
|
71
87
|
## Making feature requests
|
|
@@ -73,13 +89,33 @@ Feature requests are welcome, but please understand that unaddressed requests
|
|
|
73
89
|
may be closed after some time. If you need a feature urgently, consider
|
|
74
90
|
contributing code via a pull request (PR) or hiring a developer.
|
|
75
91
|
|
|
76
|
-
##
|
|
92
|
+
## Submit a YAML Simulation File
|
|
77
93
|
To help developers troubleshoot device-specific issues, you may be asked to submit a
|
|
78
|
-
[YAML simulation file](/docs/DeviceSimulation.md
|
|
94
|
+
[YAML simulation file](/docs/DeviceSimulation.md) for your device.
|
|
95
|
+
|
|
96
|
+
By submitting a YAML simulation file (or any other contribution), you agree that
|
|
97
|
+
it may be integrated into the project and distributed under its license
|
|
98
|
+
(Apache-2.0). Always remove sensitive information (passwords, IP addresses,
|
|
99
|
+
serial numbers) before sharing.
|
|
100
|
+
|
|
101
|
+
The easiest way to produce a simulation file is to enable the `yaml` debug
|
|
102
|
+
option in your Oxidized configuration. This is the preferred method when the
|
|
103
|
+
issue can be reproduced with the current Oxidized model unchanged, because it
|
|
104
|
+
captures the real Oxidized backup session:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
input:
|
|
108
|
+
debug: yaml
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
After the next backup, the file is written to `~/.config/oxidized/logs/`. See
|
|
112
|
+
[Creating a YAML Simulation File with the debug option](/docs/DeviceSimulation.md#creating-a-yaml-simulation-file-with-the-debug-option)
|
|
113
|
+
for details.
|
|
79
114
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
115
|
+
Alternatively, you can generate the file with the `extra/device2yaml.rb` script
|
|
116
|
+
when you need to capture a specific command list manually. Here's a brief
|
|
117
|
+
overview how to do it, you can find more details in the link above.
|
|
118
|
+
- Fork Oxidized on GitHub
|
|
83
119
|
- Install dependencies (git and Ruby's Net::SSH):
|
|
84
120
|
```
|
|
85
121
|
# Adapt when not using a debian-based distro
|
|
@@ -99,7 +135,7 @@ show version
|
|
|
99
135
|
show vtp status
|
|
100
136
|
show inventory
|
|
101
137
|
show running-config
|
|
102
|
-
exit" -o spec/model/data/ios
|
|
138
|
+
exit" -o spec/model/data/ios#C8200L_16.12.1#simulation.yaml
|
|
103
139
|
```
|
|
104
140
|
|
|
105
141
|
- The script waits 5 seconds between commands, and outputs the response of the
|
|
@@ -107,9 +143,9 @@ exit" -o spec/model/data/ios:C8200L_16.12.1:simulation.yaml
|
|
|
107
143
|
command without waiting for the timeout.
|
|
108
144
|
- The result will be stored in `spec/model/data/`.
|
|
109
145
|
- Replace any sensitive information with placeholder values in the output file.
|
|
110
|
-
- Commit & push the file to
|
|
146
|
+
- Commit & push the file to GitHub
|
|
111
147
|
```
|
|
112
|
-
git add spec/model/data/ios
|
|
148
|
+
git add spec/model/data/ios#C8200L_16.12.1#simulation.yaml
|
|
113
149
|
git commit -m "Device simulation for C8200L"
|
|
114
150
|
git push
|
|
115
151
|
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Cisco FTD via HTTP
|
|
2
|
+
|
|
3
|
+
Back up Cisco FTD firewalls via the [HTTP API](https://www.cisco.com/c/en/us/td/docs/security/firepower/ftd-api/guide/ftd-rest-api/ftd-rest-api-intro.html). This model uses the [configexport](https://www.cisco.com/c/en/us/td/docs/security/firepower/ftd-api/guide/ftd-rest-api/ftd-api-import-export.html#id_108006) method to export the configuration as a zip file, then extracts the JSON configuration from this file.
|
|
4
|
+
|
|
5
|
+
Make sure the `rubyzip` gem is installed with your oxidized host (it is included in the Docker image).
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
Ensure that the HTTP input is enabled in the Oxidized configuration, e.g.:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
input:
|
|
13
|
+
default: ssh, http
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Oxidized will need to use the FTD's admin login. Set the username at the model level:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
models:
|
|
20
|
+
ftd:
|
|
21
|
+
username: admin
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
When integrating with LibreNMS, you may need to override the IP address used by Oxidized (e.g. if SNMP and the HTTP API are listening on different interfaces on your FTD). This can be done with a mapping rule, e.g.:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
lnms config:set oxidized.maps.ip.hostname.+ '{"match": "HOSTNAME", "value": "IP"}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
(Where `HOSTNAME` is the hostname/IP address used when adding the device to LibreNMS, and `IP` is the IP address for the HTTP API.)
|
|
31
|
+
|
|
32
|
+
The port for the HTTP API can be overridden with a variable. For example, create a mapping rule to assign the device to a group, e.g.:
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
lnms config:set oxidized.maps.group.hostname.+ '{"match": "HOSTNAME", "value": "GROUP"}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
(Where `HOSTNAME` is the hostname/IP address used when adding the device to LibreNMS, and `GROUP` is an appropriate group name.)
|
|
39
|
+
|
|
40
|
+
Then set the port variable at the group level. You can also override the password here if necessary, e.g.:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
groups:
|
|
44
|
+
GROUP:
|
|
45
|
+
vars:
|
|
46
|
+
ftd_api_port: 8443
|
|
47
|
+
password: secret
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Variables
|
|
51
|
+
|
|
52
|
+
The following variables can be used to control the behaviour of the model:
|
|
53
|
+
|
|
54
|
+
- ftd\_api\_endpoint: URL path to the FTD API (default: /api/fdm/latest)
|
|
55
|
+
- ftd\_api\_port: HTTPS port for the FTD API (default: 443)
|
|
56
|
+
- ftd\_config\_filename: Filename to use for the configexport method call (default: oxidized.zip)
|
|
57
|
+
- ftd\_polls: Number of times to poll the status of the configexport job (default: 10, minimum: 1)
|
|
58
|
+
- ftd\_poll\_wait: Seconds to wait between polls (default: 10, minimum: 1)
|
|
59
|
+
|
|
60
|
+
## Limitations
|
|
61
|
+
|
|
62
|
+
If your FTDs are in an HA pair, then backups will only succeed on the active device.
|
|
63
|
+
|
|
64
|
+
Back to [Model-Notes](README.md)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Grandstream HT8xx
|
|
2
|
+
|
|
3
|
+
You need to have enabled access to device by SSH.
|
|
4
|
+
Connection using user/password for retrieve the configuration containing XML file with all params stored in device memory.
|
|
5
|
+
|
|
6
|
+
Tested on hardware: v1 and software version: 1.0.61.2.
|
|
7
|
+
|
|
8
|
+
Back to [Model-Notes](README.md)
|
|
@@ -30,3 +30,8 @@ Older Devices like [ProCurve](/lib/oxidized/model/procurve.rb) or 3Com/Comware
|
|
|
30
30
|
are listed under the Vendor "HP" in the
|
|
31
31
|
[Supported OS Types](/docs/Supported-OS-Types.md) list.
|
|
32
32
|
|
|
33
|
+
HPE Aruba switches running ArubaOS-Switch (the line that succeeded ProCurve -
|
|
34
|
+
e.g. the 2530, 2540, 2920, 2930F/2930M, 3810 and 5400R series) also use the
|
|
35
|
+
[procurve](/lib/oxidized/model/procurve.rb) model, even though they are branded
|
|
36
|
+
"Aruba".
|
|
37
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Lantronix IT Management Gateway OS (ITMGOS)
|
|
2
|
+
|
|
3
|
+
The `itmgos` model backs up Lantronix console servers and gateways that run the IT
|
|
4
|
+
Management Gateway OS CLI: SLC 8000, SLC 9000, EMG 8500/7500 and SLB.
|
|
5
|
+
|
|
6
|
+
The configuration is the device's own export, `admin config commands copypaste`: a list
|
|
7
|
+
of CLI commands that the device restores with `admin config batch`. The model answers the
|
|
8
|
+
export's confirmation prompt, and adds `admin version` (hardware, firmware, installed
|
|
9
|
+
modules) as comments, without the uptime and last-boot lines.
|
|
10
|
+
|
|
11
|
+
## Authentication
|
|
12
|
+
|
|
13
|
+
SLC 9000 units accept SSH logins only through keyboard-interactive authentication, which Oxidized
|
|
14
|
+
doesn't try by default. Enable it for the model:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
models:
|
|
18
|
+
itmgos:
|
|
19
|
+
vars:
|
|
20
|
+
auth_methods: [ "none", "publickey", "password", "keyboard-interactive" ]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Secrets
|
|
24
|
+
|
|
25
|
+
The export prints passwords, community strings and other secrets in cleartext. Set
|
|
26
|
+
`remove_secret: true` (as a var, for the model or globally) so the model replaces them before
|
|
27
|
+
the configuration is stored:
|
|
28
|
+
|
|
29
|
+
- secrets the export writes on the two lines after their command, such as
|
|
30
|
+
`set tacacs+ secret`, `set snmp v3password`, `set ldap bindpassword`, `admin ftp password`,
|
|
31
|
+
`set site chapsecret <site>` and the per-port and USB modem CHAP and dial-out passwords
|
|
32
|
+
- SNMP read, write and trap communities, including the community of trap event actions
|
|
33
|
+
- local user password hashes
|
|
34
|
+
|
|
35
|
+
## Session
|
|
36
|
+
|
|
37
|
+
On login the model runs `set cli terminallines disable` to turn off paging. This is a CLI
|
|
38
|
+
setting of the user Oxidized logs in as.
|
|
39
|
+
|
|
40
|
+
Tested on an SLC 9016 (SLC9016-16U-16E) with firmware 9.7.0.0R21.
|
|
@@ -6,9 +6,28 @@ Logs in using username and password and fetches an API key.
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Create a user with a `Superuser (read-only)` admin role in Panorama or PanOS
|
|
9
|
+
- Create a user with a `Superuser (read-only)` admin role in Panorama or PanOS.
|
|
10
|
+
A custom admin role needs the XML API permission `Operational Requests`
|
|
11
|
+
(or `Export` when using `panos_api_candidate`).
|
|
10
12
|
- Make sure the `nokogiri` gem is installed with your oxidized host
|
|
11
13
|
|
|
14
|
+
## Running vs. candidate configuration
|
|
15
|
+
|
|
16
|
+
The model backs up the running configuration (`show config running`), so
|
|
17
|
+
uncommitted changes are not included.
|
|
18
|
+
|
|
19
|
+
Previous versions of the model backed up the candidate configuration,
|
|
20
|
+
including uncommitted changes (see
|
|
21
|
+
[#2759](https://github.com/ytti/oxidized/issues/2759)). To keep this behaviour,
|
|
22
|
+
set the variable `panos_api_candidate` to `true`:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
models:
|
|
26
|
+
panos_api:
|
|
27
|
+
vars:
|
|
28
|
+
panos_api_candidate: true
|
|
29
|
+
```
|
|
30
|
+
|
|
12
31
|
## Configuration
|
|
13
32
|
|
|
14
33
|
Make sure the following is configured in the oxidized config:
|
|
@@ -12,4 +12,17 @@ and attach the public key.
|
|
|
12
12
|
|
|
13
13
|
Oxidized can now retrieve your configuration!
|
|
14
14
|
|
|
15
|
+
## Save significant changes only
|
|
16
|
+
|
|
17
|
+
You can [store the configuration only on significant changes](/docs/Configuration.md#store-configuration-only-on-significant-changes)
|
|
18
|
+
by setting the [variable](/docs/Configuration.md#options-credentials-vars-etc-precedence)
|
|
19
|
+
`output_store_mode` to `on_significant`. On RouterOS, this prevents Oxidized from saving a
|
|
20
|
+
new configuration version when only the system history has changed without any actual
|
|
21
|
+
configuration change.
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
vars:
|
|
25
|
+
output_store_mode: on_significant
|
|
26
|
+
```
|
|
27
|
+
|
|
15
28
|
Back to [Model-Notes](README.md)
|