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

[Cloud Security] [Agentless] Create GHA Cloud Security workflow sanity tests for Agentless ESS deployments. #192182

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Testing
  • Loading branch information
seanrathier committed Sep 18, 2024
commit 050ffa3f523f2cf5d347842c94ef4ff991c3deeb
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,35 @@
*/

import { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
// import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { createTestConfig } from '../../config.base';

// const isCloud = !!process.env.TEST_CLOUD;
const isCloud = !!process.env.TEST_CLOUD;

// // If the test is running in the Serverless Quality Gates then we want to use
// // the project's Agentless API config. Otherwise, we want to use the default config.
// const agentlessConfig = isCloud
// ? []
// : [
// // Agentless Configuration based on Serverless Security Dev Yaml - config/serverless.security.dev.yml
// `--xpack.fleet.agentless.enabled=true`,
// `--xpack.fleet.agentless.api.url=http://localhost:8089`,
// `--xpack.fleet.agentless.api.tls.certificate=${KBN_CERT_PATH}`,
// `--xpack.fleet.agentless.api.tls.key=${KBN_KEY_PATH}`,
// `--xpack.fleet.agentless.api.tls.ca=${CA_CERT_PATH}`,
// `--xpack.cloud.serverless.project_id=some_fake_project_id`,
// ];
// If the test is running in the Serverless Quality Gates then we want to use
// the project's Agentless API config. Otherwise, we want to use the default config.
const agentlessConfig = isCloud
? []
: [
// Agentless Configuration based on Serverless Security Dev Yaml - config/serverless.security.dev.yml
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=${CLOUD_CREDENTIALS_PACKAGE_VERSION}`,
`--xpack.fleet.agents.fleet_server.hosts=["https://ftr.kibana:8220"]`,
`--xpack.fleet.internal.fleetServerStandalone=true`,
`--xpack.fleet.agentless.enabled=true`,
`--xpack.fleet.agentless.api.url=http://localhost:8089`,
`--xpack.fleet.agentless.api.tls.certificate=${KBN_CERT_PATH}`,
`--xpack.fleet.agentless.api.tls.key=${KBN_KEY_PATH}`,
`--xpack.fleet.agentless.api.tls.ca=${CA_CERT_PATH}`,
`--xpack.cloud.serverless.project_id=some_fake_project_id`,
];

export default createTestConfig({
serverlessProject: 'security',
junit: {
reportName: 'Serverless Security Cloud Security Agentless API Onboarding Functional Tests',
},
kbnServerArgs: [
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=${CLOUD_CREDENTIALS_PACKAGE_VERSION}`,
`--xpack.fleet.agents.fleet_server.hosts=["https://ftr.kibana:8220"]`,
`--xpack.fleet.internal.fleetServerStandalone=true`,
// ...agentlessConfig,
],
kbnServerArgs: [...agentlessConfig],
// load tests in the index file
testFiles: [require.resolve('./ftr/cloud_security_posture/agentless_api')],
});