Skip to content

Commit

Permalink
[Cloud Posture] refactoring cspm plugin apis to internal (#130434)
Browse files Browse the repository at this point in the history
* refactoring cspm plugin apis to internal

* fix tests

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
kfirpeled and kibanamachine authored Apr 17, 2022
1 parent 1bfeab7 commit c1d6690
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions x-pack/plugins/cloud_security_posture/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
* 2.0.
*/

export const STATS_ROUTE_PATH = '/api/csp/stats';
export const FINDINGS_ROUTE_PATH = '/api/csp/findings';
export const BENCHMARKS_ROUTE_PATH = '/api/csp/benchmarks';
export const UPDATE_RULES_CONFIG_ROUTE_PATH = '/api/csp/update_rules_config';
export const STATS_ROUTE_PATH = '/internal/cloud_security_posture/stats';
export const FINDINGS_ROUTE_PATH = '/internal/cloud_security_posture/findings';
export const BENCHMARKS_ROUTE_PATH = '/internal/cloud_security_posture/benchmarks';
export const UPDATE_RULES_CONFIG_ROUTE_PATH =
'/internal/cloud_security_posture/update_rules_config';

export const CSP_FINDINGS_INDEX_NAME = 'findings';
export const CIS_KUBERNETES_PACKAGE_NAME = 'cis_kubernetes_benchmark';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('benchmarks API', () => {

const [config] = router.get.mock.calls[0];

expect(config.path).toEqual('/api/csp/benchmarks');
expect(config.path).toEqual('/internal/cloud_security_posture/benchmarks');
});

it('should accept to a user with fleet.all privilege', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Update rules configuration API', () => {

const [config, _] = router.post.mock.calls[0];

expect(config.path).toEqual('/api/csp/update_rules_config');
expect(config.path).toEqual('/internal/cloud_security_posture/update_rules_config');
});

it('should accept to a user with fleet.all privilege', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('findings API', () => {

const [config, _] = router.get.mock.calls[0];

expect(config.path).toEqual('/api/csp/findings');
expect(config.path).toEqual('/internal/cloud_security_posture/findings');
});

it('should accept to a user with fleet.all privilege', async () => {
Expand Down

0 comments on commit c1d6690

Please sign in to comment.