{%- capture issue_title %}docs: {{ page.title }}{% endcapture -%}
{%- capture issue_body %}Page: {{ page.url | absolute_url }}
diff --git a/site/about-these-docs.md b/site/about-these-docs.md
index a7f35edb..7fa12bd8 100644
--- a/site/about-these-docs.md
+++ b/site/about-these-docs.md
@@ -8,7 +8,7 @@ doctype: explanation
# About These Docs
-*What this documentation covers, how it relates to the repository docs, and the conventions it follows · Checked against tacctl 0.2.27*
+*What this documentation covers, how it relates to the repository docs, and the conventions it follows · Checked against tacctl 0.2.28*
[Printable PDF](../pdf/tacctl-about-these-docs.pdf){: .pdf-link }
diff --git a/site/access-lifecycle.md b/site/access-lifecycle.md
index 53b675e2..2851955a 100644
--- a/site/access-lifecycle.md
+++ b/site/access-lifecycle.md
@@ -9,7 +9,7 @@ doctype: how-to
# Access Lifecycle
-*Joiners, movers and leavers · Checked against tacctl 0.2.27*
+*Joiners, movers and leavers · Checked against tacctl 0.2.28*
[Printable PDF](../pdf/tacctl-access-lifecycle.pdf){: .pdf-link }
diff --git a/site/audit-and-compliance.md b/site/audit-and-compliance.md
index c545a31e..eb8e3802 100644
--- a/site/audit-and-compliance.md
+++ b/site/audit-and-compliance.md
@@ -9,7 +9,7 @@ doctype: how-to
# Audit and Compliance
-*Audit trail, evidence and periodic reviews · Checked against tacctl 0.2.27*
+*Audit trail, evidence and periodic reviews · Checked against tacctl 0.2.28*
[Printable PDF](../pdf/tacctl-audit-and-compliance.pdf){: .pdf-link }
@@ -30,7 +30,7 @@ tacctl writes every audit line to **syslog**, facility `auth`:
| Tag | Source |
|---|---|
| `tacctl` | Every tacctl command that changes state, and every refusal |
-| `tacctl-console` | Login console sessions (start, end, refused commands) |
+| `tacctl-console` | Login console sessions (start, end, refused commands, and each file transfer: `console sftp ...`) |
tacctl keeps no log of its own. On a journald system:
@@ -138,6 +138,9 @@ $J | grep -E 'server (addresses|listen|metrics|name)' # changes of this server
$J | grep 'group edit' # privilege or tier changes to groups
$J | grep 'backup restore' # rollbacks
$J | grep 'console start' # console logins (user=, from=)
+$J | grep 'console sftp' # file transfers through the console
+$J | grep 'console sftp DENY' # transfer requests the console refused (reason=)
+$J | grep 'console set' | grep file-transfer # who may transfer files, quota and rate changes
```
The changes of this server's settings each write a detail line beside the
@@ -176,6 +179,49 @@ can be `pdf`. `config reports` writes
key=max-size|max-count op=set|clear` and `value=` for a set
([Superuser Daily Operations](superuser-daily-operations.md) §4.11).
+**File transfer through the console.** A transfer (the sftp subsystem, new in
+0.2.28) has lines of its own under the tag `tacctl-console`, with the session
+id and the user. The session opens with `console start ... mode=sftp` and
+`console sftp start ... tier= from= home="" quota=|unlimited
+rate=|off`. Each upload, download and change is one line
+(`console sftp upload|download|delete|rename|mkdir|setstat ... tier=
+path=""`, with `to=""` for a rename, `bytes=` for an upload and a
+download and `error=""` for a request that failed), and each request
+the console refused is `console sftp DENY ... tier= path="" reason=` at
+`auth.warning`. The session ends with `console sftp end ... up=
+down= ops= refused=` and `console end ... reason=sftp`.
+
+```
+console sftp upload sid=k3x9a0bq user=bob tier=operator path="/notes.txt" bytes=431
+console sftp DENY sid=k3x9a0bq user=bob tier=operator path="/big.iso" reason=quota
+```
+
+- The reasons of a refusal are `.ssh` (the folder is out of reach),
+ `outside-the-home`, `symlink`, `link` (a file with more than one name was
+ asked to be opened, written or have its mode or times set), `quota`,
+ `unsupported`, `bad-path` and `too-many-open-files` (the 257th handle of a
+ session).
+- A refusal of any kind is logged, a refused `readlink` and `realpath`
+ included. A successful `stat`, listing, `readlink` or `realpath` is not.
+- A path is logged as a double-quoted string in which a control character, a
+ quote, a backslash and a byte that is not UTF-8 are escapes, cut at 200
+ bytes: no file name can end a line or forge a field.
+- A transfer the console would not start is `console DENY ...
+ reason=file-transfer|password-change|policy|home|stream subsystem=sftp`.
+ `reason=file-transfer` is an account that does not have file transfer:
+ that user sees only `Connection closed` from the client, so this line is
+ where to look.
+- A superuser's change of who may transfer, or of a quota or rate, is a
+ `console set` line with `key=file-transfer` at `auth.notice`; its `item` is
+ the tier, `user:`, `quota:`, `quota-user:`,
+ `rate:` or `rate-user:`.
+- If `logger` cannot write a line during a transfer, the transfer goes on
+ unaudited and the warning `The audit line was not written` appears on the
+ client's standard error.
+
+A command string the console does not run (`scp -O`, a program, a shell) is
+`console DENY ... reason=command first=`, as before.
+
> A `cmd start` with no matching `cmd end` means the command did not finish
> (killed, crash, power loss). The snapshot named on its lines holds the
> state from before it. `tacctl config validate` shows the state now.
diff --git a/site/backups-and-undo.md b/site/backups-and-undo.md
index a7a8c250..875aec49 100644
--- a/site/backups-and-undo.md
+++ b/site/backups-and-undo.md
@@ -9,7 +9,7 @@ doctype: how-to
# Backups and Undo
-*Snapshots, comparing them, and restoring tacctl's configuration · Checked against tacctl 0.2.27*
+*Snapshots, comparing them, and restoring tacctl's configuration · Checked against tacctl 0.2.28*
[Printable PDF](../pdf/tacctl-backups-and-undo.pdf){: .pdf-link }
@@ -217,56 +217,89 @@ before it again, a superuser converts the state with `tacctl rollback`
first, then installs that release:
```bash
-tacctl rollback 0.2.26 # the dry run: its steps and warnings; writes nothing
-tacctl rollback 0.2.26 --apply # convert the state (add --yes when it warns)
-tacctl upgrade --branch 0.2.26 # install 0.2.26
+tacctl rollback 0.2.27 # the dry run: its steps and warnings; writes nothing
+tacctl rollback 0.2.27 --apply # convert the state (add --yes when it warns)
+tacctl upgrade --branch 0.2.27 # install 0.2.27
```
-`tacctl rollback` also takes `0.2.25`, `0.2.24`, `0.2.23`, `0.2.22`, `0.2.21`, `0.2.20`,
+`tacctl rollback` takes fourteen targets: `0.2.27`, the release before this
+one, and also `0.2.26`, `0.2.25`, `0.2.24`, `0.2.23`, `0.2.22`, `0.2.21`, `0.2.20`,
`0.2.19`, `0.2.18`, `0.2.17`, `0.2.16`, `0.2.9` and `0.2.3`. It refuses, the
dry run too and with nothing changed:
- while a Junos apply is not settled (`PENDING` or unknown);
- when the store cannot be read: a limit that cannot be seen is not hidden;
-- for every target but `0.2.26`, `0.2.25`, `0.2.24`, `0.2.23`, `0.2.22`,
- `0.2.21`, `0.2.20` and `0.2.19`, while an emergency lockdown locks a group;
-- for every target but `0.2.26`, `0.2.25`, `0.2.24` and `0.2.23`, while an emergency
+- for every target but `0.2.27`, `0.2.26`, `0.2.25`, `0.2.24`, `0.2.23`,
+ `0.2.22`, `0.2.21`, `0.2.20` and `0.2.19`, while an emergency lockdown locks a group;
+- for every target but `0.2.27`, `0.2.26`, `0.2.25`, `0.2.24` and `0.2.23`, while an emergency
lockdown has enrolled hosts, or a lifted one still waits for a host: an
older release cannot lift sshd's lockdown drop-in on a host. The refusal
names the hosts: lift the lockdown, then `tacctl host sync `.
-The target `0.2.26` converts **nothing**. This release changed no stored file
-0.2.26 reads strictly, so the rollback removes no key and no field, takes no
-snapshot, needs no `--yes` and leaves every file alone. The limits of the
-stored reports, the chassis members of the pull records, every report in the
-users' homes, the per-tier sudoers drop-in, the break-glass firewall and the
-other settings 0.2.26 knows all stay. It still refuses while a device's apply
-is not settled, and it ends with `tacctl upgrade --branch 0.2.26`. What this
-release changed outside the stored files is 0.2.26's to undo or keep: after
-the rollback a row of `show switch` with a blank version column is not read
-again, and the reports of a user below the operator tier hold the model,
-serial number and release again, as in 0.2.26.
+**The console's file transfer settings (0.2.28).** `console.yaml` holds
+`settings.file_transfer` once anything in it is set (`console file-transfer`:
+who has file transfer, and the quotas and rates). No release before 0.2.28
+reads that key, 0.2.27 included (its reader answers `settings: unknown key
+'file_transfer'`, the console falls back to its defaults and the commands
+that write the file fail), so **every target removes it**. With the settings
+set, `--apply` takes a snapshot first, removes the key, keeps every other
+setting and needs no `--yes`; the dry run lists the removal as a step of its
+own with what it held. It ends with a note: until the older release is
+installed, run no `tacctl console file-transfer` that sets something (it
+writes the key again; run the rollback again if one was run), and the
+snapshot holds the 0.2.28 state, which only 0.2.28 restores. The settings are
+kept nowhere else: **set them again after the upgrade.**
+
+The target `0.2.27` converts nothing else. 0.2.27 reads every file this
+release writes but that one setting, so with the file transfer settings unset
+the rollback removes no key and no field, takes no snapshot, needs no `--yes`
+and leaves every file alone. The limits of the stored reports, the chassis
+members of the pull records, every report in the users' homes (the PDF ones
+included), the marker `/var/lib/tacctl/pdf-tools-offered` with its packages,
+the per-tier sudoers drop-in, the break-glass firewall and the other
+settings 0.2.27 knows all stay. It still refuses while a device's apply is
+not settled, and it ends with `tacctl upgrade --branch 0.2.27`. What this
+release changed outside the stored files is 0.2.27's to undo or keep: after
+the rollback the support bundle of a Cisco IOS device starts its identity
+lines with the tail of a long command's echo again; bundles made in between
+stay as they were made.
+
+The target `0.2.26` converts **nothing but the file transfer settings**
+above. 0.2.27 and this release changed no other stored file 0.2.26 reads
+strictly, so with those settings unset the rollback removes no key and no
+field, takes no snapshot, needs no `--yes` and leaves every file alone. The
+limits of the stored reports, the chassis members of the pull records, every
+report in the users' homes, the per-tier sudoers drop-in, the break-glass
+firewall and the other settings 0.2.26 knows all stay. It still refuses while
+a device's apply is not settled, and it ends with `tacctl upgrade --branch
+0.2.26`. What 0.2.27 and this release changed outside the stored files is
+0.2.26's to undo or keep: after the rollback a row of `show switch` with a
+blank version column is not read again, and the reports of a user below the
+operator tier hold the model, serial number and release again, as in 0.2.26.
**PDF reports.** No target converts or removes them. A PDF report is a file
of the user's home like the others, and the packages `weasyprint` and
`fonts-dejavu-core` stay installed, as does the marker
-`/var/lib/tacctl/pdf-tools-offered`, which no release reads but this one.
+`/var/lib/tacctl/pdf-tools-offered`, which no release reads but 0.2.27 and
+the ones after it. 0.2.27 has the format and reads the reports as they are.
0.2.26 has no PDF format: it lists such a report, its `show --content` cleans
the bytes as text, and `device reports rename` of a PDF gives the file the new
name without its `.pdf`. So fetch the PDF first (with the `scp` line of
-`device reports show`), and remove or rename it before the rollback.
+`device reports show`, where file transfer is enabled for you), and remove or
+rename it before a rollback to 0.2.26 or older.
The target `0.2.25` removes the **limits of the stored reports** and converts
-nothing else. 0.2.25 reads every file 0.2.26 and this release write but those limits, so
-the rollback removes `reports.max_size` and `reports.max_count` from
+nothing else but the file transfer settings above. 0.2.25 reads every file
+0.2.26, 0.2.27 and this release write but those limits, so the rollback removes `reports.max_size` and `reports.max_count` from
`tacctl.yaml` and the users' own `reports_max_size` and `reports_max_count`
from `store.yaml` (0.2.25 refuses both: its `config validate` reports the
keys, its `backup restore` refuses a snapshot that has them, and every store
command fails on the fields).
-- With none of them set, it converts nothing, takes no snapshot and needs no
- `--yes`. With a setting or a limit it takes a snapshot first, and says that
- the snapshot holds the 0.2.27 state and is to be restored with 0.2.27 only,
+- With none of them set (and no file transfer settings), it converts nothing,
+ takes no snapshot and needs no `--yes`. With a setting or a limit it takes
+ a snapshot first, and says that the snapshot holds the 0.2.28 state and is
+ to be restored with 0.2.28 only,
and says what 0.2.25's restore refuses: a `tacctl.yaml` with a key it does
not know (a setting was removed), a `store.yaml` with a field it does not
know (only a user's own limit was), or both.
@@ -279,7 +312,7 @@ command fails on the fields).
or `max-count `); `backup recover` does not bring them back.
- It puts back the per-tier sudoers drop-in 0.2.25 wrote (this release's
without the rows of `device reports`) when the file is exactly the text
- 0.2.26 and this release write: the dry run shows the step, `--apply` writes it after
+ 0.2.26, 0.2.27 and this release write: the dry run shows the step, `--apply` writes it after
`visudo -cf`, and a file `tacctl` did not write is left.
- **What stays.** The chassis `members` of the pull records (0.2.25 ignores
the key) and every report in the users' homes. The reports are the users'
@@ -303,11 +336,11 @@ master prints its own label is rolled back again, as in 0.2.24.
The target `0.2.23` removes the limits as above, and the one key 0.2.24 added
to the stored files, the setting of the break-glass firewall: after a snapshot,
when the setting is set, together with the nftables table, its rules file and
-its boot unit (every target but `0.2.26`, `0.2.25` and `0.2.24` does; the nftables
+its boot unit (every target but `0.2.27`, `0.2.26`, `0.2.25` and `0.2.24` does; the nftables
package stays). With the key unset, no firewall file and no limit it takes no
snapshot and needs no `--yes`. It also puts back 0.2.23's sudoers drop-in,
without the operator's `log failures *`, when the file is exactly the text
-0.2.24 and 0.2.25 wrote, or the one 0.2.26 and this release write.
+0.2.24 and 0.2.25 wrote, or the one 0.2.26, 0.2.27 and this release write.
> **A hold that stands stays, without the firewall.** The older release's
> server completes the TCP handshake of the held address again, so a device
@@ -347,8 +380,8 @@ you add `--yes`:
| The dry run warns of | What happens after the rollback | What to do first |
|---|---|---|
-| Users who log in to the server and lack its scope (every target but `0.2.26`, `0.2.25`, `0.2.24`, `0.2.23`, `0.2.22` and `0.2.21`) | The plan adds the scope of the server's own login (`tacctl`) to the scopes of each, and names them, because an older release answers that login only for users who have it. A warning, so `--apply` needs `--yes`. | Nothing: it is part of the rollback |
-| Users with an email address, or SNMPv3 users beyond one per level (every target but `0.2.26`, `0.2.25`, `0.2.24` and `0.2.23`) | They are removed, and the rollback keeps the snapshot that holds them | After the upgrade, `tacctl backup recover ` (§4.3) |
+| Users who log in to the server and lack its scope (every target but `0.2.27`, `0.2.26`, `0.2.25`, `0.2.24`, `0.2.23`, `0.2.22` and `0.2.21`) | The plan adds the scope of the server's own login (`tacctl`) to the scopes of each, and names them, because an older release answers that login only for users who have it. A warning, so `--apply` needs `--yes`. | Nothing: it is part of the rollback |
+| Users with an email address, or SNMPv3 users beyond one per level (every target but `0.2.27`, `0.2.26`, `0.2.25`, `0.2.24` and `0.2.23`) | They are removed, and the rollback keeps the snapshot that holds them | After the upgrade, `tacctl backup recover ` (§4.3) |
| Users with a limit of their own for the stored reports (every target before `0.2.26`) | The limits are removed (`--apply` needs `--yes`), and the snapshot holds them. The dry run names each user with the values; the audit line names the users, never a value | After the upgrade, set them again with `tacctl user reports-limit` (`backup recover` does not bring them back) |
| Users who must change their password | The requirement is removed. Once the older release renders, those users (superusers aside) can log in to the devices with the password they were to change. | Have them change it, or keep this release |
| Scopes with a strict Junos management filter | The mode is removed. The older release plans the `ssh-only` filter, which accepts by default again. | Keep this release, or leave those scopes' filters out of the older release's plans |
@@ -357,7 +390,8 @@ you add `--yes`:
Without a warning, the rollback also removes the console's colour setting
and the per-user system-shell and password-cache choices, and writes a
-`list-max` that never asks as 1000.
+`list-max` that never asks as 1000. Every target removes the file transfer
+settings (see above), with a snapshot first and no `--yes`.
> **Until the older release is installed,** do not run
> `config breakglass-firewall`, `config reports max-size`,
@@ -367,7 +401,8 @@ and the per-user system-shell and password-cache choices, and writes a
> `device address` of a held device, `backup restore`, `server listen`,
> `scope mgmt-acl mode strict`, `user add`, `user passwd `,
> `user require-password-change`, `console color`, `console list-max`,
-> `console system-shell user`, `console password-cache on`,
+> `console system-shell user`, `console file-transfer` (any form that sets
+> something), `console password-cache on`,
> `server name