-
Notifications
You must be signed in to change notification settings - Fork 44
DLPX-86537 CIS: sudoers configuration #498
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
DLPX-86537 CIS: sudoers configuration #498
Conversation
6423546
to
096ff6b
Compare
096ff6b
to
fe3b417
Compare
bb04111
to
fe3b417
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be making these changes using ansible. The idea of the "*.d" directories is that they can contain configuration fragments as files. You can simply include the files you want in the delphix-platform repo. For example, see how we already provide such a configuration fragment in the repo already in a file called delphix
. We can do the same for logrotate configuration fragments.
Ohh yeah, I wasn't aware of it, I used
And also added a log rotator, @sebroy thanks for suggesting, can you please re-review? I will do testing again once, the pre-push completes. |
8ee46c4
to
82be5d4
Compare
@sebroy Completed the normal and upgrade testing, things are working as expected, can you please re-review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last nit: we should be consistent with copyright blocks. In this case, one file has a copyright block, and the other does not. Either they should both have one, or neither should have one. IMO configuration files are not copyrightable code, and should not have a copyright block. As such, I suggest removing the copyright block from the sudoers.d file to make things consistent.
Yes, that's a good idea. However, I was thinking about something else: I searched for the files with |
82be5d4
to
51daad5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I don't have strong feelings nor expertise in copyrights but per your comment, it seems like adding the same sort of block to the new file would be more consistent with the rest of the codebase than removing it from the preexisting file.
|
3dfb61c
to
69ee2b7
Compare
Problems
This setting specifies the presence of 'use_pty' setting in /etc/sudoers and /etc/sudoers.d/ file. If set, sudo will run the command in a pseudo-pty. Attackers can run a malicious program using sudo which would fork a background process that remains even when the main program has finished executing. This setting should be configured according to the needs of the business.
This setting specifies the presence of sudo log file on the system. A sudo log file simplifies auditing of sudo commands. Sudo provides users with temporarily elevated privileges to perform operations. And if it is enabled, creating an audit log of exactly what was run (and who ran it) is essential to reporting. This setting should be configured according to the needs of the business.
Solutions
/etc/sudoers.d/delphix
and add below 2 lines in it to get logs of sudo commands:/etc/logrotate.d/sudo-log
for log rotation.Testing
Manual