Skip to content

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!

#################################
# 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?

# 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]>
@jpmc3630
Copy link

What's the status of this?

@professormahi
Copy link
Author

What's the status of this?

Sorry for long delay. I will work on this issue in next week and hope to fix your comments soon.

@stroebel
Copy link

Good day. I've pulled this branch to extend the supported OSes for postgres hardening. I can address the comments that are still outstanding but it looks like there are some unsigned commits from @professormahi and the CI tool. I've specifically pulled @professormahi 's branch to avoid clobbering the work that he has done so far.

Would you prefer that I wait until this PR is merged or can I extend this contribution after the unsigned commits are signed?

@idNoRD
Copy link

idNoRD commented Jun 19, 2025

@stroebel Please feel free to move forward independently of this PR. Be sure to resolve the unsigned commit issues, and if you're planning to add support for AL2023, I’m happy to assist with reviewing and verifying your changes. Since this PR is specific to Ubuntu, support for other operating systems doesn’t need to wait. Let’s keep the momentum going.

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.

5 participants