Commit graph

17 commits

Author SHA1 Message Date
schurzi
a806ec8598
add posibility to run ssh_hardening as unprivileged user (#561)
* add VM tests for ssh_hardening

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* remove VM tests from ssh_hardening

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* run ssh_hardening test as unprivileged user

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add link for documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* use different config

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* remove become

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* re-add become

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move become into role

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* indentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* try args apply

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix linting

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-08-15 13:19:07 +02:00
Sebastian Gumprich
9b50392d8a fix linting
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-07 16:12:06 +02:00
Sina Tak Tehrani
5debcc0c6f
fix filter error in ansible.builtin.file mode parameter (#486)
* fix filter error in ansible.builtin.file mode parameter

* Change cinc supermarket

* fix link to baseline

* fix typo

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2021-10-18 20:55:24 +02:00
rndmh3ro
cf17f80374 skip linting on special task
Signed-off-by: rndmh3ro <github@gumpri.ch>
2021-08-15 20:16:56 +02:00
Sebastian Gumprich
4ca4f09453
Cleanup old OS-support and simplify vars (#458)
* use os_family instead of distribution for debian systems

Signed-off-by: rndmh3ro <github@gumpri.ch>

* remove tasks related to rhel6 or debian 6

Signed-off-by: rndmh3ro <github@gumpri.ch>
2021-06-30 13:09:46 +02:00
Sebastian Gumprich
72ec118a6d
add rocky linux 8 tests and make sure that all relevant tasks are execd (#457)
* add rocky linux 8 tests and make sure that all relevant tasks are executed

Signed-off-by: rndmh3ro <github@gumpri.ch>

* fix missing quote

Signed-off-by: rndmh3ro <github@gumpri.ch>
2021-06-30 13:09:12 +02:00
schurzi
29e10e5c3b
add tag always to os dependent vars task (#456)
when our collection is used with tags, the os dependent variables are
not resolved. This task should run every time, so the behaviour is
correct.

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-06-29 13:07:25 +02:00
Sina Tak Tehrani
4313d6fbfb
fixed a typo in comments (#439)
Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>
2021-04-09 08:15:11 +02:00
Benjamin
29ee683069 Fix ssh kex sntrup761x25519-sha512@openssh.com for openssh >= 8.5
fix #433

Signed-off-by: Benjamin <gitlab@lnxkiste.de>
Signed-off-by: Benjamin Boehm <git@lnxkiste.de>
2021-04-01 02:08:24 +02:00
Farid Joubbi
7af432e1cf
Uppercased first letter of task names. (#422)
Signed-off-by: Farid Joubbi <farid@joubbi.se>
2021-03-25 13:52:56 +01:00
Norman Ziegner
f035053381
Only set default for ssh host key files when hardening the server (#393)
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2021-02-09 10:01:41 +01:00
Norman Ziegner
614662b99d
Add variable to specify host rsa key size (#394)
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2021-02-09 09:44:55 +01:00
schurzi
4b0819349d
use fqcn for community.crypto.openssh_keypair module (#389)
tihis fixes a problem with Ansible 2.9 where the default openssh_keypair
is not supporting every option we need

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-02-05 19:44:23 +01:00
Sina Tak Tehrani
ef31838fa2
Regenerate RSA key with size 4096 bits (#376)
* regenerate RSA key with size 4096 bits

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* fixed lint problem

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* fixed E301 lint error

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* added host keys related vars

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* used openssh_keypair module

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* changed RSA private key mode to 0640

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>

* specified condition to prevent wrong file mode on debian-based OS

Signed-off-by: Sina Tak Tehrani <ssttehrani@gmail.com>
2021-01-21 13:38:48 +01:00
schurzi
a75e2c028b
change inclusion of os specific defaults (#353)
* change inclusion of os specific defaults

we now include the os specific options into a separate variable and
merge this with the default ansible namespace, when the corresponding
keys do not already exist (eg. are defined by default oder by user)

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* simplify check for os specific variables

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add test for variable override

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move tests to verify stage

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* correct grep

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* linting

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix typo

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* Revert "Merge pull request #351 from sprat/fix-umask"

This reverts commit 9e8e0bc8fb, reversing
changes made to 98c7553016.

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move immutable ssh vars to internal vars

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move vars to OS files

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* change default handling for all roles

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix issues

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* Update main.yml

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2020-12-20 20:46:57 +01:00
Sylvain Prat
43ec139d24
Fix #348: make ssh configuration files paths configurable (#350)
Signed-off-by: Sylvain Prat <sylvain.prat@gmail.com>
2020-12-16 19:24:44 +01:00
Sebastian Gumprich
a46642ee92 merge ssh-hardening role into collection 2020-11-07 21:46:45 +01:00