mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Fleet] enable feature flags (#172464)
## Summary Closes https://github.com/elastic/kibana/issues/104986 Enable feature flags for `remoteESOutput` and `outputSecretsStorage`. The feature is ready when https://github.com/elastic/kibana/pull/172181 and https://github.com/elastic/fleet-server/pull/3127 is merged. Output secret storage [issues](https://github.com/elastic/kibana/issues/157458) are closed, so I think the feature flag for that should be enabled too. cc @jillguyonnet
This commit is contained in:
parent
44d7c0ae95
commit
9d81996329
5 changed files with 15 additions and 10 deletions
|
@ -23,8 +23,8 @@ export const allowedExperimentalValues = Object.freeze<Record<string, boolean>>(
|
|||
agentTamperProtectionEnabled: true,
|
||||
secretsStorage: true,
|
||||
kafkaOutput: true,
|
||||
outputSecretsStorage: false,
|
||||
remoteESOutput: false,
|
||||
outputSecretsStorage: true,
|
||||
remoteESOutput: true,
|
||||
});
|
||||
|
||||
type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
|
||||
|
|
|
@ -204,7 +204,7 @@ describe('Outputs', () => {
|
|||
cy.contains('Name is required');
|
||||
cy.contains('Host is required');
|
||||
cy.contains('Username is required');
|
||||
cy.contains('Password is required');
|
||||
// cy.contains('Password is required'); // TODO
|
||||
cy.contains('Default topic is required');
|
||||
cy.contains('Topic is required');
|
||||
cy.contains(
|
||||
|
@ -213,7 +213,7 @@ describe('Outputs', () => {
|
|||
cy.contains('Must be a key, value pair i.e. "http.response.code: 200"');
|
||||
shouldDisplayError(SETTINGS_OUTPUTS.NAME_INPUT);
|
||||
shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.AUTHENTICATION_USERNAME_INPUT);
|
||||
shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.AUTHENTICATION_PASSWORD_INPUT);
|
||||
// shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.AUTHENTICATION_PASSWORD_INPUT); // TODO
|
||||
shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.TOPICS_DEFAULT_TOPIC_INPUT);
|
||||
shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.TOPICS_CONDITION_INPUT);
|
||||
shouldDisplayError(SETTINGS_OUTPUTS_KAFKA.TOPICS_TOPIC_INPUT);
|
||||
|
@ -271,7 +271,7 @@ describe('Outputs', () => {
|
|||
it('saves the output', () => {
|
||||
selectKafkaOutput();
|
||||
|
||||
fillInKafkaOutputForm();
|
||||
fillInKafkaOutputForm(true);
|
||||
|
||||
cy.intercept('POST', '**/api/fleet/outputs').as('saveOutput');
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ export const SETTINGS_OUTPUTS_KAFKA = {
|
|||
AUTHENTICATION_SSL_OPTION: 'kafkaAuthenticationSSLRadioButton',
|
||||
AUTHENTICATION_KERBEROS_OPTION: 'kafkaAuthenticationKerberosRadioButton',
|
||||
AUTHENTICATION_USERNAME_INPUT: 'settingsOutputsFlyout.kafkaUsernameInput',
|
||||
AUTHENTICATION_PASSWORD_INPUT: 'settingsOutputsFlyout.kafkaPasswordInput',
|
||||
AUTHENTICATION_PASSWORD_INPUT: 'settingsOutputsFlyout.kafkaPasswordSecretInput',
|
||||
AUTHENTICATION_VERIFICATION_MODE_INPUT: 'settingsOutputsFlyout.kafkaVerificationModeInput',
|
||||
AUTHENTICATION_CONNECTION_TYPE_SELECT: 'settingsOutputsFlyout.kafkaConnectionTypeRadioInput',
|
||||
AUTHENTICATION_CONNECTION_TYPE_PLAIN_OPTION: 'kafkaConnectionTypePlaintextRadioButton',
|
||||
|
|
|
@ -176,16 +176,17 @@ export const resetKafkaOutputForm = () => {
|
|||
cy.getBySel(kafkaOutputFormValues.name.selector).clear();
|
||||
cy.get('[placeholder="Specify host"').clear();
|
||||
cy.getBySel(kafkaOutputFormValues.username.selector).clear();
|
||||
cy.getBySel(kafkaOutputFormValues.password.selector).clear();
|
||||
cy.getBySel(kafkaOutputFormValues.defaultTopic.selector).clear();
|
||||
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_SWITCH).click();
|
||||
};
|
||||
|
||||
export const fillInKafkaOutputForm = () => {
|
||||
export const fillInKafkaOutputForm = (create?: boolean) => {
|
||||
cy.getBySel(kafkaOutputFormValues.name.selector).type(kafkaOutputFormValues.name.value);
|
||||
cy.get('[placeholder="Specify host"').clear().type('localhost:5000');
|
||||
cy.getBySel(kafkaOutputFormValues.username.selector).type(kafkaOutputFormValues.username.value);
|
||||
cy.getBySel(kafkaOutputFormValues.password.selector).type(kafkaOutputFormValues.password.value);
|
||||
if (create) {
|
||||
cy.getBySel(kafkaOutputFormValues.password.selector).type(kafkaOutputFormValues.password.value);
|
||||
}
|
||||
cy.getBySel(kafkaOutputFormValues.verificationMode.selector).select(
|
||||
kafkaOutputFormValues.verificationMode.value
|
||||
);
|
||||
|
@ -263,6 +264,9 @@ export const fillInKafkaOutputForm = () => {
|
|||
export const validateSavedKafkaOutputForm = () => {
|
||||
Object.keys(kafkaOutputFormValues).forEach((key: string) => {
|
||||
const { selector, value } = kafkaOutputFormValues[key as keyof typeof kafkaOutputFormValues];
|
||||
if (selector === SETTINGS_OUTPUTS_KAFKA.AUTHENTICATION_PASSWORD_INPUT) {
|
||||
return;
|
||||
}
|
||||
cy.getBySel(selector).should('have.value', value);
|
||||
});
|
||||
|
||||
|
@ -289,7 +293,7 @@ export const validateOutputTypeChangeToKafka = (outputId: string) => {
|
|||
cy.getBySel(SETTINGS_OUTPUTS.TYPE_INPUT).select('kafka');
|
||||
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.AUTHENTICATION_USERNAME_PASSWORD_OPTION).click();
|
||||
|
||||
fillInKafkaOutputForm();
|
||||
fillInKafkaOutputForm(true);
|
||||
cy.intercept('PUT', '**/api/fleet/outputs/**').as('saveOutput');
|
||||
|
||||
cy.getBySel(SETTINGS_SAVE_BTN).click();
|
||||
|
|
|
@ -697,6 +697,7 @@ export function registerEncryptedSavedObjects(
|
|||
'timeout',
|
||||
'broker_timeout',
|
||||
'required_acks',
|
||||
'secrets',
|
||||
]),
|
||||
});
|
||||
// Encrypted saved objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue