Commit graph

550 commits

Author SHA1 Message Date
Stéphane Lesimple
59187fcf4c fix: interactive: omit inactivity msg warning when set to 0 seconds
Signed-off-by: Stéphane Lesimple <stephane.lesimple+bastion@ovhcloud.com>
2021-02-13 16:09:36 +01:00
Stéphane Lesimple
d430c602bf release v3.02.00 2021-02-02 15:02:51 +01:00
Stéphane Lesimple
724ee2bb7a chore: add fanciness to README.md 2021-02-01 17:32:45 +01:00
Stéphane Lesimple
a913c5aa8a bump to v3.01.99-rc4 2021-01-25 12:18:27 +01:00
Stéphane Lesimple
5d36e820ca fix: admins no longer inherited superowner powers
Regression since rc1
2021-01-25 12:18:04 +01:00
Stéphane Lesimple
3bb1db3a4d bump to v3.01.99-rc3 2021-01-21 15:57:11 +01:00
Stéphane Lesimple
3dfa77ebab doc: update groupList/accountList documentation 2021-01-21 15:56:59 +01:00
Stéphane Lesimple
fd97845c1c chore: update autoload list accordingly 2021-01-21 15:56:59 +01:00
Stéphane Lesimple
efe3710e4c feat: groupList/accountList: add --include --exclude 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
148d5206e5 enh: rootListIngressKeys: look for all well-known authkeys files 2021-01-21 15:06:27 +01:00
Stéphane Lesimple
61538ff086 chore: tests: also update totalerrors while tests are running 2021-01-20 14:01:55 +01:00
Stéphane Lesimple
80ade2ba4c fix: debian9: create_file_if_not_exists couldn't chgrp by filehanddle 2021-01-20 14:01:55 +01:00
Stéphane Lesimple
69778815bb enh: groupList: use cache to speedup calls
On bastions with thousands of group, the speedup is ~x10
2021-01-20 14:01:55 +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
141791db92 fix: scripts: (( )) returns 1 if evaluated to zero 2021-01-15 16:13:30 +01:00
Stéphane Lesimple
8d0004f8aa fix: config: be more permissive for documentationURL regex 2021-01-15 16:13:11 +01:00
Stéphane Lesimple
d04b15a19e fix: tocttou in ttyrec rotation script 2021-01-14 17:19:48 +01:00
Stéphane Lesimple
361c6a37a2 fix: osh-lingering-sessions-reaper.sh: tocttou on kill could terminate the script early 2021-01-14 17:16:31 +01:00
Pierre Kuhner
e7e045a40d fix: confusing error messages in groupDelServer 2021-01-14 09:40:55 +01:00
Stéphane Lesimple
36d0c709db bump to v3.01.99-rc2 2021-01-13 09:38:02 +01:00
Stéphane Lesimple
c6446495aa fix: logs: sql dbname was not properly passed through the update logs func 2021-01-13 09:38:02 +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
1378ba84f5 fix: re-introduce the ttyrecfile field
This field was mistakenly removed along with the ttyrecsize one
by mistake in a479810d83.

Add tests to ensure this can't break again.
2021-01-13 09:38:02 +01:00
Stephane Lesimple
916485b3cb chore: fix: documentation build was missing a prereq 2021-01-12 12:58:14 +01:00
Stéphane Lesimple
27d09e8cbe bump to v3.01.99-rc1 2021-01-12 12:05:41 +01:00
Stéphane Lesimple
1129850771 fix: global-log: directly set proper perms on file creation 2021-01-12 12:05:20 +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
62d6393d56 feat: add yubico-piv-checker install script 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
e75fc974c6
Merge pull request #112 from ovh/counterrors
fix: tests: syslog-logged errors were not counted towards the total
2021-01-08 11:58:58 +01:00
Stéphane Lesimple
41121f7723
fix: proper sqlite log location for invalid realm accounts 2021-01-07 17:20:54 +00:00
Stéphane Lesimple
920821f5d6
fix: tests: syslog-logged errors were not counted towards the total 2021-01-07 10:36:34 +00:00
Stéphane Lesimple
e8d60810f1
Merge pull request #111 from ovh/perluseall
chore: perl-use-all: dynamically find required modules
2021-01-05 18:51:25 +01:00
Stéphane Lesimple
b4f32d5afe
Merge pull request #110 from ovh/aclbackup
enh: satellite scripts: better error handling
2021-01-05 18:51:09 +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
16323667e2
Merge pull request #106 from ovh/logs
feat: revamp logs
2021-01-05 18:50:25 +01:00
Stéphane Lesimple
6373933f8f
Merge pull request #104 from ovh/mfa_realm
feat: inter-realm MFA and LC_BASTION_DETAILS
2021-01-05 18:50:05 +01:00
Stéphane Lesimple
8e7fc9b949
chore: perl-use-all: dynamically find required modules 2020-12-31 13:00:00 +00:00
Stéphane Lesimple
9a10ddebd9
enh: satellite scripts: better error handling 2020-12-31 12:13:20 +00: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
ebc3c2c6df
Merge pull request #107 from ovh/itsover9000
fix: groupList: remove 9K group limit
2020-12-29 13:32:57 +01:00
Stéphane Lesimple
2117773945
fix: groupList: remove 9K group limit 2020-12-29 10:41:04 +00:00
Stéphane Lesimple
5228c863b0 chore: tests_all: use proper tempdir 2020-12-25 17:02:54 +01:00
Stéphane Lesimple
2cfde997f3 fix: realmDelete: bad sudoers configuration 2020-12-25 17:02:54 +01:00
Stéphane Lesimple
81db4b10bb feat: realms: use remote bastion MFA validation information for local policy enforcement 2020-12-25 17:02:54 +01:00
Stéphane Lesimple
9d1d613554
Merge pull request #103 from ovh/guestwarn
fix: remove useless warning when there is no guest access
2020-12-23 12:01:02 +01:00
Stéphane Lesimple
8c31ea277c
fix: remove useless warning when there is no guest access 2020-12-23 10:24:24 +00:00