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

Add alerting tests to ensure AAD isn't broken after any API calls #47714

Closed
mikecote opened this issue Oct 9, 2019 · 3 comments · Fixed by #53333
Closed

Add alerting tests to ensure AAD isn't broken after any API calls #47714

mikecote opened this issue Oct 9, 2019 · 3 comments · Fixed by #53333
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.6.0

Comments

@mikecote
Copy link
Contributor

mikecote commented Oct 9, 2019

No description provided.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@pmuellr
Copy link
Member

pmuellr commented Nov 25, 2019

Wondering what the context is, and if it is what I'm guessing, how we're going to test this.

I guess it boils down to "ensure AAD isn't broken", and AAD for what (actions, alerts, anything?). Which could mean the following, for actions:

  • changing a config value will end up changing the encrypted versions of the secrets, to take into account config is used as AAD
  • ensuring that you can't change a config value without also supplying the original (or new, doesn't matter) values for the secrets

@mikecote
Copy link
Contributor Author

mikecote commented Nov 26, 2019

Yeah, it would be to make sure AAD isn't broken after any modifications to an alert or action. I've caught myself breaking the AAD in the enable alert API without integration tests catching it. The enable API would set enabled: true and not pass the remaining attributes and this caused the alert to become corrupt.

What I had in mind for tests was to add a specific test decryption API (within test fixture plugin or so) that would make sure the object could still be decrypted. We would then call this API after a test modifies an alert / action (which may be most of them or at least 1 per endpoint).

Sample place a route could be registered: https://github.com/elastic/kibana/blob/master/x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/index.ts#L16

@mikecote mikecote self-assigned this Dec 9, 2019
@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants