-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Make metrics routes internals and limit features #162406
Labels
Feature:Cases
Cases feature
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Comments
adcoelho
added
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Feature:Cases
Cases feature
labels
Jul 24, 2023
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
This was referenced Jul 24, 2023
adcoelho
added a commit
that referenced
this issue
Aug 1, 2023
Fixes #162406 ## Summary - Made `getCaseMetrics` and `getCasesMetrics` internal APIs. - There was no documentation to begin with so there was none to remove. - The allowed/available `features` now come from the `CaseMetricsFeature` _enum_ instead of being hardcoded everywhere. - We now **also** check for the values passed to the `features` field in case metrics requests using io-ts. - There was already some validation before which I decided to leave. When doing `buildHandlers` the function `checkAndThrowIfInvalidFeatures` is always called. Right now, this is only used by `getCasesMetrics` and `getCaseMetrics` where we already decode the params so that validation is redundant, but if it starts being used somewhere else it will be nice to have this extra security guarantee. ### Release Notes The get case metrics APIs are now internal. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
ThomThomson
pushed a commit
to ThomThomson/kibana
that referenced
this issue
Aug 1, 2023
Fixes elastic#162406 ## Summary - Made `getCaseMetrics` and `getCasesMetrics` internal APIs. - There was no documentation to begin with so there was none to remove. - The allowed/available `features` now come from the `CaseMetricsFeature` _enum_ instead of being hardcoded everywhere. - We now **also** check for the values passed to the `features` field in case metrics requests using io-ts. - There was already some validation before which I decided to leave. When doing `buildHandlers` the function `checkAndThrowIfInvalidFeatures` is always called. Right now, this is only used by `getCasesMetrics` and `getCaseMetrics` where we already decode the params so that validation is redundant, but if it starts being used somewhere else it will be nice to have this extra security guarantee. ### Release Notes The get case metrics APIs are now internal. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Cases
Cases feature
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Connected with #153726
As the title says we should make the
metrics
routes in cases internals. Additionally, thefeatures
should be limited only to known values.The text was updated successfully, but these errors were encountered: