Convert setup_iptables to ansible role + Fix usertwist group don't exist error + Hardened Systemd unit #5

Closed
Mateo wants to merge 10 commits from dev into main
Member

Goal : Improve service security

  • Hardened systemd unit
  • Changed usertwist service to use his own user ("usertwist")
Goal : Improve service security - Hardened systemd unit - Changed usertwist service to use his own user ("usertwist")
Mateo added 1 commit 2024-07-30 12:07:40 +00:00
Mateo added 1 commit 2024-07-30 12:45:53 +00:00
Mateo changed title from Convert setup_iptables to ansible role + Fix usertwist group don't exist error to Convert setup_iptables to ansible role + Fix usertwist group don't exist error + Hardened Systemd unit 2024-07-30 12:47:58 +00:00
Mateo added 1 commit 2024-07-30 12:51:10 +00:00
Mateo added 1 commit 2024-07-30 12:54:54 +00:00
Member

Please provide some details in the PR description (context, changes etc..)

Please provide some details in the PR description (context, changes etc..)
papey requested changes 2024-07-31 15:50:37 +00:00
papey left a comment
Member

Start looking good, one required change regarding iptables because I think that you current setup does survive a reboot.

Start looking good, one required change regarding iptables because I think that you current setup does survive a reboot.
@@ -8,0 +14,4 @@
ProtectKernelModules=yes
ProtectControlGroups=yes
PrivateDevices=yes
RestrictSUIDSGID=true
Member

What about ProtectHome ?

What about `ProtectHome` ?
Mateo marked this conversation as resolved
@@ -0,0 +1,38 @@
Role Name
Member

This looks a bit generic !

This looks a bit generic !
Mateo marked this conversation as resolved
@@ -0,0 +1,17 @@
---
Member

Required change : i'm pretty sure this iptables config does not survive a reboot. Can you check ? What should you do to ensure this config is applied at boot time ?

**Required change** : i'm pretty sure this iptables config does not survive a reboot. Can you check ? What should you do to ensure this config is applied at boot time ?
Mateo marked this conversation as resolved
Corwin requested changes 2024-08-01 12:49:25 +00:00
Corwin left a comment
Owner

See comment : I would like the user to not being able to login ! Thanks

See comment : I would like the user to not being able to login ! Thanks
@@ -32,3 +35,4 @@
- name: Create the usertwist user
ansible.builtin.user:
name: usertwist
Owner

Is this user able to login ?
If so please use No Login https://man7.org/linux/man-pages/man8/nologin.8.html

Is this user able to login ? If so please use No Login https://man7.org/linux/man-pages/man8/nologin.8.html
Mateo marked this conversation as resolved
Mateo added 1 commit 2024-08-02 07:27:56 +00:00
Mateo added 1 commit 2024-08-02 07:31:54 +00:00
Mateo added 1 commit 2024-08-02 07:45:23 +00:00
Mateo added 1 commit 2024-08-02 07:59:39 +00:00
Mateo added 1 commit 2024-08-02 08:10:48 +00:00
Mateo added 1 commit 2024-08-02 08:38:44 +00:00
Corwin reviewed 2024-08-02 09:20:41 +00:00
@@ -0,0 +14,4 @@
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
Owner

Which license should we pick ?

Which license should we pick ?
Mateo marked this conversation as resolved
Owner

Closing for splitting tickets/PR

Closing for splitting tickets/PR
Corwin closed this pull request 2024-08-02 09:29:16 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Stage/ansible_playbooks#5
No description provided.