-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SIEM] [Detections] [BUG] Feedback to user about generated encryption…
… key (#56464) * wip * Expose whether the encryption key is randomly generated for saved-objects * give feedback to user if encryption key is randomly generated * remove package distributable * update msg for no api integration key * Update x-pack/plugins/encrypted_saved_objects/server/config.ts Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com> * review II * fix type * rename encryptionKeyRandomlyGenerated -> usingEphemeralEncryptionKey * fix test and mistake Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
- Loading branch information
Showing
22 changed files
with
180 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,4 +97,5 @@ export interface Privilege { | |
}; | ||
}; | ||
is_authenticated: boolean; | ||
has_encryption_key: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...lugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { EuiCallOut, EuiButton } from '@elastic/eui'; | ||
import React, { memo, useCallback, useState } from 'react'; | ||
|
||
import * as i18n from './translations'; | ||
|
||
const NoApiIntegrationKeyCallOutComponent = () => { | ||
const [showCallOut, setShowCallOut] = useState(true); | ||
const handleCallOut = useCallback(() => setShowCallOut(false), [setShowCallOut]); | ||
|
||
return showCallOut ? ( | ||
<EuiCallOut title={i18n.NO_API_INTEGRATION_KEY_CALLOUT_TITLE} color="danger" iconType="alert"> | ||
<p>{i18n.NO_API_INTEGRATION_KEY_CALLOUT_MSG}</p> | ||
<EuiButton color="danger" onClick={handleCallOut}> | ||
{i18n.DISMISS_CALLOUT} | ||
</EuiButton> | ||
</EuiCallOut> | ||
) : null; | ||
}; | ||
|
||
export const NoApiIntegrationKeyCallOut = memo(NoApiIntegrationKeyCallOutComponent); |
28 changes: 28 additions & 0 deletions
28
.../siem/public/pages/detection_engine/components/no_api_integration_callout/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const NO_API_INTEGRATION_KEY_CALLOUT_TITLE = i18n.translate( | ||
'xpack.siem.detectionEngine.noApiIntegrationKeyCallOutTitle', | ||
{ | ||
defaultMessage: 'API integration key required', | ||
} | ||
); | ||
|
||
export const NO_API_INTEGRATION_KEY_CALLOUT_MSG = i18n.translate( | ||
'xpack.siem.detectionEngine.noApiIntegrationKeyCallOutMsg', | ||
{ | ||
defaultMessage: `A new encryption key is generated for saved objects each time you start Kibana. Without a persistent key, you cannot delete or modify rules after Kibana restarts. To set a persistent key, add the xpack.encryptedSavedObjects.encryptionKey setting with any text value of 32 or more characters to the kibana.yml file.`, | ||
} | ||
); | ||
|
||
export const DISMISS_CALLOUT = i18n.translate( | ||
'xpack.siem.detectionEngine.dismissNoApiIntegrationKeyButton', | ||
{ | ||
defaultMessage: 'Dismiss', | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.