Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9562e70
move: initial plan execution
seanrathier Jan 29, 2026
06b652e
move: fix references
seanrathier Jan 30, 2026
fe8e462
move: finx lint warnings
seanrathier Jan 30, 2026
dd27c95
move: self review changes
seanrathier Jan 30, 2026
547d6b4
move: more self review changes
seanrathier Jan 30, 2026
deb3059
move: update code owners
seanrathier Jan 30, 2026
6797ea8
move: fix type checks
seanrathier Jan 30, 2026
aacc5b8
move: i18n fix
seanrathier Jan 30, 2026
be63dfd
update moon project
seanrathier Jan 30, 2026
e66f41b
effects: policy effects working
seanrathier Feb 2, 2026
55def34
effects: fixed access scopes
seanrathier Feb 3, 2026
965aee2
effects: account type changes
seanrathier Feb 3, 2026
a2b8e24
effects: dead code
seanrathier Feb 3, 2026
48f7cd5
effects: more dead code
seanrathier Feb 3, 2026
56024a9
effects: IaC template URL changes
seanrathier Feb 3, 2026
0b7cdf4
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 3, 2026
50869d2
effects: code clean up
seanrathier Feb 3, 2026
9278ed6
effects: fixed targetCsp bug
seanrathier Feb 3, 2026
c40959e
effects: account type working and existing cc
seanrathier Feb 3, 2026
6485901
Changes from yarn openapi:bundle
kibanamachine Feb 4, 2026
a0e4e15
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 4, 2026
d6c553f
type fixes
seanrathier Feb 4, 2026
10f46b4
Merge branch 'cloud-connector-policy-effects' of github.com:seanrathi…
seanrathier Feb 4, 2026
bfa040a
effects: self review change
seanrathier Feb 4, 2026
afad9af
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 4, 2026
2ad49fa
Changes from make api-docs
kibanamachine Feb 4, 2026
a1fc4a5
fix azure and some unit tests
seanrathier Feb 4, 2026
5833167
Merge branch 'cloud-connector-policy-effects' of github.com:seanrathi…
seanrathier Feb 4, 2026
7d28a89
fix form unit test
seanrathier Feb 5, 2026
901b958
fix validation of hidden inputs ommited by var group
seanrathier Feb 6, 2026
5c2da51
cloud connector edit mode
seanrathier Feb 9, 2026
9986831
Update x-pack/platform/plugins/shared/fleet/public/components/cloud_c…
seanrathier Feb 9, 2026
bedbf44
Update x-pack/platform/plugins/shared/fleet/public/components/cloud_c…
seanrathier Feb 9, 2026
72b946c
fix tests
seanrathier Feb 9, 2026
41b58b6
Merge branch 'main' into cloud-connector-policy-effects
seanrathier Feb 9, 2026
539364f
Merge branch 'main' into cloud-connector-policy-effects
seanrathier Feb 10, 2026
87514a7
effects: add support_cloud_connector var
seanrathier Feb 10, 2026
4e767b2
Merge branch 'cloud-connector-policy-effects' of github.com:seanrathi…
seanrathier Feb 10, 2026
ed602b0
effects: code review changes
seanrathier Feb 11, 2026
4d62f36
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 11, 2026
efeb424
Changes from make api-docs
kibanamachine Feb 11, 2026
037ab9d
peer review changes
seanrathier Feb 17, 2026
8bfa3ed
Merge branch 'cloud-connector-policy-effects' of github.com:seanrathi…
seanrathier Feb 17, 2026
11e2ef0
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 17, 2026
746d8d1
effects: refactor account type UI
seanrathier Feb 17, 2026
93934e4
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 18, 2026
5efdf9f
Merge branch 'main' into cloud-connector-policy-effects
seanrathier Feb 18, 2026
f7acfe5
Revert "effects: refactor account type UI"
seanrathier Feb 18, 2026
60b225a
Remove cloud_connector_account_type
seanrathier Feb 18, 2026
3a90a30
revert OAS docs
seanrathier Feb 18, 2026
9ebc9fc
Changes from make api-docs
kibanamachine Feb 18, 2026
03e1a0c
effects: fix test
seanrathier Feb 18, 2026
4c8347b
Merge branch 'cloud-connector-policy-effects' of github.com:seanrathi…
seanrathier Feb 18, 2026
4a642e8
effects: renamed functions
seanrathier Feb 19, 2026
6efe08c
effects: clear cloud connector secrets
seanrathier Feb 19, 2026
276131b
added var_group FF
seanrathier Feb 20, 2026
8e082fa
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 20, 2026
edf3477
effects: remove CC feature flag
seanrathier Feb 23, 2026
67a4199
effects: remove CC feature flag
seanrathier Feb 23, 2026
3f8d905
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 23, 2026
a898407
effects: remove CC feature flag
seanrathier Feb 23, 2026
a2b61e7
Merge branch 'main' into cloud-connector-policy-effects
seanrathier Feb 23, 2026
7e1937c
effect: conflict
seanrathier Feb 23, 2026
8f9806a
fix types
seanrathier Feb 23, 2026
ed06302
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 24, 2026
295fbd7
remove account selector
seanrathier Feb 24, 2026
e62dbd5
Merge branch 'main' of github.com:elastic/kibana into cloud-connector…
seanrathier Feb 24, 2026
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
7 changes: 7 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29479,6 +29479,13 @@ paths:
maxLength: 255
minLength: 1
type: string
target_csp:
description: Target cloud service provider. If not provided, will be auto-detected from inputs.
enum:
- aws
- azure
- gcp
type: string
description:
description: Policy description.
type: string
Expand Down
7 changes: 7 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32052,6 +32052,13 @@ paths:
maxLength: 255
minLength: 1
type: string
target_csp:
description: Target cloud service provider. If not provided, will be auto-detected from inputs.
enum:
- aws
- azure
- gcp
type: string
description:
description: Policy description.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export const TENANT_ID_VAR_NAME = 'tenant_id';
export const CLIENT_ID_VAR_NAME = 'client_id';
export const AZURE_CREDENTIALS_CLOUD_CONNECTOR_ID = 'azure_credentials_cloud_connector_id';

// Cloud connector support flag
export const SUPPORTS_CLOUD_CONNECTORS_VAR_NAME = 'supports_cloud_connectors';

// Account type variable names for different cloud providers
export const AWS_ACCOUNT_TYPE_VAR_NAME = 'aws.account_type';
export const AZURE_ACCOUNT_TYPE_VAR_NAME = 'azure.account_type';
Expand All @@ -32,6 +35,9 @@ export const GCP_ACCOUNT_TYPE_VAR_NAME = 'gcp.account_type';
export const SINGLE_ACCOUNT = 'single-account';
export const ORGANIZATION_ACCOUNT = 'organization-account';

// Default account type for cloud connectors when not explicitly specified
export const CLOUD_CONNECTOR_DEFAULT_ACCOUNT_TYPE = SINGLE_ACCOUNT;

export const SUPPORTED_CLOUD_CONNECTOR_VARS = [
AWS_ROLE_ARN_VAR_NAME,
AWS_CREDENTIALS_EXTERNAL_ID_VAR_NAME,
Expand All @@ -43,4 +49,5 @@ export const SUPPORTED_CLOUD_CONNECTOR_VARS = [
TENANT_ID_VAR_NAME,
CLIENT_ID_VAR_NAME,
AZURE_CREDENTIALS_CLOUD_CONNECTOR_ID,
SUPPORTS_CLOUD_CONNECTORS_VAR_NAME,
];
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const _allowedExperimentalValues = {
enableSloTemplates: true,
newBrowseIntegrationUx: false, // When enabled integrations, browse integrations page will use the new UX.
enableVersionSpecificPolicies: false, // When enabled, version specific policies will be created when packages use agent version conditions
enableVarGroups: false, // When enabled, var_groups from the package spec drive conditional variable visibility and input filtering.
enableIntegrationInactivityAlerting: false, // When enabled, an inactivity monitoring alerting rule template is created on fresh integration package install.
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export {
getCredentialSchema,
getAllVarKeys,
getAllSupportedVarNames,
getCredentialKeyFromVarName,
} from './schemas';

// Accessor functions
Expand All @@ -43,3 +44,14 @@ export {
getVarTarget,
findFirstVarEntry,
} from './var_accessor';

// Var group helpers for cloud connector detection
export type { VarGroupSelection, CloudConnectorOptionResult } from './var_group_helpers';
export {
getSelectedOption,
getCloudConnectorOption,
getCloudConnectorVars,
getAllCloudConnectorVarNames,
getIacTemplateUrlFromVarGroupSelection,
detectTargetCsp,
} from './var_group_helpers';
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
getCredentialSchema,
getAllVarKeys,
getAllSupportedVarNames,
getCredentialKeyFromVarName,
} from './schemas';

describe('Cloud Connector Schemas', () => {
Expand Down Expand Up @@ -55,10 +56,12 @@ describe('Cloud Connector Schemas', () => {
expect(clientId.isSecret).toBe(true);
});

it('should have azureCredentialsCloudConnectorId field with correct keys', () => {
const { azureCredentialsCloudConnectorId } = AZURE_CREDENTIAL_SCHEMA.fields;
expect(azureCredentialsCloudConnectorId.primary).toBe('azure_credentials_cloud_connector_id');
expect(azureCredentialsCloudConnectorId.isSecret).toBe(false);
it('should have azure_credentials_cloud_connector_id field with correct keys', () => {
const { azure_credentials_cloud_connector_id } = AZURE_CREDENTIAL_SCHEMA.fields;
expect(azure_credentials_cloud_connector_id.primary).toBe(
'azure_credentials_cloud_connector_id'
);
expect(azure_credentials_cloud_connector_id.isSecret).toBe(false);
});
});

Expand Down Expand Up @@ -144,4 +147,74 @@ describe('Cloud Connector Schemas', () => {
expect(allVarNames.length).toBeGreaterThan(0);
});
});

describe('getCredentialKeyFromVarName', () => {
describe('AWS provider', () => {
it('should return roleArn for primary key role_arn', () => {
expect(getCredentialKeyFromVarName('aws', 'role_arn')).toBe('roleArn');
});

it('should return roleArn for alias aws.role_arn', () => {
expect(getCredentialKeyFromVarName('aws', 'aws.role_arn')).toBe('roleArn');
});

it('should return externalId for primary key external_id', () => {
expect(getCredentialKeyFromVarName('aws', 'external_id')).toBe('externalId');
});

it('should return externalId for alias aws.credentials.external_id', () => {
expect(getCredentialKeyFromVarName('aws', 'aws.credentials.external_id')).toBe(
'externalId'
);
});

it('should return undefined for unknown var name', () => {
expect(getCredentialKeyFromVarName('aws', 'unknown_var')).toBeUndefined();
});
});

describe('Azure provider', () => {
it('should return tenantId for primary key tenant_id', () => {
expect(getCredentialKeyFromVarName('azure', 'tenant_id')).toBe('tenantId');
});

it('should return tenantId for alias azure.credentials.tenant_id', () => {
expect(getCredentialKeyFromVarName('azure', 'azure.credentials.tenant_id')).toBe(
'tenantId'
);
});

it('should return clientId for primary key client_id', () => {
expect(getCredentialKeyFromVarName('azure', 'client_id')).toBe('clientId');
});

it('should return clientId for alias azure.credentials.client_id', () => {
expect(getCredentialKeyFromVarName('azure', 'azure.credentials.client_id')).toBe(
'clientId'
);
});

it('should return azure_credentials_cloud_connector_id for its primary key', () => {
expect(getCredentialKeyFromVarName('azure', 'azure_credentials_cloud_connector_id')).toBe(
'azure_credentials_cloud_connector_id'
);
});
});

describe('GCP provider', () => {
it('should return projectId for primary key project_id', () => {
expect(getCredentialKeyFromVarName('gcp', 'project_id')).toBe('projectId');
});

it('should return serviceAccountKey for primary key service_account_key', () => {
expect(getCredentialKeyFromVarName('gcp', 'service_account_key')).toBe('serviceAccountKey');
});
});

describe('Unknown provider', () => {
it('should return undefined for unknown provider', () => {
expect(getCredentialKeyFromVarName('unknown' as any, 'role_arn')).toBeUndefined();
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const AZURE_CREDENTIAL_SCHEMA: CloudConnectorCredentialSchema = {
aliases: [AZURE_CLIENT_ID_VAR_NAME], // 'azure.credentials.client_id'
isSecret: true,
},
azureCredentialsCloudConnectorId: {
azure_credentials_cloud_connector_id: {
primary: AZURE_CREDENTIALS_CLOUD_CONNECTOR_ID, // 'azure_credentials_cloud_connector_id'
aliases: [AZURE_CREDENTIALS_CLOUD_CONNECTOR_ID_VAR_NAME], // 'azure.credentials.azure_credentials_cloud_connector_id'
isSecret: false,
Expand Down Expand Up @@ -132,3 +132,34 @@ export function getAllSupportedVarNames(): string[] {

return allVarNames;
}

/**
* Gets the credential property name for a given var key name.
* Handles both primary keys and aliases, mapping them back to the logical credential field name.
*
* @param provider - The cloud provider (e.g., 'aws', 'azure')
* @param varName - The var key name (e.g., 'role_arn' or 'aws.role_arn')
* @returns The credential property name (e.g., 'roleArn') or undefined if not found
*
* @example
* getCredentialKeyFromVarName('aws', 'role_arn') // → 'roleArn'
* getCredentialKeyFromVarName('aws', 'aws.role_arn') // → 'roleArn'
* getCredentialKeyFromVarName('azure', 'tenant_id') // → 'tenantId'
*/
export function getCredentialKeyFromVarName(
provider: CloudProvider,
varName: string
): string | undefined {
const schema = CREDENTIAL_SCHEMAS[provider];
if (!schema) {
return undefined;
}

for (const [credentialKey, mapping] of Object.entries(schema.fields)) {
if (mapping.primary === varName || mapping.aliases.includes(varName)) {
return credentialKey;
}
}

return undefined;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface NormalizedAwsCredentials {
export interface NormalizedAzureCredentials {
tenantId?: string | { id: string; isSecretRef: boolean };
clientId?: string | { id: string; isSecretRef: boolean };
azureCredentialsCloudConnectorId?: string;
azure_credentials_cloud_connector_id?: string;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ describe('Cloud Connector Var Accessor', () => {
expect(credentials).toEqual({
tenantId: 'tenant-123',
clientId: 'client-456',
azureCredentialsCloudConnectorId: 'connector-789',
azure_credentials_cloud_connector_id: 'connector-789',
});
});

Expand Down Expand Up @@ -543,7 +543,7 @@ describe('Cloud Connector Var Accessor', () => {
{
tenantId: 'new-tenant',
clientId: 'new-client',
azureCredentialsCloudConnectorId: 'new-connector',
azure_credentials_cloud_connector_id: 'new-connector',
},
'azure',
packageInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ function readAzureCredentials(
return {
tenantId: findVarValue(vars, getAllVarKeys(schema.fields.tenantId)),
clientId: findVarValue(vars, getAllVarKeys(schema.fields.clientId)),
azureCredentialsCloudConnectorId: findVarValue(
azure_credentials_cloud_connector_id: findVarValue(
vars,
getAllVarKeys(schema.fields.azureCredentialsCloudConnectorId)
getAllVarKeys(schema.fields.azure_credentials_cloud_connector_id)
) as string | undefined,
};
}
Expand Down Expand Up @@ -395,13 +395,13 @@ function writeAzureCredentials(
};
}

// Write azureCredentialsCloudConnectorId
if (credentials.azureCredentialsCloudConnectorId !== undefined) {
const connectorIdKeys = getAllVarKeys(schema.fields.azureCredentialsCloudConnectorId);
// Write azure_credentials_cloud_connector_id
if (credentials.azure_credentials_cloud_connector_id !== undefined) {
const connectorIdKeys = getAllVarKeys(schema.fields.azure_credentials_cloud_connector_id);
const existingKey = findExistingVarKey(vars, connectorIdKeys) || connectorIdKeys[0];
updatedVars[existingKey] = {
...vars[existingKey],
value: credentials.azureCredentialsCloudConnectorId,
value: credentials.azure_credentials_cloud_connector_id,
};
}

Expand Down
Loading
Loading