diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 154eff52c..a10823564 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -21,6 +21,7 @@ import {reformatConfig} from '../configuration-components/ReformatHook'; const CONFIG_URL = '/api/agent-configuration'; const RESET_URL = '/api/reset-agent-configuration'; +const CONFIGURED_PROPAGATION_CREDENTIALS_URL = '/api/propagation-credentials/configured-credentials'; export const API_PBA_LINUX = '/api/file-upload/PBAlinux'; export const API_PBA_WINDOWS = '/api/file-upload/PBAwindows'; @@ -233,10 +234,12 @@ class ConfigurePageComponent extends AuthComponent { this.updateConfig(); this.props.onStatusChange(); } - ).then(() => { - this.removePBAfile(API_PBA_WINDOWS, this.setPbaFilenameWindows) - this.removePBAfile(API_PBA_LINUX, this.setPbaFilenameLinux) - }); + ) + .then(() => { + this.removePBAfile(API_PBA_WINDOWS, this.setPbaFilenameWindows) + this.removePBAfile(API_PBA_LINUX, this.setPbaFilenameLinux) + }) + .then(this.authFetch(CONFIGURED_PROPAGATION_CREDENTIALS_URL, {method: 'DELETE'})); }; removePBAfile(apiEndpoint, setFilenameFnc) { diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx index 5b3db45eb..c744c869a 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx @@ -107,6 +107,10 @@ const IslandResetModal = (props: Props) => { if (res.status === 200) { return auth.authFetch('/api/clear-simulation-data', {method: 'POST'}) }}) + .then(res => { + if (res.status === 200) { + return auth.authFetch('/api/propagation-credentials/configured-credentials', {method: 'DELETE'}) + }}) .then(res => { if (res.status === 200) { return auth.authFetch('/api/island-mode', {method: 'POST', body: '{"mode": "unset"}'})