Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for PostgreSQL #725

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

professormahi
Copy link

I'm working on adding PostgreSQL hardening role to this collection.

@rndmh3ro
Copy link
Member

rndmh3ro commented Dec 1, 2023

Wow, that's awesome! Thank you!

If you have any problems or questions, feel free to reach out!

Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
@professormahi professormahi marked this pull request as ready for review December 8, 2023 12:18
@professormahi
Copy link
Author

I think the base version is ready for review after merging dev-sec/postgres-baseline#54.

@professormahi
Copy link
Author

This PR is ready to review after the workflow approval. @rndmh3ro

@rndmh3ro
Copy link
Member

Thanks @professormahi, sounds awesome. I'll try to take a look next week!

Copy link
Member

@rndmh3ro rndmh3ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took an initial look and have some remarks, but great work nonetheless!

roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
#################################
# POSTGRES-02 ###################
#################################
- name: Get postgres version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the postgresql_info_module here? According to the docs, getting the version is supported by the module.

Or don't you want to do this because then we'd have to connect to the postgres?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@professormahi What do you think about this?

roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
roles/postgres_hardening/tasks/hardening.yml Outdated Show resolved Hide resolved
# POSTGRES-07/11/12/16 ##########
#################################
- name: Secure postgresql.conf Configuration
ansible.builtin.lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of using lineinfile. I'd rather use template.
Now I guess templating the whole postgresql.conf-file would be inconvenient, can we use includes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@professormahi What do you think about this?

Co-authored-by: Sebastian Gumprich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants