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

always log foreman-rake output #1170

Merged
merged 1 commit into from
Jun 17, 2024
Merged

always log foreman-rake output #1170

merged 1 commit into from
Jun 17, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jun 17, 2024

this is useful when debugging which migrations ran and how long they
took

this is useful when debugging which migrations ran and how long they
took
@@ -22,7 +22,7 @@
command => "/usr/sbin/foreman-rake ${title}",
user => $user,
environment => sort(join_keys_to_values({ 'HOME' => $app_root } + $environment, '=')),
logoutput => 'on_failure',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was set to on_failure (which is default, btw) since the original implementation in 88e4c16

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was debating whether this can log any secrets, like the initial password with seeding. That particular case isn't an issue since it's not printed when provided (https://github.com/theforeman/foreman/blob/93a16bdbd7a7a819bab9d7a136dee9986b30bc08/db/seeds.d/035-admin.rb#L59-L65).

I can't think of anything else, but have you thought about that?

@evgeni
Copy link
Member Author

evgeni commented Jun 17, 2024

I did so, briefly. In the installer context, "this is fine", as we secure the log properly. Outside, I couldn't find anything but the seeded password which you either WANT logged (when you do not set it) or it's not printed.

Migrations shouldn't print anything secret.

@ekohl ekohl merged commit f31e9ba into master Jun 17, 2024
19 of 21 checks passed
@ekohl ekohl deleted the log-rake branch June 17, 2024 12:07
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.

2 participants