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

[ResponseOps][Rules] Remove unintended internal Find routes API with public access #193757

Merged
merged 24 commits into from
Oct 23, 2024
Merged
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e116ea
[ResponseOps][Rules] Remove unintended internal Find routes API with …
Zacqary Sep 18, 2024
5bcccb3
Merge branch 'main' into 192957-remove-internal-public-access
elasticmachine Sep 23, 2024
b1dd035
Wrap get/post registrations in conditional
Zacqary Sep 24, 2024
ac11af5
Add unit tests for proper access calls
Zacqary Sep 24, 2024
1057825
Change internal/find get to post in tests
Zacqary Sep 25, 2024
49ba566
Merge remote-tracking branch 'upstream/main' into 192957-remove-inter…
Zacqary Oct 1, 2024
c45f20c
Fix test post queries
Zacqary Oct 1, 2024
ece2d5c
Merge remote-tracking branch 'upstream/main' into 192957-remove-inter…
Zacqary Oct 3, 2024
35f830e
Add kbn-xssrf to post tests
Zacqary Oct 3, 2024
ef4bcdb
Fix obs functional tests
Zacqary Oct 4, 2024
7add9ec
Merge remote-tracking branch 'upstream/main' into 192957-remove-inter…
Zacqary Oct 4, 2024
233f439
Change security solution internal/_find find call to POST
Zacqary Oct 4, 2024
5e32657
Fix security api POST body
Zacqary Oct 14, 2024
a5cb489
Merge remote-tracking branch 'upstream/main' into 192957-remove-inter…
Zacqary Oct 14, 2024
022b75d
Fix security api jest
Zacqary Oct 14, 2024
ddae6e8
Change internal find intercept in cypress test
Zacqary Oct 14, 2024
de002fa
Move int internal find route to own file
Zacqary Oct 15, 2024
2934c11
Merge branch 'main' into 192957-remove-internal-public-access
elasticmachine Oct 16, 2024
ef2f711
Split puSplit public and internal test suites
Zacqary Oct 21, 2024
1d9f67b
Merge branch '192957-remove-internal-public-access' of https://github…
Zacqary Oct 21, 2024
c350629
Merge remote-tracking branch 'upstream/main' into 192957-remove-inter…
Zacqary Oct 21, 2024
1593634
Fix internal test suite split
Zacqary Oct 21, 2024
b64b9a9
Fix incorrect public test urls
Zacqary Oct 21, 2024
92d2a02
Fix expected 200, change to 400
Zacqary Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IRouter } from '@kbn/core/server';
import { IRouter, RouteConfigOptions, RouteMethod } from '@kbn/core/server';
import { UsageCounter } from '@kbn/usage-collection-plugin/server';
import { ILicenseState } from '../../../../lib';
import { verifyAccessAndContext } from '../../../lib';
Expand All @@ -29,6 +29,7 @@ interface BuildFindRulesRouteParams {
router: IRouter<AlertingRequestHandlerContext>;
excludeFromPublicApi?: boolean;
usageCounter?: UsageCounter;
options?: RouteConfigOptions<RouteMethod>;
}

const buildFindRulesRoute = ({
Expand All @@ -37,15 +38,12 @@ const buildFindRulesRoute = ({
router,
excludeFromPublicApi = false,
usageCounter,
options: routerOptions,
}: BuildFindRulesRouteParams) => {
router.get(
cnasikas marked this conversation as resolved.
Show resolved Hide resolved
{
path,
options: {
access: 'public',
summary: 'Get information about rules',
tags: ['oas-tag:alerting'],
},
options: routerOptions,
validate: {
request: {
query: findRulesRequestQuerySchemaV1,
Expand Down Expand Up @@ -168,6 +166,11 @@ export const findRulesRoute = (
path: `${BASE_ALERTING_API_PATH}/rules/_find`,
router,
usageCounter,
options: {
access: 'public',
summary: 'Get information about rules',
tags: ['oas-tag:alerting'],
},
});
};

Expand Down