Skip to content

Commit 1bac9a6

Browse files
Merge pull request #266001 from austinmccollum/austinmc-ccp2-updates
update CCPv2 with corrections
2 parents 3b1a24d + 83b0a51 commit 1bac9a6

File tree

3 files changed

+127
-43
lines changed

3 files changed

+127
-43
lines changed

articles/sentinel/create-codeless-connector.md

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,91 @@ To learn from an example, see the [Data connector connection rules reference exa
127127

128128
Use Postman to call the data connector API to create the data connector which combines the connection rules and previous components. Verify the connector is now connected in the UI.
129129

130+
## Secure confidential input
131+
132+
Whatever authentication is used by your CCP data connector, take these steps to ensure confidential information is kept secure. The goal is to pass along credentials from the ARM template to the CCP without leaving readable confidential objects in your deployments history.
133+
134+
### Create label
135+
136+
The data connector definition creates a UI element to prompt for security credentials. For example, if your data connector authenticates to a log source with OAuth, your data connector definition section includes the `OAuthForm` type in the instructions. This sets up the ARM template to prompt for the credentials.
137+
138+
```json
139+
"instructions": [
140+
{
141+
"type": "OAuthForm",
142+
"parameters": {
143+
"UsernameLabel": "Username",
144+
"PasswordLabel": "Password",
145+
"connectButtonLabel": "Connect",
146+
"disconnectButtonLabel": "Disconnect"
147+
}
148+
}
149+
],
150+
```
151+
152+
### Store confidential input
153+
154+
A section of the ARM deployment template provides a place for the administrator deploying the data connector to enter the password. Use `securestring` to keep the confidential information secured in an object that isn't readable after deployment. For more information, see [Security recommendations for parameters](../azure-resource-manager/templates/best-practices.md#security-recommendations-for-parameters).
155+
156+
```json
157+
"mainTemplate": {
158+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
159+
"contentVersion": "[variables('dataConnectorCCPVersion')]",
160+
"parameters": {
161+
"Username": {
162+
"type": "securestring",
163+
"minLength": 1,
164+
"metadata": {
165+
"description": "Enter the username to connect to your data source."
166+
},
167+
"Password": {
168+
"type": "securestring",
169+
"minLength": 1,
170+
"metadata": {
171+
"description": "Enter the API key, client secret or password required to connect."
172+
}
173+
},
174+
// more deployment template information
175+
}
176+
}
177+
```
178+
179+
### Use the securestring objects
180+
181+
Finally, the CCP utilizes the credential objects in the data connector section.
182+
183+
```json
184+
"auth": {
185+
"type": "OAuth2",
186+
"ClientSecret": "[[parameters('Password')]",
187+
"ClientId": "[[parameters('Username')]",
188+
"GrantType": "client_credentials",
189+
"TokenEndpoint": "https://api.contoso.com/oauth/token",
190+
"TokenEndpointHeaders": {
191+
"Content-Type": "application/x-www-form-urlencoded"
192+
},
193+
"TokenEndpointQueryParameters": {
194+
"grant_type": "client_credentials"
195+
}
196+
},
197+
```
198+
199+
>[!Note]
200+
> The strange syntax for the credential object, `"ClientSecret": "[[parameters('Password')]",` isn't a typo!
201+
> In order to create the deployment template which also uses parameters, you need to escape the parameters in that section with an extra starting`[`. This allows the parameters to assign a value based on the user interaction with the connector.
202+
>
203+
> For more information, see [Template expressions escape characters](../azure-resource-manager/templates/template-expressions.md#escape-characters).
204+
205+
130206
## Create the deployment template
131207

132208
Manually package an Azure Resource Management (ARM) template using the [example template](#example-arm-template) as your guide.
133209

210+
In addition to the example template, published solutions available in the Microsoft Sentinel content hub use the CCP for their data connector. Review the following solutions as more examples of how to stitch the components together into an ARM template.
211+
212+
- [Ermes Browser Security](https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ermes%20Browser%20Security/Package/mainTemplate.json)
213+
- [Palo Alto Prisma Cloud CWPP](https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ermes%20Browser%20Security/Package/mainTemplate.json)
214+
134215
## Deploy the connector
135216

136217
Deploy your codeless connector as a custom template.
@@ -363,7 +444,12 @@ Consider using the ARM template test toolkit (arm-ttk) to validate the template
363444

364445
#### Example ARM template - parameters
365446

366-
For more information, see [Parameters in ARM templates](../azure-resource-manager/templates/parameters.md) and [Security recommendations for parameters](../azure-resource-manager/templates/best-practices.md#security-recommendations-for-parameters).
447+
For more information, see [Parameters in ARM templates](../azure-resource-manager/templates/parameters.md).
448+
449+
>[!Warning]
450+
> Use `securestring` for all passwords and secrets in objects readable after resource deployment.
451+
> For more information, see [Secure confidential input](#secure-confidential-input) and [Security recommendations for parameters](../azure-resource-manager/templates/best-practices.md#security-recommendations-for-parameters).
452+
367453

368454
```json
369455
{
@@ -644,7 +730,7 @@ There are 5 ARM deployment resources in this template guide which house the 4 CC
644730
// "minLength": 1
645731
//},
646732
//"apikey": {
647-
// "defaultValue": "API Key",
733+
// "defaultValue": "",
648734
// "type": "securestring",
649735
// "minLength": 1
650736
//}

articles/sentinel/data-connector-connection-rules-reference.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ Reference the [Create or Update](/rest/api/securityinsights/data-connectors/crea
3030

3131
**PUT** method
3232
```http
33-
https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.OperationalInsights/workspaces/{{workspaceName}}/providers/Microsoft.SecurityInsights/dataConnectors/{{dataConnectorId}}?api-version=
33+
https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.OperationalInsights/workspaces/{{workspaceName}}/providers/Microsoft.SecurityInsights/dataConnectors/{{dataConnectorId}}?api-version={{apiVersion}}
3434
```
3535

3636
## URI parameters
3737

38-
For more information, see [Data Connectors - Create or Update URI Parameters](/rest/api/securityinsights/data-connectors/create-or-update#uri-parameters)
38+
For more information about the latest API version, see [Data Connectors - Create or Update URI Parameters](/rest/api/securityinsights/data-connectors/create-or-update#uri-parameters).
3939

4040
|Name | Description |
4141
|---------|---------|
@@ -54,7 +54,6 @@ The request body for the CCP data connector has the following structure:
5454
"name": "{{dataConnectorId}}",
5555
"kind": "RestApiPoller",
5656
"etag": "",
57-
"DataType": ""
5857
"properties": {
5958
"connectorDefinitionName": "",
6059
"auth": {},
@@ -91,14 +90,11 @@ The CCP supports the following authentication types:
9190
> [!NOTE]
9291
> CCP OAuth2 implementation does not support certificate credentials.
9392
94-
As a best practice, use parameters in the auth section instead of hard-coding credentials.
95-
- For more information, see [Best practice recommendations for parameters](../azure-resource-manager/templates/best-practices.md#security-recommendations-for-parameters).
93+
As a best practice, use parameters in the auth section instead of hard-coding credentials. For more information, see [Secure confidential input](create-codeless-connector.md#secure-confidential-input).
9694

97-
In order to create the deployment template which also uses parameters, you need to escape the parameters in this section with an extra starting `[`. This allows the parameters to assign a value based on the user interaction with the connector.
98-
- For more information, see [Template expressions escape characters](../azure-resource-manager/templates/template-expressions.md#escape-characters).
95+
In order to create the deployment template which also uses parameters, you need to escape the parameters in this section with an extra starting `[`. This allows the parameters to assign a value based on the user interaction with the connector. For more information, see [Template expressions escape characters](../azure-resource-manager/templates/template-expressions.md#escape-characters).
9996

100-
To enable the credentials to be entered from the UI, the `connectorUIConfig` section requires `instructions` with the desired parameters.
101-
- For more information, see [Data connector definitions reference for the Codeless Connector Platform](data-connector-ui-definitions-reference.md#instructions).
97+
To enable the credentials to be entered from the UI, the `connectorUIConfig` section requires `instructions` with the desired parameters. For more information, see [Data connector definitions reference for the Codeless Connector Platform](data-connector-ui-definitions-reference.md#instructions).
10298

10399
#### Basic auth
104100

@@ -120,7 +116,7 @@ Example Basic auth using parameters defined in `connectorUIconfig`:
120116

121117
| Field | Required | Type | Description | Default value |
122118
| ---- | ---- | ---- | ---- | ---- |
123-
| **ApiKey** | Mandatory | string | user secret key | |
119+
| **ApiKey** | True | string | user secret key | |
124120
| **ApiKeyName** | | string | name of the Uri header containing the ApiKey value | `Authorization` |
125121
| **ApiKeyIdentifier** | | string | string value to prepend the token | `token` |
126122
| **IsApiKeyInPostPayload** | | boolean | send secret in POST body instead of header | `false` |
@@ -162,9 +158,9 @@ After the user returns to the client via the redirect URL, the application will
162158
| ---- | ---- | ---- | ---- |
163159
| **ClientId** | True | String | The client id |
164160
| **ClientSecret** | True | String | The client secret |
165-
| **AuthorizationCode** | Mandatory when grantType = `authorization_code` | String | If grant type is `authorization_code` this field value will be the authorization code returned from the auth serve. |
161+
| **AuthorizationCode** | True when grantType = `authorization_code` | String | If grant type is `authorization_code` this field value will be the authorization code returned from the auth serve. |
166162
| **Scope** | True for `authorization_code` grant type<br> optional for `client_credentials` grant type| String | A space-separated list of scopes for user consent. For more information, see [OAuth2 scopes and permissions](/entra/identity-platform/scopes-oidc). |
167-
| **RedirectUri** | Mandatory when grantType = `authorization_code` | String | URL for redirect, must be `https://portal.azure.com/TokenAuthorize` |
163+
| **RedirectUri** | True when grantType = `authorization_code` | String | URL for redirect, must be `https://portal.azure.com/TokenAuthorize` |
168164
| **GrantType** | True | String | `authorization_code` or `client_credentials` |
169165
| **TokenEndpoint** | True | String | URL to exchange code with valid token in `authorization_code` grant or client id and secret with valid token in `client_credentials` grant. |
170166
| **TokenEndpointHeaders** | | Object | An optional key value object to send custom headers to token server |
@@ -189,7 +185,7 @@ OAuth2 auth code grant
189185
"authorizationEndpointQueryParameters": {
190186
"prompt": "consent"
191187
},
192-
"redirectionUri": "https://portal.azure.com/TokenAuthorize",
188+
"redirectUri": "https://portal.azure.com/TokenAuthorize",
193189
"tokenEndpointHeaders": {
194190
"Accept": "application/json",
195191
"Content-Type": "application/x-www-form-urlencoded"
@@ -436,7 +432,7 @@ Paging: {
436432

437433
```json
438434
Paging: {
439-
"pagingType" = "PersistentLinkHeader",
435+
"pagingType" : "PersistentLinkHeader",
440436
"pageSizeParameterName" : "limit",
441437
"pageSize" : 500
442438
}

0 commit comments

Comments
 (0)