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

Log job arguments at debug level #22091

Closed
wants to merge 1 commit into from
Closed

Log job arguments at debug level #22091

wants to merge 1 commit into from

Conversation

owenbendavies
Copy link

On a production system logging all parameters at info level is an
excessive amount of data. Also jobs might contain sensitive information
which does not want to be logged. See:

https://github.com/plataformatec/devise#password-reset-tokens-and-rails-logs

This continues to log job status updates at info level, but logs the job
parameters at debug level.

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @arthurnn (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

On a production system logging all parameters at info level is an
excessive amount of data. Also jobs might contain sensitive information
which does not want to be logged. See:

https://github.com/plataformatec/devise#password-reset-tokens-and-rails-logs

This continues to log job status updates at info level, but logs the job
parameters at debug level.
@rafaelfranca
Copy link
Member

Looks good to me.

r? @jeremy WDYT?

@rails-bot rails-bot assigned jeremy and unassigned arthurnn Oct 27, 2015
@owenbendavies
Copy link
Author

Is there anything else that is needed for this pull request? Thanks.

@arthurnn
Copy link
Member

👍

@monfresh
Copy link

I just submitted a similar pull request, but with a different approach: #23031

In my opinion, sensitive information should not be passed in as a job argument in the first place, but in the case where you don't have easy control over that (such as with the Devise reset_password_token), then I think a global setting that determines whether or not arguments are logged can be set to false, and that way sensitive info is not logged regardless of the log level.

What do you think?

@owenbendavies
Copy link
Author

I like the idea of making it configurable. I think the default should be to not log, as I prefer security by default and most projects contain sensitive information.

@owenbendavies
Copy link
Author

Is there anything I need to do to get this merged? Thanks.

@owenbendavies
Copy link
Author

No reply in 8 months so closing :(

@owenbendavies owenbendavies deleted the debug-arg-logging branch August 31, 2016 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants