|
| 1 | +--- |
| 2 | +title: Deploy the Azure Sentinel SAP data connector on-premises | Microsoft Docs |
| 3 | +description: Learn how to deploy the Azure Sentinel data connector for SAP environments using an on-premises machine. |
| 4 | +author: batamig |
| 5 | +ms.author: bagol |
| 6 | +ms.service: azure-sentinel |
| 7 | +ms.topic: how-to |
| 8 | +ms.custom: mvc |
| 9 | +ms.date: 05/10/2021 |
| 10 | +ms.subservice: azure-sentinel |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +# Deploy the Azure Sentinel SAP data connector on-premises |
| 15 | + |
| 16 | +This article describes how to deploy the Azure Sentinel SAP data connector using an on-premises machine and an Azure Key Vault to store your credentials. |
| 17 | + |
| 18 | +> [!NOTE] |
| 19 | +> The default, and most recommended process for deploying the Azure Sentinel SAP data connector is by [using an Azure VM](sap-deploy-solution.md). This article is intended for advanced users. |
| 20 | +
|
| 21 | +> [!IMPORTANT] |
| 22 | +> The Azure Sentinel SAP solution is currently in PREVIEW. The [Azure Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 23 | +> |
| 24 | +
|
| 25 | +## Prerequisites |
| 26 | + |
| 27 | +The basic prerequisites for deploying your Azure Sentinel SAP data connector are the same regardless of your deployment method. |
| 28 | + |
| 29 | +Make sure that your system complies with the prerequisites documented in the main [SAP data connector deployment tutorial](sap-deploy-solution.md#prerequisites) before you start. |
| 30 | + |
| 31 | +For more information, see [Azure Sentinel SAP solution detailed SAP requirements (public preview)](sap-solution-detailed-requirements.md). |
| 32 | + |
| 33 | +## Create your Azure key vault |
| 34 | + |
| 35 | +Create an Azure key vault that you can dedicate to your Azure Sentinel SAP data connector. |
| 36 | + |
| 37 | +Run the following command to create your Azure key vault: |
| 38 | + |
| 39 | +``` azurecli |
| 40 | +kvgp=<KVResourceGroup> |
| 41 | +
|
| 42 | +kvname=<keyvaultname> |
| 43 | +
|
| 44 | +#Create key vault |
| 45 | +az keyvault create \ |
| 46 | + --name $kvname \ |
| 47 | + --resource-group $kvgp |
| 48 | +``` |
| 49 | + |
| 50 | +For more information, see [Quickstart: Create a key vault using the Azure CLI](/azure/key-vault/general/quick-create-cli). |
| 51 | + |
| 52 | +## Add Azure Key Vault secrets |
| 53 | + |
| 54 | +To add Azure Key Vault secrets, run the following script, with your own system ID and the credentials you want to add: |
| 55 | + |
| 56 | +```azurecli |
| 57 | +#Add Abap username |
| 58 | +az keyvault secret set \ |
| 59 | + --name <SID>-ABAPUSER \ |
| 60 | + --value "<abapuser>" \ |
| 61 | + --description SECRET_ABAP_USER --vault-name $kvname |
| 62 | +
|
| 63 | +#Add Abap Username password |
| 64 | +az keyvault secret set \ |
| 65 | + --name <SID>-ABAPPASS \ |
| 66 | + --value "<abapuserpass>" \ |
| 67 | + --description SECRET_ABAP_PASSWORD --vault-name $kvname |
| 68 | +
|
| 69 | +#Add java Username |
| 70 | +az keyvault secret set \ |
| 71 | + --name <SID>-JAVAOSUSER \ |
| 72 | + --value "<javauser>" \ |
| 73 | + --description SECRET_JAVAOS_USER --vault-name $kvname |
| 74 | +
|
| 75 | +#Add java Username password |
| 76 | +az keyvault secret set \ |
| 77 | + --name <SID>-JAVAOSPASS \ |
| 78 | + --value "<javauserpass>" \ |
| 79 | + --description SECRET_JAVAOS_PASSWORD --vault-name $kvname |
| 80 | +
|
| 81 | +#Add abapos username |
| 82 | +az keyvault secret set \ |
| 83 | + --name <SID>-ABAPOSUSER \ |
| 84 | + --value "<abaposuser>" \ |
| 85 | + --description SECRET_ABAPOS_USER --vault-name $kvname |
| 86 | +
|
| 87 | +#Add abapos username password |
| 88 | +az keyvault secret set \ |
| 89 | + --name <SID>-ABAPOSPASS \ |
| 90 | + --value "<abaposuserpass>" \ |
| 91 | + --description SECRET_ABAPOS_PASSWORD --vault-name $kvname |
| 92 | +
|
| 93 | +#Add Azure Log ws ID |
| 94 | +az keyvault secret set \ |
| 95 | + --name <SID>-LOG_WS_ID \ |
| 96 | + --value "<logwsod>" \ |
| 97 | + --description SECRET_AZURE_LOG_WS_ID --vault-name $kvname |
| 98 | +
|
| 99 | +#Add Azure Log ws public key |
| 100 | +az keyvault secret set \ |
| 101 | + --name <SID>-LOG_WS_PUBLICKEY \ |
| 102 | + --value "<loswspubkey>" \ |
| 103 | + --description SECRET_AZURE_LOG_WS_PUBLIC_KEY --vault-name $kvname |
| 104 | +``` |
| 105 | + |
| 106 | +For more information, see the [az keyvault secret](/cli/azure/keyvault/secret) CLI documentation. |
| 107 | + |
| 108 | +## Deploy the SAP data connector |
| 109 | + |
| 110 | +After you have a key vault with your SAP credentials, deploy your SAP data connector on your on-premises machine. |
| 111 | + |
| 112 | +**To deploy the SAP data connector**: |
| 113 | + |
| 114 | +1. On your on-premises machine, download the latest SAP NW RFC SDK from the [SAP Launchpad site](https://support.sap.com) > **SAP NW RFC SDK** > **SAP NW RFC SDK 7.50** > **nwrfc750X_X-xxxxxxx.zip**. |
| 115 | + |
| 116 | + > [!NOTE] |
| 117 | + > You'll need your SAP user sign-in information in order to access the SDK, and you must download the SDK that matches your operating system. |
| 118 | + > |
| 119 | + > Make sure to select the **LINUX ON X86_64 65BIT** option. |
| 120 | +
|
| 121 | +1. On your on-premises machine, create a new folder with a meaningful name, and copy the SDK zip file into your new folder. |
| 122 | + |
| 123 | +1. Clone the Azure Sentinel solution GitHub repo onto your on-premises machine, and copy Azure Sentinel SAP solution **systemconfig.ini** file into your new folder. |
| 124 | + |
| 125 | + For example: |
| 126 | + |
| 127 | + ```bash |
| 128 | + Wget <systemconfig.ini location> |
| 129 | + mkdir /home/$(pwd)/sapcon/<sap-sid>/ |
| 130 | + cp <azuresentinel4sap>/template/systemconfig.ini /home/$(pwd)/sapcon/<sap-sid>/ |
| 131 | + cp <**nwrfc750X_X-xxxxxxx.zip**> /home/$(pwd)/sapcon/<sap-sid>/ |
| 132 | + ``` |
| 133 | + |
| 134 | +1. Edit the **systemconfig.ini** file as needed, using the embedded comments as a guide. |
| 135 | + |
| 136 | + To test your configuration, add the user and password to the **systemconfig.ini** configuration file. We recommend that you use the **env.list** file, or Docker secrets as shown in [Manually configure the SAP data connector](#manually-configure-the-sap-data-connector). |
| 137 | + |
| 138 | + > [!NOTE] |
| 139 | + > Enter your time zone in GMT format, such as: `GMT+0`,`GMT+1`,`GMT-1` |
| 140 | + |
| 141 | +1. Define the logs that you want to ingest into Azure Sentinel using the instructions in the **systemconfig.ini** file. For example, see [Define the SAP logs that are sent to Azure Sentinel](#define-the-sap-logs-that-are-sent-to-azure-sentinel). |
| 142 | + |
| 143 | +1. Define the following configurations using the instructions in the **systemconfig.ini** file: |
| 144 | + |
| 145 | + - Whether to include user email addresses in audit logs |
| 146 | + - Whether to retry failed API calls |
| 147 | + - Whether to include cexal audit logs |
| 148 | + - Whether to wait an interval of time between data extractions, especially for large extractions |
| 149 | + |
| 150 | + For more information, see [SAL logs connector configurations](#sal-logs-connector-settings). |
| 151 | + |
| 152 | +1. Save your updated **systemconfig.ini** file in the **sapcon** directory on your machine. |
| 153 | + |
| 154 | +1. Create a temporary **env.list** file with any required credentials. Once your Docker container is running correctly, make sure to delete this file. |
| 155 | + |
| 156 | + > [!NOTE] |
| 157 | + > The following script has each Docker container connecting to a specific ABAP system. Modify your script as needed for your environment. |
| 158 | + > |
| 159 | + |
| 160 | + Run: |
| 161 | + |
| 162 | + ```bash |
| 163 | + ############################################################## |
| 164 | + ############################################################## |
| 165 | + # env.list template |
| 166 | + SAPADMUSER=<SET_SAPCONTROL_USER> |
| 167 | + SAPADMPASSWORD=<SET_SAPCONTROL_PASS> |
| 168 | + ABAPUSER=SET_ABAP_USER> |
| 169 | + ABAPPASS=<SET_ABAP_PASS> |
| 170 | + JAVAUSER=<SET_JAVA_OS_USER> |
| 171 | + JAVAPASS=<SET_JAVA_OS_USER> |
| 172 | + ############################################################## |
| 173 | + ``` |
| 174 | + |
| 175 | +1. Download and run the pre-defined Docker image with the SAP data connector installed. Run: |
| 176 | + |
| 177 | + ```azurecli |
| 178 | + docker pull docker pull mcr.microsoft.com/azure-sentinel/solutions/sapcon /sapcon:latest |
| 179 | + docker run --env-file=<env.list_location> -d -v /home/$(pwd)/sapcon/<sap-sid>/:/sapcon-app/sapcon/config/system --name sapcon-<sid> sapcon |
| 180 | + rm -f <env.list_location> |
| 181 | + ``` |
| 182 | + |
| 183 | +1. Verify that the Docker container is running correctly. Run: |
| 184 | + |
| 185 | + ```azurecli |
| 186 | + docker logs –f sapcon-[SID] |
| 187 | +
|
| 188 | + ``` |
| 189 | + |
| 190 | +1. In Azure Sentinel, browse to **Azure Sentinel Continuous Threat Monitoring for SAP** data connector to confirm the connection: |
| 191 | + |
| 192 | + [  ](media/sap/sap-data-connector.png#lightbox) |
| 193 | + |
| 194 | + > [!NOTE] |
| 195 | + > It may take up to 15 minutes for data ingestion to start. |
| 196 | + > |
| 197 | + |
| 198 | +SAP logs are displayed in the Azure Sentinel **Logs** page under **Custom logs**: |
| 199 | + |
| 200 | +[  ](media/sap/sap-logs-in-sentinel.png#lightbox) |
| 201 | + |
| 202 | +## Manually configure the SAP data connector |
| 203 | + |
| 204 | +The Azure Sentinel SAP solution data connector is configured in the **systemconfig.ini** file, which you cloned to your SAP data connector machine as part of the [deployment procedure](#deploy-the-sap-data-connector). |
| 205 | + |
| 206 | +The following code shows a sample **systemconfig.ini** file: |
| 207 | + |
| 208 | +```Python |
| 209 | +[Secrets Source] |
| 210 | +secrets = '<DOCKER_RUNTIME/AZURE_KEY_VAULT/DOCKER_SECRETS/DOCKER_FIXED>' |
| 211 | +keyvault = '<SET_YOUR_AZURE_KEYVAULT>' |
| 212 | +intprefix = '<SET_YOUR_PREFIX>' |
| 213 | +
|
| 214 | +[ABAP Central Instance] |
| 215 | +############################################################## |
| 216 | +# Define the following values according to your server configuration. |
| 217 | +ashost = <SET_YOUR_APPLICATION_SERVER_HOST> |
| 218 | +mshost = <SET_YOUR_MESSAGE_SERVER_HOST> - #In case different then App |
| 219 | +############################################################## |
| 220 | +group = <SET_YOUR_LOGON_GROUP> |
| 221 | +msserv = <SET_YOUR_MS_SERVICE> - #Required only if the message server service is not defined as sapms<SYSID> in /etc/services |
| 222 | +sysnr = <SET_YOUR_SYS_NUMBER> |
| 223 | +user = <SET_YOUR_USER> |
| 224 | +############################################################## |
| 225 | +# Enter your password OR your X509 SNC parameters |
| 226 | +passwd = <SET_YOUR_PASSWORD> |
| 227 | +snc_partnername = <SET_YOUR_SNC_PARTNER_NAME> |
| 228 | +snc_lib = <SET_YOUR_SNC_LIBRARY_PATH> |
| 229 | +x509cert = <SET_YOUR_X509_CERTIFICATE> |
| 230 | +############################################################## |
| 231 | +sysid = <SET_YOUR_SYSTEM_ID> |
| 232 | +client = <SET_YOUR_CLIENT> |
| 233 | +
|
| 234 | +[Azure Credentials] |
| 235 | +loganalyticswsid = <SET_YOUR_LOG_ANALYTICS_WORKSPACE_ID> |
| 236 | +publickey = <SET_YOUR_PUBLIC_KEY> |
| 237 | +
|
| 238 | +[File Extraction ABAP] |
| 239 | +osuser = <SET_YOUR_SAPADM_LIKE_USER> |
| 240 | +############################################################## |
| 241 | +# Enter your password OR your X509 SNC parameters |
| 242 | +ospasswd = <SET_YOUR_SAPADM_PASS> |
| 243 | +x509pkicert = <SET_YOUR_X509_PKI_CERTIFICATE> |
| 244 | +############################################################## |
| 245 | +appserver = <SET_YOUR_SAPCTRL_SERVER> |
| 246 | +instance = <SET_YOUR_SAP_INSTANCE> |
| 247 | +abapseverity = <SET_ABAP_SEVERITY> |
| 248 | +abaptz = <SET_ABAP_TZ> |
| 249 | +
|
| 250 | +[File Extraction JAVA] |
| 251 | +javaosuser = <SET_YOUR_JAVAADM_LIKE_USER> |
| 252 | +############################################################## |
| 253 | +# Enter your password OR your X509 SNC parameters |
| 254 | +javaospasswd = <SET_YOUR_JAVAADM_PASS> |
| 255 | +javax509pkicert = <SET_YOUR_X509_PKI_CERTIFICATE> |
| 256 | +############################################################## |
| 257 | +javaappserver = <SET_YOUR_JAVA_SAPCTRL_SERVER> |
| 258 | +javainstance = <SET_YOUR_JAVA_SAP_INSTANCE> |
| 259 | +javaseverity = <SET_JAVA_SEVERITY> |
| 260 | +javatz = <SET_JAVA_TZ> |
| 261 | +``` |
| 262 | + |
| 263 | +### Define the SAP logs that are sent to Azure Sentinel |
| 264 | + |
| 265 | +Add the following code to the Azure Sentinel SAP solution **systemconfig.ini** file to define the logs that are sent to Azure Sentinel. |
| 266 | + |
| 267 | +For more information, see [Azure Sentinel SAP solution logs reference (public preview)](sap-solution-log-reference.md). |
| 268 | + |
| 269 | +```Python |
| 270 | +############################################################## |
| 271 | +# Enter True OR False for each log to send those logs to Azure Sentinel |
| 272 | +[Logs Activation Status] |
| 273 | +ABAPAuditLog = True |
| 274 | +ABAPJobLog = True |
| 275 | +ABAPSpoolLog = True |
| 276 | +ABAPSpoolOutputLog = True |
| 277 | +ABAPChangeDocsLog = True |
| 278 | +ABAPAppLog = True |
| 279 | +ABAPWorkflowLog = True |
| 280 | +ABAPCRLog = True |
| 281 | +ABAPTableDataLog = False |
| 282 | +# ABAP SAP Control Logs - Retrieved by using SAP Conntrol interface and OS Login |
| 283 | +ABAPFilesLogs = False |
| 284 | +SysLog = False |
| 285 | +ICM = False |
| 286 | +WP = False |
| 287 | +GW = False |
| 288 | +# Java SAP Control Logs - Retrieved by using SAP Conntrol interface and OS Login |
| 289 | +JAVAFilesLogs = False |
| 290 | +############################################################## |
| 291 | +``` |
| 292 | + |
| 293 | +### SAL logs connector settings |
| 294 | + |
| 295 | +Add the following code to the Azure Sentinel SAP data connector **systemconfig.ini** file to define other settings for SAP logs ingested into Azure Sentinel. |
| 296 | + |
| 297 | +For more information, see [Deploy the SAP data connector](#deploy-the-sap-data-connector). |
| 298 | + |
| 299 | + |
| 300 | +```Python |
| 301 | +############################################################## |
| 302 | +[Connector Configuration] |
| 303 | +extractuseremail = True |
| 304 | +apiretry = True |
| 305 | +auditlogforcexal = False |
| 306 | +auditlogforcelegacyfiles = False |
| 307 | +timechunk = 60 |
| 308 | +############################################################## |
| 309 | +``` |
| 310 | + |
| 311 | +This section enables you to configure the following parameters: |
| 312 | + |
| 313 | +|Parameter name |Description | |
| 314 | +|---------|---------| |
| 315 | +|**extractuseremail** | Determines whether user email addresses are included in audit logs. | |
| 316 | +|**apiretry** | Determines whether API calls are retried as a failover mechanism. | |
| 317 | +|**auditlogforcexal** | Determines whether the system forces the use of audit logs for non-SAL systems, such as SAP BASIS version 7.4. | |
| 318 | +|**auditlogforcelegacyfiles** | Determines whether the system forces the use of audit logs with legacy system capabilities, such as from SAP BASIS version 7.4 with lower patch levels.| |
| 319 | +|**timechunk** | Determines that the system waits a specific number of minutes as an interval between data extractions. Use this parameter if you have a large amount of data expected. <br><br>For example, during the initial data load during your first 24 hours, you might want to have the data extraction running only every 30 minutes to give each data extraction enough time. In such cases, set this value to **30**. <!--unclear--> | |
| 320 | +| | | |
| 321 | + |
| 322 | + |
| 323 | +## Next steps |
| 324 | + |
| 325 | +After you have your SAP data connector deployed, you can add the SAP-related security content. |
| 326 | + |
| 327 | +For more information, see [Deploy the SAP solution security content from Azure Sentinel](sap-deploy-solution.md#deploy-sap-security-content-from-azure-sentinel). |
| 328 | + |
| 329 | +For more information, see: |
| 330 | + |
| 331 | +- [Azure Sentinel SAP solution detailed SAP requirements](sap-solution-detailed-requirements.md) |
| 332 | +- [Azure Sentinel SAP solution logs reference](sap-solution-log-reference.md) |
| 333 | +- [Azure Sentinel SAP solution: security content reference](sap-solution-security-content.md) |
0 commit comments