-
Notifications
You must be signed in to change notification settings - Fork 124
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
Write log on Conjur config permission issues #2715
Conversation
a151d46
to
b8617e3
Compare
78dd867
to
3b8a01d
Compare
503bae2
to
76ced6e
Compare
Previously, this only considered codes in the `errors.rb` file. This means we do have duplicate numeric codes between logs and errors in the existing definitions that we'll also need to clean-up and de-dup.
76ced6e
to
f6dc2a5
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.
Reviewed by commit, LGTM
This is important to inject the Rails logger into it as a dependency in the next commit.
f6dc2a5
to
a1a41b4
Compare
Code Climate has analyzed commit a1a41b4 and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 75.8% (50% is the threshold). This pull request will bring the total coverage in the repository to 89.9%. View more on Code Climate. |
Desired Outcome
The desired outcome of this PR is make it visible to the end user when the Conjur configuration file (
conjur.yml
) cannot be loaded due to permission on either the file itself or its containing directory.Implemented Changes
The primary change in this PR is to write log messages for the known failure modes with the config file permissions:
Given that the config file is optional, we only log the directory/file missing message at the DEBUG level. That way these are visible when troubleshooting Conjur, but are not otherwise logging noise.
When the file/directory exist but have incorrect permissions, we log these at the WARN level, given we expect the intention is to use the config file and it may not be obvious that it can't be read by Conjur.
This PR also includes a tooling commit to make it easier to identify the next Conjur standard log code, as well as a refactor commit to prepare for injecting the logger into the Conjur config loader.
Connected Issue/Story
CyberArk internal issue ID: CNJR-390
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be
merged.
Changelog
CHANGELOG update
Test coverage
changes, or
Documentation
README
s) were updated in this PRBehavior
Security