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

Restrict log permissions #397

Merged
merged 1 commit into from Oct 27, 2020
Merged

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Sep 29, 2020

While the current log directory permissions are restrictive and correct,
the file permissions are too permissive and it raises flags on
evaluations of the deployment. Let's instead change the permissions to
0600 which is more appropriate for these types of logs.

Note that while this is a superficial fix, it is also meant to address upgrades
(on an upgrade scenario, the permissions of old and rotated log files will be
fixed).

While the current log directory permissions are restrictive and correct,
the file permissions are too permissive and it raises flags on
evaluations of the deployment. Let's instead change the permissions to
0600 which is more appropriate for these types of logs.
@JAORMX
Copy link
Contributor Author

JAORMX commented Sep 30, 2020

cc @stlaz

@stlaz
Copy link
Member

stlaz commented Oct 2, 2020

/hold
This is weird. Why not fix it in the component itself?

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 2, 2020
@JAORMX
Copy link
Contributor Author

JAORMX commented Oct 2, 2020

/hold
This is weird. Why not fix it in the component itself?

In case of upgrades, this would fix the permissions of old logs too.

@stlaz
Copy link
Member

stlaz commented Oct 2, 2020

/hold cancel
That's alright, then

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 2, 2020
@sttts
Copy link
Contributor

sttts commented Oct 22, 2020

This misses logs after log rotation.

@JAORMX
Copy link
Contributor Author

JAORMX commented Oct 26, 2020

@sttts logs after log rotation inherit the initial permissions (at least that's how the underlying library is supposed to work)

@JAORMX
Copy link
Contributor Author

JAORMX commented Oct 26, 2020

@sttts for reference, this attempts to fix the default in the underlying library natefinch/lumberjack#112
and this attempts to change the permissions in kube: kubernetes/kubernetes#95387

@sttts
Copy link
Contributor

sttts commented Oct 27, 2020

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JAORMX, sttts

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2020
@openshift-merge-robot openshift-merge-robot merged commit e87b62d into openshift:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants