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

feat: Allow setting certificate and key files mode #175

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

rjeffman
Copy link
Collaborator

Enhancement: Allow seting of certificate and key files mode attribute through the use of the 'mode' parameter, when using the certmonger provider.

Reason: Previously, the certificate files generated by the certmonger provider used a default file mode that may not be suitable for some tools or for some more restricted environments.

Result: The file mode attribute can now be set using the same roles as Ansible's file mode parameter, accepting either a string or an integer.

Issue Tracker Tickets (Jira or BZ if any): https://bugzilla.redhat.com/show_bug.cgi?id=2180902

@rjeffman
Copy link
Collaborator Author

[citest]

@richm
Copy link
Collaborator

richm commented Jun 20, 2023

I guess there already was a check for mode in tests/tasks/assert_certificate_parameters.yml

@richm
Copy link
Collaborator

richm commented Jun 20, 2023

@rjeffman not sure what's going on - the tests expect that if mode is not present, the files will be created with 0640 but they are being created with 0600 - does certmonger have some sort of default mode that it uses that is 0600?

@rjeffman rjeffman linked an issue Jun 21, 2023 that may be closed by this pull request
@rjeffman
Copy link
Collaborator Author

@richm sorry, I've drowned in some other issues. I'll be looking at this issue this Friday (23/06).

Allow setting of certificate and key files mode attribute through the
use of the 'mode' parameter. The parameter follows Ansible's file mode
rules, accepting either strings or integer values.

Fixes linux-system-roles#133

Signed-off-by: Rafael Jeffman <rjeffman@redhat.com>
@rjeffman
Copy link
Collaborator Author

[citest]

@rjeffman
Copy link
Collaborator Author

@richm tests passed with the latest fix, can you review this PR?

@richm richm merged commit 73eb6b7 into linux-system-roles:main Jun 28, 2023
23 of 29 checks passed
@rjeffman rjeffman deleted the add_fsattr_mode branch January 26, 2024 11:56
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.

Add permissions to provider certmonger
2 participants