To begin we will need:
- An Azure subscription with the correct permissions, where you can create the following resources:
- App Service
- App Service Plan
- Bot channels registration
- A Copy of the Ollie github repo
Register two Azure AD Applications in your tenant's directory.
-
Log in to the Azure Portal for your subscription, and go to “App registrations”. You can use the following link: https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps
-
Click on "New registration", and create an Azure AD application.
-
Click on the Register button
-
When the app is registered, you'll be taken to the app's Overview page. Copy the Application (client) ID; we will need it later.
-
Navigate to the Certificates & secrets section, this can be found in the sidebar in the Manage section. Click on + New client secret. Add a description for the secret and select an expiry time. Click Add.
-
When the secret is generated, copy the value and keep it safe. We will need it later.
-
Go back to “App registrations”, then repeat steps 2-6 to create another Azure AD application for the configuration app.
- Name: The name of the app config that can connect to the Log Analytics API and the Graph API, for example, “Ollie Configuration”.
- Supported account types: Select "Account in this organizational directory only"
- Leave the "Redirect URI" field blank for now.
-
Add Api Permissions to Configuration app
-
navigate to the configuration app
-
Select API Permissions under the Manage blade
-
Add the following permissions
-
Log Analytics API
- Data.Read
-
Microsoft Graph
- ThreatIndicators.ReadWrite.OwnedBy
-
-
Click Grant admin consent for ...
-
-
grant Access to the Azure Sentinel resource.
- Navigate to the Azure Sentinel Log Analytics workspace
- Select Access Control(IAM)
- Add the configuration app, with the Azure Sentinel Contributer role
-
Click on the Deploy to Azure button, this will help you deploy all the needed resources.
-
Select a subscription and resource group, we recommend creating a new resource group.
-
Fill in the required fields:
-
Serviceplan Name: the name of the serviceplan
-
Key Vault Name: the name of the keyvault, where we will store the secrets
-
Bot Name: The name of the bot.
-
Msa App Id: The application (client) ID of the first app registration that you created before
-
Msa App Secret: The client secret of the first app registration that you created before
To create the App Service, we use the name of the Bot. So the name of the Bot must be available.
- Click Review and Create and review all the provided information
- Click Create
Now that we've created all the necessary resources, it's time to deploy the bot. The following steps describe what to do.
-
Start by downloading this repository.
-
Navigate to the appsettings.json file, which can be found in Solution/Ollie
-
Fill in all the required information.
- MicrosoftAppId: The application (client) ID of the first app registration that you created before
- MicrosoftAppPassword: The client secret of the first app registration that you created before
- Tenant: TenantID
- ClientId: Client ID of the Configuration App
- ClientSecret: Secret of the Configuration App
- WorkspaceId: Id of the Azure Sentinel Log Analytics workspace
- SubscriptionId: Azure subscription ID
- ResourcegroupName: Resourcegroupname of where de Azure sentinel workspace is located.
- WorkspaceName: Name of the Azure Sentinel workspace
-
Next navigate to the manifest.json file, which can be found in Solution/Ollie/Manifest
-
Fill in the id parameter.
-
Deploy the bot to the App Service we've previously created.
To deploy the bot you can use Visualstudio or follow the instruction from the documentation
You have to create a single Teams app package in order to add Ollie to Teams.
- Open the Manifest\manifest.json file in a text editor.
- Change the placeholder to your Azure AD application's ID from above. This is the same GUID that you entered in the template under "Msa App Id".
- Create a ZIP package with the manifest.json,color.png, and outline.png. Make sure there are no nested folders inside the ZIP Package.
Follow these instruction