mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Cloud Security] Enable credential fields in integration edit (#169365)
This commit is contained in:
parent
b8ecaa22d1
commit
44f3910763
3 changed files with 2 additions and 14 deletions
|
@ -255,7 +255,6 @@ export const AwsCredentialsForm = ({
|
|||
{setupFormat === 'manual' && (
|
||||
<>
|
||||
<AwsCredentialTypeSelector
|
||||
disabled={disabled}
|
||||
type={awsCredentialsType}
|
||||
onChange={(optionId) => {
|
||||
updatePolicy(
|
||||
|
@ -271,7 +270,6 @@ export const AwsCredentialsForm = ({
|
|||
<ReadDocumentation url={integrationLink} />
|
||||
<EuiSpacer size="l" />
|
||||
<AwsInputVarFields
|
||||
disabled={disabled}
|
||||
fields={fields}
|
||||
onChange={(key, value) => {
|
||||
updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } }));
|
||||
|
@ -286,11 +284,9 @@ export const AwsCredentialsForm = ({
|
|||
const AwsCredentialTypeSelector = ({
|
||||
type,
|
||||
onChange,
|
||||
disabled,
|
||||
}: {
|
||||
onChange(type: AwsCredentialsType): void;
|
||||
type: AwsCredentialsType;
|
||||
disabled: boolean;
|
||||
}) => (
|
||||
<EuiFormRow
|
||||
fullWidth
|
||||
|
@ -299,7 +295,6 @@ const AwsCredentialTypeSelector = ({
|
|||
})}
|
||||
>
|
||||
<EuiSelect
|
||||
disabled={disabled}
|
||||
fullWidth
|
||||
options={getAwsCredentialsFormManualOptions()}
|
||||
value={type}
|
||||
|
@ -313,11 +308,9 @@ const AwsCredentialTypeSelector = ({
|
|||
const AwsInputVarFields = ({
|
||||
fields,
|
||||
onChange,
|
||||
disabled,
|
||||
}: {
|
||||
fields: Array<AwsOptions[keyof AwsOptions]['fields'][number] & { value: string; id: string }>;
|
||||
onChange: (key: string, value: string) => void;
|
||||
disabled: boolean;
|
||||
}) => (
|
||||
<div>
|
||||
{fields.map((field) => (
|
||||
|
@ -325,7 +318,6 @@ const AwsInputVarFields = ({
|
|||
<>
|
||||
{field.type === 'password' && (
|
||||
<EuiFieldPassword
|
||||
disabled={disabled}
|
||||
id={field.id}
|
||||
type="dual"
|
||||
fullWidth
|
||||
|
@ -335,7 +327,6 @@ const AwsInputVarFields = ({
|
|||
)}
|
||||
{field.type === 'text' && (
|
||||
<EuiFieldText
|
||||
disabled={disabled}
|
||||
id={field.id}
|
||||
fullWidth
|
||||
value={field.value || ''}
|
||||
|
|
|
@ -548,7 +548,6 @@ const GcpInputVarFields = ({
|
|||
{credentialsTypeFields && credentialFilesFields && credentialJSONFields && (
|
||||
<EuiFormRow fullWidth label={gcpField.fields['gcp.credentials.type'].label}>
|
||||
<EuiSelect
|
||||
disabled={disabled}
|
||||
data-test-subj={CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS.CREDENTIALS_TYPE}
|
||||
fullWidth
|
||||
options={credentialOptionsList}
|
||||
|
@ -562,7 +561,6 @@ const GcpInputVarFields = ({
|
|||
{credentialsTypeValue === credentialFieldValue && credentialFilesFields && (
|
||||
<EuiFormRow fullWidth label={gcpField.fields['gcp.credentials.file'].label}>
|
||||
<EuiFieldText
|
||||
disabled={disabled}
|
||||
data-test-subj={CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS.CREDENTIALS_FILE}
|
||||
id={credentialFilesFields.id}
|
||||
fullWidth
|
||||
|
@ -574,7 +572,6 @@ const GcpInputVarFields = ({
|
|||
{credentialsTypeValue === credentialJSONValue && credentialJSONFields && (
|
||||
<EuiFormRow fullWidth label={gcpField.fields['gcp.credentials.json'].label}>
|
||||
<EuiTextArea
|
||||
disabled={disabled}
|
||||
data-test-subj={CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS.CREDENTIALS_JSON}
|
||||
id={credentialJSONFields.id}
|
||||
fullWidth
|
||||
|
|
|
@ -644,7 +644,7 @@ export const CspPolicyTemplateForm = memo<PackagePolicyReplaceDefineStepExtensio
|
|||
<>
|
||||
<EuiCallOut
|
||||
title={i18n.translate('xpack.csp.fleetIntegration.editWarning.calloutTitle', {
|
||||
defaultMessage: 'Agent Installation Required for Changes',
|
||||
defaultMessage: 'Modifying Integration Details',
|
||||
})}
|
||||
color="warning"
|
||||
iconType="warning"
|
||||
|
@ -652,7 +652,7 @@ export const CspPolicyTemplateForm = memo<PackagePolicyReplaceDefineStepExtensio
|
|||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.csp.fleetIntegration.editWarning.calloutDescription"
|
||||
defaultMessage="In order to change the cloud service provider (CSP) you want to monitor, add more accounts or change where CSPM is deployed (Organization vs Single Account), please install a new CSPM integration."
|
||||
defaultMessage="In order to change the cloud service provider (CSP) you want to monitor, add more accounts, or change where CSPM is deployed (Organization vs Single Account), please add a new CSPM integration."
|
||||
/>
|
||||
</p>
|
||||
</EuiCallOut>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue