Commit graph

1615 commits

Author SHA1 Message Date
Maximilian Praeger
6e9247bde3 added: support for HostCertificate in sshd conf file
Signed-off-by: Maximilian Praeger <mpraeger@users.noreply.github.com>
2021-01-22 07:24:53 +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
f010b9a17e
Merge pull request #378 from joubbi/iwashere
Added comment on top of templates about which role manages the file
2021-01-20 11:42:38 +01:00
Martin Schurz
0600cdae75 add "role" to comment
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-01-20 11:23:40 +01:00
Farid Joubbi
254b62d980 Added comment on top of template about which role modified the resulting file. https://github.com/dev-sec/ansible-collection-hardening/issues/345
Signed-off-by: Farid Joubbi <farid@joubbi.se>
2021-01-19 14:05:33 +01:00
Farid Joubbi
d01abb44c0
Syncookie (#372)
* Enabled SYN cookie sysctl.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Removed SYN cookies from here since it's a default now.

Signed-off-by: Farid Joubbi <farid@joubbi.se>
2021-01-15 09:56:29 +01:00
schurzi
16a41412bb
check for correct cpu vendor in initramfs-tools (#374)
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-01-12 06:31:13 +01:00
schurzi
d83ad9e6a9
Merge pull request #368 from dev-sec/max_startups
reduce maximum unauthenticated ssh sessions
2021-01-11 20:49:29 +01:00
Farid Joubbi
5675589e01
Sorted sysctl values and lists in READMEs alphabetically (No functional changes). (#371)
* Add s's for consistency.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Sort lists alphabetically.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Sorted sysctl_config alphabetically.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Sort removed protocols.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Added dots in variable descriptions for the sake of consistency.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Added dots in variable descriptions for the sake of consistency.

Signed-off-by: Farid Joubbi <farid@joubbi.se>
2021-01-08 20:45:50 +01:00
tgueldner-mms
e8e552f3ae
make auditd 'max_log_file' configurable (#370)
* make auditd 'max_log_file' configurable

Signed-off-by: Thomas Gueldner <T.Gueldner@t-systems.com>

* fix documentation for os_auditd_max_log_file

Signed-off-by: Thomas Gueldner <T.Gueldner@t-systems.com>
2021-01-08 13:23:58 +01:00
schurzi
b4ca950122
set hidepid=0 on RHEL/CentOS 7 (#369)
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-01-03 12:53:08 +01:00
Martin Schurz
168af7fb6f reduce maximum unauthenticated ssh sessions
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2021-01-03 00:21:26 +01:00
Sebastian Gumprich
faffddbf31
add a runtime.yml to declare minimum ansible version (#363)
* add a runtime.yml to declare minimum ansible version

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

* add minimum ansible version to reamde

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

* Prettified Code!
2020-12-26 21:27:19 +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
Farid Joubbi
83e29b01f5
Removed Protocol statement in later versions of sshd, since the code … (#342)
* Removed Protocol statement in later versions of sshd, since the code for SSH-1 has been removed in sshd.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Prettified the generated ssh_config. No functional changes, removed spaces and orphan comments.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Removed Protocol statement in later versions of sshd, since the code for SSH-1 has been removed in sshd.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Removed blank lines and prettified ssh_config.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Added note about setting sshd_authenticationmethods if ssh_server_password_login.

Signed-off-by: Farid Joubbi <farid@joubbi.se>

* Backticked true.

Signed-off-by: Farid Joubbi <farid@joubbi.se>
2020-12-16 19:29:33 +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
schurzi
1ab33482db Prettified Code! 2020-12-16 09:39:43 +00:00
schurzi
9e8e0bc8fb
Merge pull request #351 from sprat/fix-umask
make the os_env_umask variable usable
2020-12-16 10:39:11 +01:00
Sylvain Prat
ea471b38b7 Fix #344: make the os_env_umask variable usable again
Signed-off-by: Sylvain Prat <sylvain.prat@gmail.com>
2020-12-15 21:31:51 +01:00
Sebastian Gumprich
98c7553016 remove trailing blank lines
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2020-12-15 20:09:29 +01:00
Sebastian Gumprich
5341f2a891
Update release.yml 2020-12-15 11:35:54 +01:00
dev-sec CI
53949911a9 update changelog 2020-12-15 10:00:41 +00:00
Sebastian Gumprich
753e517678
fix second changelog generation task, too (#349)
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2020-12-15 10:10:10 +01:00
dev-sec CI
c743c93530 update changelog 2020-12-15 09:00:40 +00:00
Sebastian Gumprich
253c5ec3eb
fix changelog generation (#341)
* fix changelog generation

the changelog generation fails because we merged other repos into
this one and these commits do not share a common ancestor.
see this issue: https://github.com/github-changelog-generator/github-changelog-generator/issues/665

to workaround this, we change the changelog generation so all tags older than 7.0.0 will be ignored
(--since-tag does not work here because it still works on all tags). This however will remove
 older releases from the changelog so we move these old releases into a separate file.
this is okay for me since these old releases are for ansible-os-hardening  and not the collection.
the new changelog file will contain all changes since 7.0.0.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* fix regex in action

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2020-12-15 09:58:19 +01:00
Sebastian Gumprich
837f99bdf8
update release action 2020-12-13 20:19:03 +01:00
Farid Joubbi
91424ac209
Improvements of comments in opensshd.conf.j2 #338 (#339)
* Fixed some comments that had issues. See #338

* Cut some long comments into two rows for easier reading.

Signed-off-by: joubbi <farid@joubbi.se>
2020-12-12 20:35:38 +01:00
szEvEz
13b09a0f23
Improve README for ssh_hardening (#335)
Signed-off-by: szEvEz <szivos.john@gmail.com>
2020-11-24 12:29:46 +01:00
Sebastian Gumprich
cade17ec30
fix typo 2020-11-11 21:54:31 +01:00
rndmh3ro
1cf8a6380d Prettified Code! 2020-11-11 20:34:34 +00:00
Sebastian Gumprich
1d2af73ced release collection 7.0.0
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-11 21:33:56 +01:00
Sebastian Gumprich
2f19ad1ce2
fix typo in galaxy (#332)
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-11 21:26:46 +01:00
Sebastian Gumprich
90151c3047
update galaxy version 2020-11-11 21:10:21 +01:00
Sebastian Gumprich
b607f61514 Merge branch 'collection' 2020-11-11 21:09:01 +01:00
Sebastian Gumprich
f2804c7c19 Merge branch 'master' into collection 2020-11-11 21:08:54 +01:00
Sebastian Gumprich
6b03886b4b update readme to point to old role
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-11 20:44:35 +01:00
Sebastian Gumprich
63df6bd3db remove accidental tar-gz push
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-11 20:40:02 +01:00
Sebastian Gumprich
d857830979 minor readme fixes
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-09 20:49:07 +01:00
rndmh3ro
c94d973527 Prettified Code! 2020-11-08 10:20:25 +00:00
Sebastian Gumprich
c8ada5c13c Merge branch 'migrate_os' into collection 2020-11-08 11:18:38 +01:00
Sebastian Gumprich
dd3959276b merge os-hardening role into collection 2020-11-07 22:09:28 +01:00
Sebastian Gumprich
6fc1320298 update for collection
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
2020-11-07 22:08:23 +01:00
Sebastian Gumprich
598f7183f8 remove os submodule 2020-11-07 21:49:25 +01:00
Sebastian Gumprich
66e88a34d1 Merge branch 'migrate_mysql' into collection 2020-11-07 21:48:11 +01:00
Sebastian Gumprich
a10e4d7c1a merge mysql-hardening role into collection 2020-11-07 21:48:10 +01:00
Sebastian Gumprich
51a7fed83d remove mysql submodule 2020-11-07 21:48:06 +01:00
Sebastian Gumprich
cc48e4761a Merge branch 'migrate_nginx' into collection 2020-11-07 21:47:46 +01:00
Sebastian Gumprich
e406349064 merge nginx-hardening role into collection 2020-11-07 21:47:45 +01:00
Sebastian Gumprich
5aa3701de9 remove nginx submodule 2020-11-07 21:47:43 +01:00
Sebastian Gumprich
d49e05f8e8 Merge branch 'migrate_ssh' into collection 2020-11-07 21:46:48 +01:00