Skip to content

Commit

Permalink
[8.x] [Cloud Security][D4C] Hide K8S (#201062) (#201899)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security][D4C] Hide K8S
(#201062)](#201062)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rickyanto
Ang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-25T23:24:17Z","message":"[Cloud
Security][D4C] Hide K8S (#201062)\n\n## Summary\r\n\r\nThis PR is to
hide K8S so User won't be able to access K8S Dashboard via\r\nnavigating
to it from the page or by direct URL,\r\nalso deleting Cypress tests
related to this\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6d91a7c0659c2a9e65bc963d193e81eb357b669c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","v8.18.0"],"title":"[Cloud
Security][D4C] Hide
K8S","number":201062,"url":"https://github.com/elastic/kibana/pull/201062","mergeCommit":{"message":"[Cloud
Security][D4C] Hide K8S (#201062)\n\n## Summary\r\n\r\nThis PR is to
hide K8S so User won't be able to access K8S Dashboard via\r\nnavigating
to it from the page or by direct URL,\r\nalso deleting Cypress tests
related to this\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6d91a7c0659c2a9e65bc963d193e81eb357b669c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201062","number":201062,"mergeCommit":{"message":"[Cloud
Security][D4C] Hide K8S (#201062)\n\n## Summary\r\n\r\nThis PR is to
hide K8S so User won't be able to access K8S Dashboard via\r\nnavigating
to it from the page or by direct URL,\r\nalso deleting Cypress tests
related to this\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6d91a7c0659c2a9e65bc963d193e81eb357b669c"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Rickyanto Ang <[email protected]>
  • Loading branch information
kibanamachine and animehart authored Nov 27, 2024
1 parent a5d13e3 commit a1a1168
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const allowedExperimentalValues = Object.freeze({
// FIXME:PT delete?
excludePoliciesInFilterEnabled: false,

kubernetesEnabled: true,
kubernetesEnabled: false,
donutChartEmbeddablesEnabled: false, // Depends on https://github.com/elastic/kibana/issues/136409 item 2 - 6

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { allowedExperimentalValues } from '../../common';
import { KubernetesContainer } from './pages';

import type { SecuritySubPluginRoutes } from '../app/types';
Expand All @@ -24,7 +25,7 @@ export const KubernetesRoutes = () => (

export const routes: SecuritySubPluginRoutes = [
{
path: KUBERNETES_PATH,
path: allowedExperimentalValues.kubernetesEnabled ? KUBERNETES_PATH : [],
component: KubernetesRoutes,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
DETECTION_RESPONSE,
DASHBOARDS,
CSP_DASHBOARD,
KUBERNETES,
INDICATORS,
BLOCKLIST,
CSP_BENCHMARKS,
Expand Down Expand Up @@ -54,7 +53,6 @@ import {
EXPLORE_URL,
MANAGE_URL,
CSP_DASHBOARD_URL,
KUBERNETES_URL,
BLOCKLIST_URL,
CSP_BENCHMARKS_URL,
CSP_FINDINGS_URL,
Expand Down Expand Up @@ -114,11 +112,6 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', ENTITY_ANALYTICS_URL);
});

it('navigates to the Kubernetes page', () => {
navigateFromHeaderTo(KUBERNETES);
cy.url().should('include', KUBERNETES_URL);
});

it('navigates to the CSP dashboard page', () => {
navigateFromHeaderTo(CSP_DASHBOARD);
cy.url().should('include', CSP_DASHBOARD_URL);
Expand Down Expand Up @@ -289,11 +282,6 @@ describe('Serverless side navigation links', { tags: '@serverless' }, () => {
cy.url().should('include', ENTITY_ANALYTICS_URL);
});

it('navigates to the Kubernetes page', () => {
navigateFromHeaderTo(ServerlessHeaders.KUBERNETES, true);
cy.url().should('include', KUBERNETES_URL);
});

it('navigates to the CSP dashboard page', () => {
navigateFromHeaderTo(ServerlessHeaders.CSP_DASHBOARD, true);
cy.url().should('include', CSP_DASHBOARD_URL);
Expand Down

0 comments on commit a1a1168

Please sign in to comment.