Commit graph

58 commits

Author SHA1 Message Date
Romain Lebbadi-Breteau
2d43a7c915 Add extract argument to tar 2021-06-14 11:23:44 +02:00
Stéphane Lesimple
3925e67d43 feat: add groupDestroy command for owners
This command deletes a group, as `groupDelete` does, but works
for owners so that they can delete their own group.
`groupDelete` remains as a restricted command, able to delete any group.

Closes #40.
2021-06-02 15:32:40 +02:00
Stéphane Lesimple
8cc990ad57 feat: add filtering options to several cmds,nicify print_acls()
The commands selfListAccesses, accountListAccesses,
groupList, groupListServers, groupListGuestAccesses and
accountList now have options to filter their output through
pattern matching, with --include and --exclude.

The output from the commands using print_acls() is also more
human-friendly, with auto-adjusting column length, and empty
columns omitted.

Closes #60.
2021-05-25 09:42:28 +02:00
Stéphane Lesimple
37301e35cc chore: update documentation 2021-05-24 16:44:35 +02:00
Stéphane Lesimple
68e088a607 doc: accountModify: more details on the --egress-strict-host-key-checking option 2021-05-19 18:55:54 +02:00
Jonathan Marsaud
b7b2533604 accountModify - Add a new accept-new POLICY in egress-strict-host-key-checking parameter 2021-05-19 16:34:35 +02:00
Stéphane Lesimple
e412083272 fix: accountCreate: incorrect help message (#167) 2021-04-08 12:04:19 +02:00
Stéphane Lesimple
2a905aca96 release v3.03.01 2021-03-25 11:55:04 +01:00
Stéphane Lesimple
5920b09aed chore: mkdir -p doesn't fail if dir already exists 2021-03-24 10:47:11 +01:00
Stéphane Lesimple
b6c7503a73 release v3.03.00 2021-02-22 17:09:12 +01:00
Stéphane Lesimple
4fd010c355 chore: microfixes after review 2021-02-22 13:32:19 +01:00
Stéphane Lesimple
ce692ed517 chore: update generated doc 2021-02-22 11:56:19 +01:00
Stéphane Lesimple
5eb5135d26 doc: update 2021-02-17 10:03:40 +01:00
Stéphane Lesimple
fbe7461fcb chore: fix typo in documentation 2021-02-17 10:03:40 +01:00
Stéphane Lesimple
d430c602bf release v3.02.00 2021-02-02 15:02:51 +01:00
Stéphane Lesimple
3dfa77ebab doc: update groupList/accountList documentation 2021-01-21 15:56:59 +01:00
Stéphane Lesimple
3aa6e343fd doc: add pointers to the-bastion-ansible-wrapper & debian-cis 2021-01-21 15:06:43 +01:00
Stéphane Lesimple
928bf0c7b0 enh: config: detect warnBefore/idleTimeout misconfiguration
Before, an inconsistency in the configuration settings of the warnBefore(Lock|Kill)Seconds
and idle(Lock|Kill)Timeout could break any new connection (ttyrec refuses to launch).

Now we detect this case properly, and fallback to a sane setting for
warnBefore(Lock|Kill)Seconds (zero) if those were set without enabling the corresponding
idle(Lock|Kill)Timeout setting. We also log an error to syslog when it happens,
so that the sysadmin can fix their configuration.

Added hints about how these configuration options work together in the bastion.conf.dist file.

Fixes #125
2021-01-19 12:26:09 +01:00
Stéphane Lesimple
ecc19db276 doc: upgrade: add a note about config normalization 2021-01-13 09:38:02 +01:00
Stéphane Lesimple
27d09e8cbe bump to v3.01.99-rc1 2021-01-12 12:05:41 +01:00
Stéphane Lesimple
1676979913 feat: add PIV keys support and policy enforcement
A new global option 'ingressRequirePIV' was added, to enable or disable a
bastion-wide policy forcing everybody to use only PIV keys.
2021-01-12 12:05:06 +01:00
Stéphane Lesimple
b00f90aa48 doc: introduce ingressRequirePIV option & install-yubico-piv-checker.sh 2021-01-12 12:05:06 +01:00
Stéphane Lesimple
7aa655bcd2 doc: add documentation for PIV 2021-01-11 17:58:59 +01:00
Stéphane Lesimple
79e8a42b90
Merge pull request #108 from ovh/docs
docs: add documentation about logs
2021-01-05 18:50:54 +01:00
Stéphane Lesimple
6dcbc2c93b
docs: add documentation about logs 2020-12-30 10:58:04 +00:00
Stéphane Lesimple
a479810d83
feat: revamp logs
All connections and plugin executions emit two logs, an 'open' and
a 'close' log. We now add all the details of the connection to
the 'close' logs, those that were previously only available in the
corresponding 'open' log. This way, it is no longer required to
correlate both logs with their uniqid to have all the data:
the 'close' log should suffice. The 'open' log is still there if
for some reason the 'close' log can't be emitted (kill -9, system
crash, etc.), or if the 'open' and the 'close' log are several
hours, days or months appart.

An additional field "duration" has been added to the 'close' logs,
this represents the number of seconds (with millisecond precision)
the connection lasted.

Two new fields "globalsql" and "accountsql" have been added to the
'open'-type logs. These will contain either "ok" if we successfully
logged to the corresponding log database, "no" if it is disabled,
or "error $aDetailedMessage" if we got an error trying to insert
the row. The 'close'-type log also has the new "accountsql_close"
field, but misses the "globalsql_close" field as we never update
the global database on this event. On the 'close' log, we can also
have the value "missing", indicating that we couldn't update the
access log row in the database, as the corresponding 'open' log
couldn't insert it.

The "ttyrecsize" log field for the 'close'-type logs has been removed,
as it was never completely implemented, and contains bogus data if
ttyrec log rotation occurs. It has also been removed from the sqlite
log databases.

The 'open' and 'close' events are now pushed to our own log files,
in addition to syslog, if logging to those files is enabled (see
``enableGlobalAccesssLog`` and ``enableAccountAccessLog``), previously
the 'close' events were only pushed to syslog.

The /home/osh.log is no longer used for ``enableGlobalAccessLog``, the
global log is instead written to /home/logkeeper/global-log-YYYYMM.log.

The global sql file, enabled with ``enableGlobalSqlLog``, is now
split by year-month instead of by year, to
/home/logkeeper/global-log-YYYYMM.sqlite.
2020-12-29 16:14:50 +00:00
Stéphane Lesimple
a204313af9
feat: accountModify: add --osh-only (closes #97) 2020-12-18 11:04:33 +00:00
Stéphane Lesimple
1d84a9a714
Merge pull request #99 from ovh/docfix
doc: minor adjustments
2020-12-17 15:12:32 +01:00
Stéphane Lesimple
3c5dddc06e
chore: fixes after review 2020-12-17 14:05:36 +00:00
Stéphane Lesimple
f2ac7c269a
doc: minor adjustments 2020-12-17 08:14:54 +00:00
Stéphane Lesimple
4a45df4432
chore: tidy after merge, adjust & regen doc 2020-12-17 08:04:32 +00:00
Stéphane Lesimple
9c370b8ac1
Merge branch 'master' into configlint 2020-12-16 14:33:36 +01:00
Stéphane Lesimple
b131395a21
Merge pull request #79 from axl89/master
Fixed wrong default values in bastion.conf comments
2020-12-16 14:29:03 +01:00
Stéphane Lesimple
163a3fd726
chore: perlcritic/perltidy passes 2020-12-16 13:01:13 +00:00
Stéphane Lesimple
ea6867a614
doc: autogenerate the bastion.conf options reference 2020-12-16 12:47:33 +00:00
Stéphane Lesimple
78c47cba04
chore: checks_basic: verify that autogenerated doc is up to date 2020-12-15 17:37:38 +00:00
Stéphane Lesimple
1c33903203
release v3.01.03 2020-12-15 11:35:33 +00:00
Stéphane Lesimple
a3b2b7d8e4
bump to v3.01.02 2020-12-08 15:41:56 +00:00
Stéphane Lesimple
87128da9d6
chore: adjust readme & docs 2020-12-08 14:42:31 +00:00
Axel Amigo Arnold
a085cc467e Fixed wrong parameter naming
As seen in the script's help, it's --managed-upgrade.
2020-12-05 15:24:49 +01:00
Stéphane Lesimple
534ce45812
release v3.01.01 2020-12-04 16:36:08 +00:00
Stéphane Lesimple
5f3961424f
doc: add information about puppet-thebastion and yubico-piv-checker 2020-12-01 09:37:44 +00:00
Stéphane Lesimple
b6b886b669
Merge branch 'master' into doc 2020-11-23 19:15:03 +01:00
Stéphane Lesimple
2b74042fd9
doc: fix typo
Co-authored-by: Thomas Soëte <thomas.soete@ovhcloud.com>
2020-11-23 12:32:52 +01:00
Thomas SOËTE
ef531308d5 enh: doc: add from parameter as it is mandatory 2020-11-23 11:28:15 +00:00
Stéphane Lesimple
9714b59403
enh: doc: simplify general upgrade procedure 2020-11-23 11:05:01 +00:00
Stéphane Lesimple
5ecab9888b
bump to v3.01.00 2020-11-20 10:53:00 +00:00
Stéphane Lesimple
b87107dd23
bump to v3.00.02 2020-11-16 10:39:06 +00:00
Stéphane Lesimple
ae1bcbf223
release v3.00.01 2020-11-06 15:22:12 +00:00
Stéphane Lesimple
0ebb8d453f
doc: adjust ttyrec install section 2020-11-06 11:27:49 +00:00