[Cloud Posture] refactoring cspm plugin apis to internal (#130434)

* refactoring cspm plugin apis to internal

* fix tests

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Kfir Peled 2022-04-17 16:30:31 +03:00 committed by GitHub
parent 1bfeab7553
commit c1d66902ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

View file

@ -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';

View file

@ -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 () => {

View file

@ -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 () => {

View file

@ -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 () => {