Follow these steps to permanently decommision a customer.
5/18/2020
Shutdown Splunk and disable to prevent new data going to the cluster.
salt saf-splunk-syslog-* cmd.run 'systemctl stop splunk'
salt saf-splunk-syslog-* cmd.run 'systemctl disable splunk'
salt -C 'saf-splunk-* not *.local' cmd.run 'systemctl stop splunk'
salt -C 'saf-splunk-* not *.local' cmd.run 'rm -rf /opt/*'
salt -C 'saf-splunk-* not *.local' cmd.run 'rm -rf /var/log/*'
salt -C 'saf-splunk-* not *.local' cmd.run 'rm -rf /etc/salt/minion && shutdown now'
salt saf-splunk-syslog-* cmd.run 'systemctl stop syslog-ng'
salt saf-splunk-syslog-* cmd.run 'systemctl disable syslog-ng'
salt saf-splunk-dcn-* cmd.run 'docker stop mdr-syslog-ng'
05/3/2021
See Splunk SAF Offboarding Notes.md
for notes on pulled data off an indexer to give to the customer.
Update TF code and remove whitelisted SG IPs and/or rules to remove access from POP to C&C, Salt master, and splunk indexers. This is stored in globals.hcl or account.hcl
terragrunt destroy
command in all folders except 005-iam. Ignore error deleting S3 bucket BucketNotEmpty in 006-account-standards.
180-splunk-heavy-forwarder
170-splunk-searchhead
165-splunk-legacy-hec ( only for accounts that got migrated from Legacy, Might error! )
160-splunk-indexer-cluster
150-splunk-cluster-master
140-splunk-frozen-bucket ( Use the console to empty bucket before TF will remove the bucket )
072-salt-master-inventory-role
021-qualys-connector-role
010-vpc-splunk
007-backups
006-account-standards-regional ( might be nothing )
006-account-standardssudo salt-key -d <CUSTOMER-PREFIX>*
In the redhat website, remove the entitlements. Check for LCP nodes that used an entitlement
Commit the changes to the xdr-terraform-live repo and get merged into master
After changes have been merged in git, apply the changes to remove the IPs from the security groups and the AWS account from transit gateway
You can lookup the account numbers here, but DO NOT remove them from the wiki. https://github.xdr.accenturefederalcyber.com/mdr-engineering/msoc-infrastructure/wiki/Cloud-Accounts
Be sure to check for both Gov and Commerical AWS Accounts
Remove references of the customer from these places:
Search for the customer short name to ensure nothing is missed.
Open git PR, get it approved, in master branch, and apply changes in salt to remove references to the old customer.
Update salt master
sudo salt-run fileserver.update
salt salt* state.sls salt_master --output-diff test=true
Update the FM search head and monitoring console
salt splunk-mc-0* state.sls splunk.monitoring_console --output-diff test=true
salt fm-shared-search-0* state.sls splunk.fm_shared_search --output-diff test=true
Disable the instances in the Monitoring Console webpage ( how to delete the instances? ), then save the changes. Verify the search peers have been removed from the distributed search in the FM Shared Searchhead and the monitoring console.
Each customer should have three applications. Deactive the app, then delete it. Splunk CM Splunk HF Splunk SH
Remove the account from the Moose HF AWS app.
Go to Qualys Dashboard -> Cloud Agent -> Activation Keys Disable the key, not sure how to delete it. Perhaps have to wait a period of time?
The Vuln data will age out over time. The agents will be auto removed after 30 days from the Nessus Manager or they can be manually deleted.
Do this after the Salt Master gitfs has been updated to avoid any error messages.
Git > Settings > Options > Archive this repository msoc--cm msoc--pop
Delete engineering/customer_slices/ Disable onboarding- Remove customer from the Vault variables portal/lambda_sync_env
Look in the splunk inventory for the Splunk names or look for emails indicating the logs are not sending.
afcc@accenturefederal.com;asha.a.nair@accenturefederal.com
Accenture Federal Cyber Center <afcc@accenturefederal.com>; Nair, Asha A. <asha.a.nair@accenturefederal.com>
SUBJECT: Decommissioned XDR Devices
Hello,
The below instances have been decommissioned from the environment and should be removed from any reports or inventories.
<list full splunk UF name of instances>
This lookup also needs to be edited. https://moose-splunk.pvt.xdr.accenturefederalcyber.com/en-US/app/SplunkEnterpriseSecuritySuite/ess_lookups_edit?namespace=SA-IdentityManagement&transform=simple_asset_lookup
Create jira ticket for Soofi, Osman osman.soofi@accenturefederal.com to submit a CAMRS disconnect ticket in the Jira PMO project. IMPORTANT: After the account is closed, AWS allows users to login for 90 days.
Summary: Decommission CAMRS AWS Account
Hello,
Please inform the CAMRS team that these AWS Accounts for <CUSTOMER-PREFIX> are no longer needed and can be decommissioned.
<AWS-ACCOUNT-ID-GOV>
<AWS-ACCOUNT-ID-COMMERCIAL>
Inform team to remove AWS account from the browser plugin. Post this in xdr-engineering-actual.
<CUSTOMER-PREFIX> has been decommissioned. Please manually remove the customer config from your browser plugin AWS Extend Switch Roles and update the infrastructure notes git repo to pull down the aws config with the customer removed.
files/config in infrastructure-notes
Mark the AWS Account decommissioned in the WIKI once the email to decommission the AWS account has been sent. We should keep the AWS Account numbers just in case they are needed in the future. https://github.xdr.accenturefederalcyber.com/mdr-engineering/msoc-infrastructure/wiki/Cloud-Accounts
IMPORTANT: After the account is closed, AWS allows users to login for 90 days. After AWS account has been decommissioned by CAMRS team, run terragrunt destroy
in the 005-iam account to prevent users from assuming role into the account. Then remove the mdr-prod- folder from the xdr-terraform-live git repo.