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

notify: redact more secret data from logs #1825

Merged
merged 3 commits into from
Apr 4, 2019

Conversation

simonpasquier
Copy link
Member

Follow-up of #1822

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@@ -1210,8 +1210,7 @@ func (n *Pushover) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
return false, err
}

apiURL := "https://api.pushover.net/1/messages.json"
u, err := url.Parse(apiURL)
u, err := url.Parse(n.apiURL)
Copy link
Contributor

Choose a reason for hiding this comment

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

We've using this on line 1218 too

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier mentioned this pull request Apr 4, 2019
)
notifier.apiV1 = srv.URL

ok, err := notifier.Notify(ctx, []*types.Alert{}...)
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be the same for each added test. Could this be a table-driven test with subtests instead?

Let me know if you want to delay it, as it is not necessary for the security patch release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Rather than table-driven tests (to keep each test focused on one receiver), I'll create a helper function.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the thorough testing!

@mxinden mxinden merged commit 1c0b8e4 into prometheus:master Apr 4, 2019
@simonpasquier simonpasquier deleted the redact-more-secrets branch April 5, 2019 07:36
mxinden pushed a commit to mxinden/alertmanager that referenced this pull request Apr 5, 2019
Follow-up of prometheus#1822

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
mxinden pushed a commit to mxinden/alertmanager that referenced this pull request Apr 5, 2019
Follow-up of prometheus#1822

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants