Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Fix GET /alertmanager/{DatasourceId}/config/api/v1/alerts response #27

Merged
merged 4 commits into from
Mar 16, 2021

Conversation

papagian
Copy link
Collaborator

Grafana receiver GET responses should not expose the receiver secure settings.

This PR:

  • renames GrafanaReceiver to PostableGrafanaReceiver (pointing to CreateAlertNotificationCommand) and introduces GettableGrafanaReceiver (pointing to dtos.AlertNotification)
  • renames UserConfig to PostableUserConfig and introduces GettableUserConfig
  • renames ApiAlertingConfig to PostableApiAlertingConfig and introduces GettableApiAlertingConfig
  • renames ApiReceiver to PostableApiReceiver and introduces GettableApiReceiver
  • renames GrafanaReceivers to PostableGrafanaReceivers and introduces GettableGrafanaReceivers

@papagian papagian requested a review from owen-d March 12, 2021 13:57
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

I don't love the fact we need to add multiple representations for different actions or that we're duplicating validation code, but I suspect this will make it easier to hook into the existing codebase.

@papagian papagian merged commit 4987b85 into master Mar 16, 2021
@papagian papagian deleted the fix-get-am-config-response branch March 16, 2021 15:14
@papagian papagian restored the fix-get-am-config-response branch March 16, 2021 17:50
@papagian papagian deleted the fix-get-am-config-response branch March 16, 2021 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants